[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCHv10 2/6] clean up At(De)tachDeviceFlags() for consolidation.



At 04/19/2011 03:43 PM, KAMEZAWA Hiroyuki Write:
> qemudDomainAttachDeviceFlags()/qemudDomainDetachFlags()/
> qemudDomainUpdateDeviceFlags() has similar logics and copied codes.
> 
> This patch series tries to unify them to use shared code when it can.
> At first, clean up At(De)tachDeviceFlags() and devide it into functions.
> 
> By this, this patch pulls out shared components between functions.
> Based on patch series by Eric Blake, I added some modification as
> switch-case.
> 
> From: Eric Blake <eblake redhat com>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa hiroyu jp fujitsu com>
> 
> * src/qemu/qemu_driver.c
> (qemudDomainAttachDeviceFlags) : pulled out to qemudDomainModifyDeviceFlags()
> (qemudDomainModifyDeviceFlags) : impelements a generic codes for modify domain.
> (qemudDomainAttachDeviceFlagsLive) : codes for attaching devices to domain
> in live, no changes in logic from old code.
> (qemudDomainDetachDeviceFlagsLive) : codes for detaching devices to domain
> in live, no changes in logic from old code.

You introduce some functions qemudDomainAttachXXXLive() and qemudDomainDetachXXXLive()
to make qemudDomainAttachDeviceFlags() and qemudDomainDetachDeviceFlags() to be small.

You should log them in commit messages.

> ---
>  src/qemu/qemu_driver.c |  429 ++++++++++++++++++++++++++----------------------
>  1 files changed, 234 insertions(+), 195 deletions(-)
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]