Re: [PATCHv11 3/6] libvirt/qemu - clean up UpdateDevice for consolidation.

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

 



On Thu, 21 Apr 2011 15:51:38 -0600
Eric Blake <eblake@xxxxxxxxxx> wrote:

> On 04/21/2011 01:25 AM, KAMEZAWA Hiroyuki wrote:
> > This patch strips reusable part of qemudDomainUpdateDeviceFlags()
> > and consolidate it to qemudDomainModifyDeviceFlags().
> > No functional changes.
> > 
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> > 
> > Changelog: v10->v11
> >   - fixed qemuTeardownDiskCgroup()
> > 
> >  
> > -    virCheckFlags(VIR_DOMAIN_DEVICE_MODIFY_LIVE |
> > -                  VIR_DOMAIN_DEVICE_MODIFY_CONFIG, -1);
> > +    switch (action) {
> > +    case QEMUD_DEVICE_ATTACH:
> > +    case QEMUD_DEVICE_DETACH:
> > +        virCheckFlags(VIR_DOMAIN_DEVICE_MODIFY_LIVE |
> > +                      VIR_DOMAIN_DEVICE_MODIFY_CONFIG, -1);
> > +        break;
> > +    case QEMUD_DEVICE_UPDATE:
> > +        virCheckFlags(VIR_DOMAIN_DEVICE_MODIFY_CURRENT |
> > +                      VIR_DOMAIN_DEVICE_MODIFY_LIVE |
> > +                      VIR_DOMAIN_DEVICE_MODIFY_CONFIG |
> > +                      VIR_DOMAIN_DEVICE_MODIFY_FORCE, -1);
> > +        break;
> > +    default:
> > +        break;
> 
> This lets an invalid action through without warning.  And _CURRENT is 0,
> so it's redundant.  I shrunk it a bit.
> 
Ah, yes. I was wrong.

> More qemud/qemu renaming.
> 
> ACK, and pushed with this squashed in:
> 

Thanks, I'll rework patch 4-6.
-Kame


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux