summaryrefslogtreecommitdiffstats
path: root/sbin/mdmfs
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2007-03-07 07:45:38 +0000
committeryar <yar@FreeBSD.org>2007-03-07 07:45:38 +0000
commit4a44f1cc346e0eda19c74e22a61870ca30b4c799 (patch)
treeb253ae8f4f09679a1c92752ba0dcdbf1472d8600 /sbin/mdmfs
parent518c2d5e63acff4068f71503008107453a4d3d14 (diff)
downloadFreeBSD-src-4a44f1cc346e0eda19c74e22a61870ca30b4c799.zip
FreeBSD-src-4a44f1cc346e0eda19c74e22a61870ca30b4c799.tar.gz
Don't leave a NULL value in mdsuffix when a particular md
unit w/o suffix is specified. It had better be an empty string as it will be passed to a printf-like function that builds the command line to run. PR: kern/109863 MFC after: 1 week
Diffstat (limited to 'sbin/mdmfs')
-rw-r--r--sbin/mdmfs/mdmfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c
index c552f56..acc6e00 100644
--- a/sbin/mdmfs/mdmfs.c
+++ b/sbin/mdmfs/mdmfs.c
@@ -246,9 +246,8 @@ main(int argc, char **argv)
ul = strtoul(unitstr, &p, 10);
if (ul == ULONG_MAX)
errx(1, "bad device unit: %s", unitstr);
- if (*p != '\0')
- mdsuffix = p;
unit = ul;
+ mdsuffix = p; /* can be empty */
}
mtpoint = argv[1];
OpenPOWER on IntegriCloud