diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-03-03 13:05:00 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-03-03 13:05:00 +0000 |
commit | ebe789d61c70e3c9dc31441e9d59f051b40ba30b (patch) | |
tree | ebeb4dc8a6258d6e27bf80318a7c535c404b73c1 /sbin/mdconfig | |
parent | a8b182112da70fe234189b384a13d8f3bcb36731 (diff) | |
download | src-ebe789d61c70e3c9dc31441e9d59f051b40ba30b.tar.gz src-ebe789d61c70e3c9dc31441e9d59f051b40ba30b.zip |
Add a "-S sectorsize" option to enable Kirk to find a bug :-)
Notes
Notes:
svn path=/head/; revision=111818
Diffstat (limited to 'sbin/mdconfig')
-rw-r--r-- | sbin/mdconfig/mdconfig.8 | 3 | ||||
-rw-r--r-- | sbin/mdconfig/mdconfig.c | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sbin/mdconfig/mdconfig.8 b/sbin/mdconfig/mdconfig.8 index 3b3583e986be..2ed1bdd6ad21 100644 --- a/sbin/mdconfig/mdconfig.8 +++ b/sbin/mdconfig/mdconfig.8 @@ -57,6 +57,7 @@ .Oc .Op Fl s Ar size .Op Fl f Ar file +.Op Fl S Ar sectorsize .Op Fl u Ar unit .Nm .Fl d @@ -111,6 +112,8 @@ or .Cm g which denotes kilobyte, megabyte and gigabyte respectively. +.It Fl S Ar sectorsize +Sectorsize to use for malloc backed device. .It Fl o Oo Cm no Oc Ns Ar option Set or reset options. .Bl -tag -width indent diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index f92e6a989c16..8ead3ad61391 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -37,7 +37,7 @@ void usage() { fprintf(stderr, "usage:\n"); - fprintf(stderr, "\tmdconfig -a -t type [-o [no]option]... [ -f file] [-s size] [-u unit]\n"); + fprintf(stderr, "\tmdconfig -a -t type [-o [no]option]... [ -f file] [-s size] [-S sectorsize] [-u unit]\n"); fprintf(stderr, "\tmdconfig -d -u unit\n"); fprintf(stderr, "\tmdconfig -l [-u unit]\n"); fprintf(stderr, "\t\ttype = {malloc, preload, vnode, swap}\n"); @@ -54,7 +54,7 @@ main(int argc, char **argv) int cmdline = 0; for (;;) { - ch = getopt(argc, argv, "ab:df:lo:s:t:u:"); + ch = getopt(argc, argv, "ab:df:lo:s:S:t:u:"); if (ch == -1) break; switch (ch) { @@ -130,6 +130,11 @@ main(int argc, char **argv) else errx(1, "Unknown option."); break; + case 'S': + if (cmdline != 2) + usage(); + mdio.md_secsize = strtoul(optarg, &p, 0); + break; case 's': if (cmdline != 2) usage(); |