diff options
author | phk <phk@FreeBSD.org> | 2005-04-29 21:24:27 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-04-29 21:24:27 +0000 |
commit | 691e072f685238f1331b5b1d3539e4310069599c (patch) | |
tree | bf4a16e84ab48fd7f618c97824191874e8258c66 /sbin/fdisk | |
parent | a8688612688a696439137cf2f259bb664452af9f (diff) | |
download | FreeBSD-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.c | 2 |
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; |