scsi-generic: snoop READ CAPACITY commands to get block size
commit9b6eef8a319f11f977add658b622b60900877410
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 13 Oct 2011 08:36:27 +0000 (13 10:36 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 28 Oct 2011 17:25:51 +0000 (28 19:25 +0200)
treeee1dfd466046495a65345981bba97a5150f25a52
parenta3b16e71ab733f76104231b873dff48d43fb3890
scsi-generic: snoop READ CAPACITY commands to get block size

Instead of "guessing" the block size when there is no medium in the
drive, wait for the guest to send a READ CAPACITY command and snoop
it from there.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/scsi-generic.c