Open device R/W for ioctl modifications.
This commit is contained in:
parent
632a1bc62b
commit
286275091a
@ -270,7 +270,7 @@ write_mbr(const char *fname, int flags, u_int8_t *mbr, int mbr_size)
|
||||
#ifdef DIOCSMBR
|
||||
for (p = 1; p < 5; p++) {
|
||||
asprintf(&s, "%ss%d", fname, p);
|
||||
fd = open(s, O_RDONLY);
|
||||
fd = open(s, O_RDWR);
|
||||
if (fd < 0) {
|
||||
free(s);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user