From b9e77bc718db3593ffbb56f3a51488cdce4d5af3 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Thu, 12 Jun 2014 15:41:37 +1000 Subject: scsi: Print command name in debug This makes scsi_command_name() public. This makes use of scsi_command_name() in debug output for scsi-disk and spapr-vscsi host bus adapter. Before this, SCSI used to print hex numbers instead of human-friendly strings. This adds GET_EVENT_STATUS_NOTIFICATION and READ_DISC_INFORMATION to the list of SCSI commands supported by scsi_command_name(). Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-disk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/scsi/scsi-disk.c') diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index fd82a41..a529ad2 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2027,7 +2027,8 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf) (long)r->req.cmd.xfer); break; default: - DPRINTF("Unknown SCSI command (%2.2x)\n", buf[0]); + DPRINTF("Unknown SCSI command (%2.2x=%s)\n", buf[0], + scsi_command_name(buf[0])); scsi_check_condition(r, SENSE_CODE(INVALID_OPCODE)); return 0; } -- cgit v1.1