summaryrefslogtreecommitdiff
path: root/block/bochs.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/bochs.c')
-rw-r--r--block/bochs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/bochs.c b/block/bochs.c
index 34892582ef..fb83594dba 100644
--- a/block/bochs.c
+++ b/block/bochs.c
@@ -116,11 +116,9 @@ static int bochs_open(BlockDriverState *bs, const char *filename, int flags)
struct bochs_header bochs;
struct bochs_header_v1 header_v1;
- fd = open(filename, O_RDWR | O_BINARY);
+ fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0) {
- fd = open(filename, O_RDONLY | O_BINARY);
- if (fd < 0)
- return -1;
+ return -1;
}
bs->read_only = 1; // no write support yet