[PATCH spice-gtk 33/44] fixup! usb-redir: add implementation of emulated CD device

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

 



param field was removed from parameters, read from device.
---
 src/usb-device-cd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/usb-device-cd.c b/src/usb-device-cd.c
index a76ea43e..bc1c60d3 100644
--- a/src/usb-device-cd.c
+++ b/src/usb-device-cd.c
@@ -736,6 +736,7 @@ static UsbCd* usb_cd_create(SpiceUsbBackend *be,
     uint32_t unit = 0;
     UsbCd *d = g_new0(UsbCd, 1);
     CdScsiDeviceParameters dev_params = { 0 };
+    uint16_t address = spice_usb_backend_device_get_info(parent)->address;
 
     d->dev_ops = devops;
     d->backend = be;
@@ -744,8 +745,8 @@ static UsbCd* usb_cd_create(SpiceUsbBackend *be,
     d->locked = !d->delete_on_eject;
     d->serial[0] = 0x0308;
     d->serial[1] = 'X';
-    d->serial[2] = '0' + param->address / 10;
-    d->serial[3] = '0' + param->address % 10;
+    d->serial[2] = '0' + address / 10;
+    d->serial[3] = '0' + address % 10;
     d->max_lun_index = MAX_LUN_PER_DEVICE - 1;
 
     dev_params.vendor = "SPICE";
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]