[Spice-devel] [spice-gtk 9/9] usb-redir: enable redirection of emulated CD drive

Yuri Benditovich yuri.benditovich at daynix.com
Wed Jul 24 10:53:51 UTC 2019


Register constructor for emulated CD device. Now creation
of CD devices at startup is possible.

Signed-off-by: Yuri Benditovich <yuri.benditovich at daynix.com>
---
 src/meson.build   | 6 ++++++
 src/usb-backend.c | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/meson.build b/src/meson.build
index 49fec52..944b083 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -124,6 +124,12 @@ spice_client_glib_sources = [
   'usb-backend.c',
   'usb-emulation.h',
   'usb-backend.h',
+  'usb-device-cd.c',
+  'cd-scsi.c',
+  'cd-scsi.h',
+  'cd-scsi-dev-params.h',
+  'cd-usb-bulk-msd.c',
+  'cd-usb-bulk-msd.h',
   'vmcstream.c',
   'vmcstream.h',
 ]
diff --git a/src/usb-backend.c b/src/usb-backend.c
index 02369d2..760dc16 100644
--- a/src/usb-backend.c
+++ b/src/usb-backend.c
@@ -432,6 +432,7 @@ SpiceUsbBackend *spice_usb_backend_new(GError **error)
 #endif
 #endif
         be->own_devices_mask = 3; /* exclude addresses 0 and 1 */
+        spice_usb_device_register_cd(be);
     }
     SPICE_DEBUG("%s <<", __FUNCTION__);
     return be;
-- 
2.17.1



More information about the Spice-devel mailing list