qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] Return usb device to host on exit


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 2/2] Return usb device to host on exit
Date: Mon, 14 Jun 2010 11:50:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100505 Fedora/3.0.4-2.el6 Thunderbird/3.0.4

@@ -1066,6 +1077,7 @@ USBDevice *usb_host_device_open(const char *devname)
      qdev_prop_set_uint32(&dev->qdev, "vendorid",  filter.vendor_id);
      qdev_prop_set_uint32(&dev->qdev, "productid", filter.product_id);
      qdev_init_nofail(&dev->qdev);
+    atexit(usb_host_cleanup);
      return dev;

You'll register atexit multiple times here (once per device).

I still think this should use exit notifiers, see http://patchwork.ozlabs.org/patch/54571/ (doesn't apply cleanly and more, will post a rebased version later today).

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]