They are generic SCSI constants, rename them as such.
Signed-off-by: Paolo Bonzini pbonzini@redhat.com --- src/blockcmd.h | 3 +++ src/usb-msc.c | 2 +- src/usb-msc.h | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/blockcmd.h b/src/blockcmd.h index 84ab659..6923e4c 100644 --- a/src/blockcmd.h +++ b/src/blockcmd.h @@ -57,6 +57,9 @@ struct cdbres_request_sense { u32 reserved_0e; } PACKED;
+#define SCSI_TYPE_DISK 0x00 +#define SCSI_TYPE_CDROM 0x05 + struct cdbres_inquiry { u8 pdt; u8 removable; diff --git a/src/usb-msc.c b/src/usb-msc.c index 5539f6a..115aaef 100644 --- a/src/usb-msc.c +++ b/src/usb-msc.c @@ -238,7 +238,7 @@ usb_msc_init(struct usb_pipe *pipe , vendor, product, rev, pdt, removable); udrive_g->drive.removable = removable;
- if (pdt == USB_MSC_TYPE_CDROM) { + if (pdt == SCSI_TYPE_CDROM) { char *desc = znprintf(MAXDESCSIZE, "DVD/CD [USB Drive %s %s %s]" , vendor, product, rev); ret = setup_drive_cdrom(&udrive_g->drive, desc); diff --git a/src/usb-msc.h b/src/usb-msc.h index 71adb20..a8686a3 100644 --- a/src/usb-msc.h +++ b/src/usb-msc.h @@ -21,7 +21,4 @@ int process_usb_op(struct disk_op_s *op);
#define US_PR_BULK 0x50
-#define USB_MSC_TYPE_DISK 0x00 -#define USB_MSC_TYPE_CDROM 0x05 - #endif // ush-msc.h