
On Fri, Aug 08, 2008 at 02:07:49PM +0200, Jim Meyering wrote:
Guido Günther <agx@sigxcpu.org> wrote: [..snip..]
+static int qemudDomainAttachUsbMassstorageDevice(virDomainPtr dom, virDomainDeviceDefPtr dev) +{ + struct qemud_driver *driver = (struct qemud_driver *)dom->conn->privateData; + virDomainObjPtr vm = virDomainFindByUUID(driver->domains, dom->uuid);
This should handle the case in which vm == NULL. Otherwise, qemudMonitorCommand will dereference NULL. ... The function gets called from qemudDomainAttachDevice which does the same call to virDomainFindbyUUid and checks for vm == NULL already but you're right: better safe than sorry.
[..snip..]
Please add a newline and split the long line:
/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi \ -boot c -hda /dev/HostVG/QEMUGuest1 -usbdevice disk:/tmp/usbdisk.img \ -net none -serial none -parallel none -usb I'd rather not since this breaks the testcase, it compares the exact output.
New patches attached. Patches apply on top of the hostdev patches. -- Guido