Rename DriveInfo.onerror to on_write_error
authorKevin Wolf <kwolf@redhat.com>
Fri, 27 Nov 2009 12:25:36 +0000 (13:25 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 3 Dec 2009 21:25:57 +0000 (15:25 -0600)
Either rename variables and functions to refer to write errors (which is what
they actually do) or introduce a parameter to distinguish reads and writes.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c

diff --git a/vl.c b/vl.c
index d6f196cff560be375d0903fdda14ba0b1270fa52..96ab0202552f93eed489b25af8e0e759e320c1a5 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1964,6 +1964,10 @@ BlockInterfaceErrorAction drive_get_on_error(
 {
     DriveInfo *dinfo;
 
+    if (is_read) {
+        return BLOCK_ERR_REPORT;
+    }
+
     QTAILQ_FOREACH(dinfo, &drives, next) {
         if (dinfo->bdrv == bdrv)
             return is_read ? dinfo->on_read_error : dinfo->on_write_error;