提交 0a7fc983 编写于 作者: N Naphtali Sprei 提交者: Anthony Liguori

Read-only device changed to opens it's file for read-only.

Signed-off-by: NNaphtali Sprei <nsprei@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 058fc8c7
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册