aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig/mdconfig.c
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2005-01-22 20:02:01 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2005-01-22 20:02:01 +0000
commit0d79319a76a9559ccadba0bd1bfd09870895c91d (patch)
treef8f75f9a5da4677334b7fa13a9a4f59ed5612698 /sbin/mdconfig/mdconfig.c
parent0447ccf32017989c2917a99ea8c3bf92d9d8002f (diff)
downloadsrc-0d79319a76a9559ccadba0bd1bfd09870895c91d.tar.gz
src-0d79319a76a9559ccadba0bd1bfd09870895c91d.zip
Allow to specify device size in bytes.
MFC after: 1 week
Notes
Notes: svn path=/head/; revision=140627
Diffstat (limited to 'sbin/mdconfig/mdconfig.c')
-rw-r--r--sbin/mdconfig/mdconfig.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 0e6d81804e20..b2d92667427e 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -178,6 +178,8 @@ main(int argc, char **argv)
mdio.md_mediasize = (off_t)strtoumax(optarg, &p, 0);
if (p == NULL || *p == '\0')
mdio.md_mediasize *= DEV_BSIZE;
+ else if (*p == 'b' || *p == 'B')
+ ; /* do nothing */
else if (*p == 'k' || *p == 'K')
mdio.md_mediasize <<= 10;
else if (*p == 'm' || *p == 'M')