diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-09-06 12:31:42 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-09-06 15:14:41 +0200 |
commit | f651526271fb0b3d12f07f0810d80512edf384ad (patch) | |
tree | d9f3fb88ba656180fa8796059bf0525df49195c4 /hw/scsi-disk.c | |
parent | 8e321cc622a5583243b7641c84a5aeef66c07bb3 (diff) | |
download | qemu-f651526271fb0b3d12f07f0810d80512edf384ad.zip qemu-f651526271fb0b3d12f07f0810d80512edf384ad.tar.gz qemu-f651526271fb0b3d12f07f0810d80512edf384ad.tar.bz2 |
scsi: refine constants for READ CAPACITY 16
Rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to distinguish
from the 12-byte CDB variant, and add a constant for the subcommand.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r-- | hw/scsi-disk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index c23c2b8..ead4163 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -890,9 +890,9 @@ static int scsi_disk_emulate_command(SCSIDiskReq *r, uint8_t *outbuf) outbuf[7] = 8; // CD-ROM buflen = 8; break; - case SERVICE_ACTION_IN: + case SERVICE_ACTION_IN_16: /* Service Action In subcommands. */ - if ((req->cmd.buf[1] & 31) == 0x10) { + if ((req->cmd.buf[1] & 31) == SAI_READ_CAPACITY_16) { DPRINTF("SAI READ CAPACITY(16)\n"); memset(outbuf, 0, req->cmd.xfer); bdrv_get_geometry(s->bs, &nb_sectors); @@ -992,7 +992,7 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *buf) case READ_CAPACITY_10: case READ_TOC: case GET_CONFIGURATION: - case SERVICE_ACTION_IN: + case SERVICE_ACTION_IN_16: case VERIFY_10: rc = scsi_disk_emulate_command(r, outbuf); if (rc < 0) { |