Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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
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