aboutsummaryrefslogtreecommitdiff
path: root/sbin/fdisk/fdisk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fdisk/fdisk.c')
-rw-r--r--sbin/fdisk/fdisk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c
index 1d3bcf889aa6..ed71867648c1 100644
--- a/sbin/fdisk/fdisk.c
+++ b/sbin/fdisk/fdisk.c
@@ -717,7 +717,7 @@ open_disk(int flag)
return -3;
for (p = 1; p < 5; p++) {
asprintf(&s, "%ss%d", disk, p);
- fdw = open(s, O_RDONLY);
+ fdw = open(s, rwmode);
free(s);
if (fdw == -1)
continue;