diff options
author | David 'Digit' Turner <digit@android.com> | 2010-12-23 02:54:08 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-01-02 22:31:27 +0100 |
commit | cb42a1b1461e02efb034582ac5d8f71534723b92 (patch) | |
tree | 5dbd619671d4591d33834488f1c15690dabf50ba /hw/scsi-disk.c | |
parent | ca6a2e034bce665a08d9d748ac11d6a7cfcd7c48 (diff) | |
download | external_qemu-cb42a1b1461e02efb034582ac5d8f71534723b92.zip external_qemu-cb42a1b1461e02efb034582ac5d8f71534723b92.tar.gz external_qemu-cb42a1b1461e02efb034582ac5d8f71534723b92.tar.bz2 |
upstream: integrate block changes
This large patch upgrades the block support code to the upstream
version available in ba5e7f82169f32ab8163c707d97c799ca09f8924
dated 2010-08-08
Change-Id: I8b24df0c287e72f6620650a4d6a62e1bb315453e
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r-- | hw/scsi-disk.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index a0485db..3d3946a 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -15,6 +15,7 @@ #include <qemu-common.h> #include <sysemu.h> +#include "blockdev.h" //#define DEBUG_SCSI #ifdef DEBUG_SCSI @@ -219,7 +220,7 @@ static void scsi_read_data(SCSIDevice *d, uint32_t tag) static int scsi_handle_write_error(SCSIRequest *r, int error) { - BlockInterfaceErrorAction action = drive_get_onerror(r->dev->bdrv); + BlockErrorAction action = bdrv_get_on_error(r->dev->bdrv, 0); if (action == BLOCK_ERR_IGNORE) return 0; @@ -318,7 +319,7 @@ static void scsi_dma_restart_cb(void *opaque, int running, int reason) while (r) { if (r->status & SCSI_REQ_STATUS_RETRY) { r->status &= ~SCSI_REQ_STATUS_RETRY; - scsi_write_request(r); + scsi_write_request(r); } r = r->next; } @@ -948,9 +949,11 @@ SCSIDevice *scsi_disk_init(BlockDriverState *bdrv, int tcq, if (nb_sectors) nb_sectors--; s->max_lba = nb_sectors; +#if 0 strncpy(s->drive_serial_str, drive_get_serial(s->bdrv), sizeof(s->drive_serial_str)); if (strlen(s->drive_serial_str) == 0) +#endif pstrcpy(s->drive_serial_str, sizeof(s->drive_serial_str), "0"); qemu_add_vm_change_state_handler(scsi_dma_restart_cb, s); d = (SCSIDevice *)qemu_mallocz(sizeof(SCSIDevice)); |