usb-storage: use bool for removable property
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 5 Nov 2020 13:41:09 +0000 (14:41 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 16 Nov 2020 08:11:21 +0000 (09:11 +0100)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20201105134112.25119-4-kraxel@redhat.com

hw/usb/dev-storage.c

index d5cc6137443c58b871461d5ef0ff9ac4a3ad60ba..360e8ca8f2bd378b979e18df2382d57f45692a9b 100644 (file)
@@ -56,7 +56,7 @@ struct MSDState {
     USBPacket *packet;
     /* usb-storage only */
     BlockConf conf;
-    uint32_t removable;
+    bool removable;
     bool commandlog;
     SCSIDevice *scsi_dev;
 };
@@ -682,7 +682,7 @@ static const VMStateDescription vmstate_usb_msd = {
 static Property msd_properties[] = {
     DEFINE_BLOCK_PROPERTIES(MSDState, conf),
     DEFINE_BLOCK_ERROR_PROPERTIES(MSDState, conf),
-    DEFINE_PROP_BIT("removable", MSDState, removable, 0, false),
+    DEFINE_PROP_BOOL("removable", MSDState, removable, false),
     DEFINE_PROP_BOOL("commandlog", MSDState, commandlog, false),
     DEFINE_PROP_END_OF_LIST(),
 };