summaryrefslogtreecommitdiffstats
path: root/usr.sbin/boot0cfg
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/boot0cfg')
-rw-r--r--usr.sbin/boot0cfg/boot0cfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c
index 21f0ce7..6783360 100644
--- a/usr.sbin/boot0cfg/boot0cfg.c
+++ b/usr.sbin/boot0cfg/boot0cfg.c
@@ -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;
OpenPOWER on IntegriCloud