From: Ian Jackson Date: Fri, 30 May 2008 16:29:57 +0000 (+0100) Subject: Remove erroneously duplicated code X-Git-Tag: xen-3.3.0-rc1~137 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fd857fa5dddb20b6ca82cf1d1e2944b8f0fa9600;p=qemu-xen-3.3-testing.git Remove erroneously duplicated code --- diff --git a/hw/ide.c b/hw/ide.c index 1205c3f4..37bcf56b 100644 --- a/hw/ide.c +++ b/hw/ide.c @@ -1309,39 +1309,6 @@ static void ide_flush_cb(void *opaque, int ret) ide_set_irq(s); } -static void ide_device_utterly_broken(IDEState *s) { - s->status |= BUSY_STAT; - s->bs = NULL; - /* This prevents all future commands from working. All of the - * asynchronous callbacks (and ide_set_irq, as a safety measure) - * check to see whether this has happened and bail if so. - */ -} - -static void ide_flush_cb(void *opaque, int ret) -{ - IDEState *s = opaque; - - if (!s->bs) return; /* yikes */ - - if (ret) { - /* We are completely doomed. The IDE spec does not permit us - * to return an error from a flush except via a protocol which - * requires us to say where the error is and which - * contemplates the guest repeating the flush attempt to - * attempt flush the remaining data. We can't support that - * because f(data)sync (which is what the block drivers use - * eventually) doesn't report the necessary information or - * give us the necessary control. So we make the disk vanish. - */ - ide_device_utterly_broken(s); - return; - } - else - s->status = READY_STAT; - ide_set_irq(s); -} - static void ide_atapi_cmd_ok(IDEState *s) { s->error = 0;