On Thu, 21 Apr 2011 15:51:38 -0600
Eric Blake <eblake(a)redhat.com> 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(a)jp.fujitsu.com>
>
> 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