Revision 0a7fc983
b/block/bochs.c | ||
---|---|---|
116 | 116 |
struct bochs_header bochs; |
117 | 117 |
struct bochs_header_v1 header_v1; |
118 | 118 |
|
119 |
fd = open(filename, O_RDWR | O_BINARY);
|
|
119 |
fd = open(filename, O_RDONLY | O_BINARY);
|
|
120 | 120 |
if (fd < 0) { |
121 |
fd = open(filename, O_RDONLY | O_BINARY); |
|
122 |
if (fd < 0) |
|
123 |
return -1; |
|
121 |
return -1; |
|
124 | 122 |
} |
125 | 123 |
|
126 | 124 |
bs->read_only = 1; // no write support yet |
b/block/parallels.c | ||
---|---|---|
74 | 74 |
int fd, i; |
75 | 75 |
struct parallels_header ph; |
76 | 76 |
|
77 |
fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
|
|
77 |
fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
|
|
78 | 78 |
if (fd < 0) { |
79 |
fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE); |
|
80 |
if (fd < 0) |
|
81 |
return -1; |
|
79 |
return -1; |
|
82 | 80 |
} |
83 | 81 |
|
84 | 82 |
bs->read_only = 1; // no write support yet |
Also available in: Unified diff