aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-bus.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-07-16 14:07:55 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-07-27 08:25:26 +0200
commitaaebacef0a55a7113335ae3f998031d3c538a477 (patch)
tree8f76f724713f358ca2092526557418afa732eb71 /hw/scsi-bus.c
parente48e84ea80cb2e7fe6e48196ce187cfba6e3eb2c (diff)
scsi-disk: report resized disk via sense codes
Linux will not use these, but a very similar mechanism will be used to report the condition via virtio-scsi events. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r--hw/scsi-bus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index c38c0ec574..04262de44a 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -1161,6 +1161,11 @@ const struct SCSISense sense_code_LUN_FAILURE = {
.key = ABORTED_COMMAND, .asc = 0x3e, .ascq = 0x01
};
+/* Unit attention, Capacity data has changed */
+const struct SCSISense sense_code_CAPACITY_CHANGED = {
+ .key = UNIT_ATTENTION, .asc = 0x2a, .ascq = 0x09
+};
+
/* Unit attention, Power on, reset or bus device reset occurred */
const struct SCSISense sense_code_RESET = {
.key = UNIT_ATTENTION, .asc = 0x29, .ascq = 0x00