Add some comments to code --- src/cd-usb-bulk-msd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cd-usb-bulk-msd.c b/src/cd-usb-bulk-msd.c index 41e210f0..61c15a75 100644 --- a/src/cd-usb-bulk-msd.c +++ b/src/cd-usb-bulk-msd.c @@ -44,6 +44,7 @@ typedef enum UsbCdState { USB_CD_STATE_TARGET_RESET /* reset of entire target */ } UsbCdState; +/* USB MSD Command Block Wrapper */ struct __attribute__((__packed__)) UsbCdCBW { uint32_t sig; uint32_t tag; @@ -54,6 +55,7 @@ struct __attribute__((__packed__)) UsbCdCBW { uint8_t cmd[16]; /* scsi command to perform */ }; +/* USB MSD Command Status Wrapper */ struct __attribute__((__packed__)) UsbCdCSW { uint32_t sig; uint32_t tag; @@ -61,6 +63,7 @@ struct __attribute__((__packed__)) UsbCdCSW { uint8_t status; }; +/* UsbCdCSW::status */ typedef enum UsbMsdStatus { USB_MSD_STATUS_GOOD = 0, USB_MSD_STATUS_FAILED = 1, @@ -158,6 +161,7 @@ int cd_usb_bulk_msd_realize(UsbCdBulkMsdDevice *cd, uint32_t lun, } if (cd->state == USB_CD_STATE_INIT) { + /* wait next request */ cd_usb_bulk_msd_set_state(cd, USB_CD_STATE_CBW); cd_scsi_dev_request_release(cd->scsi_target, &cd->usb_req.scsi_req); } -- 2.20.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel