From 8a9c16f69e3ecbcc6e6bc068012986b87412c876 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 13 Sep 2011 16:26:06 +0200 Subject: scsi-disk: report media changed via unit attention sense codes Building on the previous patch, this one adds a media change callback to scsi-disk. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/scsi-bus.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/scsi-bus.c') diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index c190509505..867b1a8ebe 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -847,6 +847,11 @@ const struct SCSISense sense_code_RESET = { .key = UNIT_ATTENTION, .asc = 0x29, .ascq = 0x00 }; +/* Unit attention, No medium */ +const struct SCSISense sense_code_UNIT_ATTENTION_NO_MEDIUM = { + .key = UNIT_ATTENTION, .asc = 0x3a, .ascq = 0x00 +}; + /* Unit attention, Medium may have changed */ const struct SCSISense sense_code_MEDIUM_CHANGED = { .key = UNIT_ATTENTION, .asc = 0x28, .ascq = 0x00 -- cgit 1.4.1