diff options
-rw-r--r-- | hw/scsi-disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 70c7a08190..b64dd31463 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -654,7 +654,7 @@ static int scsi_disk_emulate_mode_sense(SCSIRequest *req, uint8_t *outbuf) } bdrv_get_geometry(s->bs, &nb_sectors); - if ((~dbd) & nb_sectors) { + if (!dbd && nb_sectors) { if (req->cmd.buf[0] == MODE_SENSE) { outbuf[3] = 8; /* Block descriptor length */ } else { /* MODE_SENSE_10 */ |