diff options
author | ru <ru@FreeBSD.org> | 2003-02-23 01:50:07 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2003-02-23 01:50:07 +0000 |
commit | 8a2a9091301e63f3908b341bcc984162e59a845d (patch) | |
tree | f358c6eb2249574e755e6d64c4b7ce42f92a6fb8 /sbin/tunefs/tunefs.c | |
parent | 5ecd4995a53ef83a3ed6cc0e466632e66719f8c0 (diff) | |
download | FreeBSD-src-8a2a9091301e63f3908b341bcc984162e59a845d.zip FreeBSD-src-8a2a9091301e63f3908b341bcc984162e59a845d.tar.gz |
Sort options.
Diffstat (limited to 'sbin/tunefs/tunefs.c')
-rw-r--r-- | sbin/tunefs/tunefs.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index a861248..418fcae 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -96,28 +96,12 @@ main(int argc, char *argv[]) if (argc < 3) usage(); found_arg = 0; /* at least one arg is required */ - while ((ch = getopt(argc, argv, "AL:a:e:f:l:m:n:o:ps:")) != -1) + while ((ch = getopt(argc, argv, "Aa:e:f:L:l:m:n:o:ps:")) != -1) switch (ch) { case 'A': found_arg = 1; Aflag++; break; - case 'L': - found_arg = 1; - name = "volume label"; - Lvalue = optarg; - i = -1; - while (isalnum(Lvalue[++i])); - if (Lvalue[i] != '\0') { - errx(10, "bad %s. Valid characters are alphanumerics.", - name); - } - if (strlen(Lvalue) >= MAXVOLLEN) { - errx(10, "bad %s. Length is longer than %d.", - name, MAXVOLLEN - 1); - } - Lflag = 1; - break; case 'a': found_arg = 1; name = "ACLs"; @@ -144,6 +128,22 @@ main(int argc, char *argv[]) errx(10, "%s must be >= 1 (was %s)", name, optarg); fflag = 1; break; + case 'L': + found_arg = 1; + name = "volume label"; + Lvalue = optarg; + i = -1; + while (isalnum(Lvalue[++i])); + if (Lvalue[i] != '\0') { + errx(10, "bad %s. Valid characters are alphanumerics.", + name); + } + if (strlen(Lvalue) >= MAXVOLLEN) { + errx(10, "bad %s. Length is longer than %d.", + name, MAXVOLLEN - 1); + } + Lflag = 1; + break; case 'l': found_arg = 1; name = "multilabel MAC file system"; @@ -376,8 +376,8 @@ void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n", -"usage: tunefs [-A] [-L volname] [-a enable | disable] [-e maxbpg]", -" [-f avgfilesize] [-l enable | disable] [-m minfree]", +"usage: tunefs [-A] [-a enable | disable] [-e maxbpg] [-f avgfilesize]", +" [-L volname] [-l enable | disable] [-m minfree]", " [-n enable | disable] [-o space | time] [-p]", " [-s avgfpdir] special | filesystem"); exit(2); |