[libvirt] handling qemuMonitorAddDevice failure: missing drive_del function?
Daniel P. Berrange
berrange at redhat.com
Tue May 18 13:42:20 UTC 2010
On Tue, May 18, 2010 at 03:23:23PM +0200, Jim Meyering wrote:
> In src/qemu/qemu_driver.c, coverity gripes (rightly) about this:
>
> 6912 qemuDomainObjEnterMonitorWithDriver(driver, vm);
> 6913 if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
> 6914 ret = qemuMonitorAddDrive(priv->mon, drivestr);
> 6915 if (ret == 0)
> No check of the return value of "qemuMonitorAddDevice(priv->mon, devstr)".
> Calling function "qemuMonitorAddDevice" without checking return value.
> 6916 qemuMonitorAddDevice(priv->mon, devstr);
> 6917 /* XXX remove the drive upon fail */
> 6918 } else {
>
> Does anyone have a preference on how to deal with it
> while we wait for a drive-removal function?
> I think it deserves at least a diagnostic.
Add a VIR_WARN message i guess
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list