diff options
author | obrien <obrien@FreeBSD.org> | 2000-04-20 08:00:29 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-04-20 08:00:29 +0000 |
commit | fd604ada090518363ca1e7006a95289d56558f90 (patch) | |
tree | e8f790b2d90c4eeee6dcf91a46992d9b97527ab3 /sbin | |
parent | f35cf91bd3853c822ee47f216b6514574628f3c5 (diff) | |
download | FreeBSD-src-fd604ada090518363ca1e7006a95289d56558f90.zip FreeBSD-src-fd604ada090518363ca1e7006a95289d56558f90.tar.gz |
Found more places where 'r' was being prepended to the device name.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/bsdlabel/bsdlabel.c | 12 | ||||
-rw-r--r-- | sbin/disklabel/disklabel.c | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index 8715538..b795e29 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -133,13 +133,14 @@ enum { UNSPEC, EDIT, NOWRITE, READ, RESTORE, WRITE, WRITEABLE, WRITEBOOT } op = UNSPEC; +int mflag; int rflag; #ifdef DEBUG int debug; -#define OPTIONS "BNRWb:ders:w" +#define OPTIONS "BNRWb:demrs:w" #else -#define OPTIONS "BNRWb:ers:w" +#define OPTIONS "BNRWb:emrs:w" #endif int @@ -187,6 +188,9 @@ main(argc, argv) usage(); op = EDIT; break; + case 'm': + ++mflag; + break; case 'r': ++rflag; break; @@ -232,7 +236,7 @@ main(argc, argv) specname = dkname; f = open(specname, op == READ ? O_RDONLY : O_RDWR); if (f < 0 && errno == ENOENT && dkname[0] != '/') { - (void)sprintf(specname, "%sr%s", _PATH_DEV, dkname); + (void)sprintf(specname, "%s%s", _PATH_DEV, dkname); np = namebuf + strlen(specname) + 1; f = open(specname, op == READ ? O_RDONLY : O_RDWR); } @@ -1342,7 +1346,7 @@ getvirginlabel(void) warnx("\"auto\" requires the usage of a canonical disk name"); return (NULL); } - (void)snprintf(namebuf, BBSIZE, "%sr%s", _PATH_DEV, dkname); + (void)snprintf(namebuf, BBSIZE, "%s%s", _PATH_DEV, dkname); if ((f = open(namebuf, O_RDONLY)) == -1) { warn("cannot open %s", namebuf); return (NULL); diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 8715538..b795e29 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -133,13 +133,14 @@ enum { UNSPEC, EDIT, NOWRITE, READ, RESTORE, WRITE, WRITEABLE, WRITEBOOT } op = UNSPEC; +int mflag; int rflag; #ifdef DEBUG int debug; -#define OPTIONS "BNRWb:ders:w" +#define OPTIONS "BNRWb:demrs:w" #else -#define OPTIONS "BNRWb:ers:w" +#define OPTIONS "BNRWb:emrs:w" #endif int @@ -187,6 +188,9 @@ main(argc, argv) usage(); op = EDIT; break; + case 'm': + ++mflag; + break; case 'r': ++rflag; break; @@ -232,7 +236,7 @@ main(argc, argv) specname = dkname; f = open(specname, op == READ ? O_RDONLY : O_RDWR); if (f < 0 && errno == ENOENT && dkname[0] != '/') { - (void)sprintf(specname, "%sr%s", _PATH_DEV, dkname); + (void)sprintf(specname, "%s%s", _PATH_DEV, dkname); np = namebuf + strlen(specname) + 1; f = open(specname, op == READ ? O_RDONLY : O_RDWR); } @@ -1342,7 +1346,7 @@ getvirginlabel(void) warnx("\"auto\" requires the usage of a canonical disk name"); return (NULL); } - (void)snprintf(namebuf, BBSIZE, "%sr%s", _PATH_DEV, dkname); + (void)snprintf(namebuf, BBSIZE, "%s%s", _PATH_DEV, dkname); if ((f = open(namebuf, O_RDONLY)) == -1) { warn("cannot open %s", namebuf); return (NULL); |