diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xen_disk.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 95017a1f5c..9a466f3cc1 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -575,7 +575,7 @@ static void blk_alloc(struct XenDevice *xendev) static int blk_init(struct XenDevice *xendev) { struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); - int index, mode, qflags, have_barriers, info = 0; + int index, qflags, have_barriers, info = 0; char *h; /* read xenstore entries */ @@ -609,10 +609,8 @@ static int blk_init(struct XenDevice *xendev) /* read-only ? */ if (strcmp(blkdev->mode, "w") == 0) { - mode = O_RDWR; qflags = BDRV_O_RDWR; } else { - mode = O_RDONLY; qflags = 0; info |= VDISK_READONLY; } |