summaryrefslogtreecommitdiffstats
path: root/sbin/fdisk
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-04-29 21:24:27 +0000
committerphk <phk@FreeBSD.org>2005-04-29 21:24:27 +0000
commit691e072f685238f1331b5b1d3539e4310069599c (patch)
treebf4a16e84ab48fd7f618c97824191874e8258c66 /sbin/fdisk
parenta8688612688a696439137cf2f259bb664452af9f (diff)
downloadFreeBSD-src-691e072f685238f1331b5b1d3539e4310069599c.zip
FreeBSD-src-691e072f685238f1331b5b1d3539e4310069599c.tar.gz
If we resort to opening a slice instead of the base device, do so with
the correct mode for our arguments.
Diffstat (limited to 'sbin/fdisk')
-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 1d3bcf8..ed71867 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;
OpenPOWER on IntegriCloud