diff mbox series

[3/6] usb-storage: use bool for removable property

Message ID 20201105134112.25119-4-kraxel@redhat.com
State Accepted
Commit e315bfd1ba5ece5b8d3fc616219391f2d4b08778
Headers show
Series usb: fix some guest-triggerable asserts | expand

Commit Message

Gerd Hoffmann Nov. 5, 2020, 1:41 p.m. UTC
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/dev-storage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé Nov. 5, 2020, 2:27 p.m. UTC | #1
On 11/5/20 2:41 PM, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

> ---

>  hw/usb/dev-storage.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)


Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index d5cc6137443c..360e8ca8f2bd 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -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(),
 };