]> git.proxmox.com Git - qemu.git/commit
scsi-disk: restruct emulation: MODE_SENSE
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 26 Nov 2009 14:34:06 +0000 (15:34 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 3 Dec 2009 15:41:39 +0000 (09:41 -0600)
commitebddfcbe14c0184ef3821b987b0a9746b4802c27
tree054374f9dfa2074fa87091ea5b9bf4eae8be2d1a
parent3d53ba18f5bae3208fe42d9c8fba9687394655d5
scsi-disk: restruct emulation: MODE_SENSE

Move MODE_SENSE emulation from scsi_send_command() to
scsi_disk_emulate_command().  Create two helper functions:
mode_sense_page() which writes the actual mode pages and
scsi_disk_emulate_mode_sense() which holds the longish MODE_SENSE
emulation code, calling into mode_sense_page() as needed.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/scsi-disk.c