From 0a7fc983ceb21ee45a9ad4dbc9163394f8aa0fb6 Mon Sep 17 00:00:00 2001 From: Naphtali Sprei Date: Thu, 21 Jan 2010 14:40:41 +0200 Subject: Read-only device changed to opens it's file for read-only. Signed-off-by: Naphtali Sprei Signed-off-by: Anthony Liguori --- block/parallels.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'block/parallels.c') diff --git a/block/parallels.c b/block/parallels.c index 63b67380ad..41b3a7c9db 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -74,11 +74,9 @@ static int parallels_open(BlockDriverState *bs, const char *filename, int flags) int fd, i; struct parallels_header ph; - fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE); + fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE); if (fd < 0) { - fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE); - if (fd < 0) - return -1; + return -1; } bs->read_only = 1; // no write support yet -- cgit v1.2.3