Skip to content
  • Stefan Hajnoczi's avatar
    usb-msd: Propagate removable bit to SCSI device · 6bb7b867
    Stefan Hajnoczi authored
    
    
    USB Mass Storage Devices sometimes have the RMB (removable) bit set in
    the SCSI INQUIRY response.  Thumbdrives tend to have the bit set whereas
    hard disks do not.
    
    Operating systems differentiate between removable devices and fixed
    devices.  Under Linux, the anaconda installer looks for removable
    devices.  Under Windows, only fixed devices may have more than one
    partition and AutoRun is also affected by the removable bit.
    
    For these reasons, allow USB Mass Storage Devices to override the
    removable bit:
    
    qemu -usb
         -drive if=none,file=test.img,cache=none,id=disk0
         -device usb-storage,drive=disk0,removable=on
    
    The default is off.
    
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    6bb7b867