diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-11-26 15:33:58 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 09:41:37 -0600 |
commit | 37659e510483fd8758424356b76209124ccfd98c (patch) | |
tree | 087b227ecc8712498a12938259331570eb943853 /hw/scsi-bus.c | |
parent | 97a064356704af1756270b1d56dea2690ae015de (diff) | |
download | qemu-37659e510483fd8758424356b76209124ccfd98c.zip qemu-37659e510483fd8758424356b76209124ccfd98c.tar.gz qemu-37659e510483fd8758424356b76209124ccfd98c.tar.bz2 |
scsi: move sense to SCSIDevice, create SCSISense struct.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r-- | hw/scsi-bus.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index e250e4f..666ca3c 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -113,6 +113,16 @@ void scsi_bus_legacy_handle_cmdline(SCSIBus *bus) } } +void scsi_dev_clear_sense(SCSIDevice *dev) +{ + memset(&dev->sense, 0, sizeof(dev->sense)); +} + +void scsi_dev_set_sense(SCSIDevice *dev, uint8_t key) +{ + dev->sense.key = key; +} + SCSIRequest *scsi_req_alloc(size_t size, SCSIDevice *d, uint32_t tag, uint32_t lun) { SCSIRequest *req; |