diff options
author | julian <julian@FreeBSD.org> | 1998-03-08 09:59:44 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1998-03-08 09:59:44 +0000 |
commit | 10c5ccc30ae8155c4d8bd25aeffd9ed0e476c387 (patch) | |
tree | d2ed60b6b9462fe6eebf4796c39dfcf3cec39874 /sbin/tunefs | |
parent | 1d108bde84c6b5fa5d119363c4f401cc3dcc8110 (diff) | |
download | FreeBSD-src-10c5ccc30ae8155c4d8bd25aeffd9ed0e476c387.zip FreeBSD-src-10c5ccc30ae8155c4d8bd25aeffd9ed0e476c387.tar.gz |
Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)
Submitted by: Kirk McKusick (mcKusick@mckusick.com)
Obtained from: WHistle development tree
Diffstat (limited to 'sbin/tunefs')
-rw-r--r-- | sbin/tunefs/tunefs.8 | 1 | ||||
-rw-r--r-- | sbin/tunefs/tunefs.c | 23 |
2 files changed, 23 insertions, 1 deletions
diff --git a/sbin/tunefs/tunefs.8 b/sbin/tunefs/tunefs.8 index df161a9..3d01447 100644 --- a/sbin/tunefs/tunefs.8 +++ b/sbin/tunefs/tunefs.8 @@ -46,6 +46,7 @@ .Op Fl m Ar minfree .Op Fl p .Bk -words +.Op Fl n Ar soft_dependency_enabling .Op Fl o Ar optimize_preference .Ek .Op Ar special | Ar filesys diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 1802f22..b1df99b 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -81,7 +81,7 @@ main(argc, argv) int argc; char *argv[]; { - char *cp, *special, *name; + char *cp, *special, *name, *action; struct stat st; int i; int Aflag = 0; @@ -182,6 +182,24 @@ again: warnx(OPTWARN, "space", "<", MINFREE); continue; + case 'n': + name = "soft updates"; + if (argc < 1) + errx(10, "-s: missing %s", name); + argc--, argv++; + if (strcmp(*argv, "enable") == 0) { + sblock.fs_flags |= FS_DOSOFTDEP; + action = "set"; + } else if (strcmp(*argv, "disable") == 0) { + sblock.fs_flags &= ~FS_DOSOFTDEP; + action = "cleared"; + } else { + errx(10, "bad %s (options are %s)", + name, "`enable' or `disable'"); + } + warnx("%s %s", name, action); + continue; + case 'o': name = "optimization preference"; if (argc < 1) @@ -237,6 +255,7 @@ usage() fprintf(stderr, "\t-d rotational delay between contiguous blocks\n"); fprintf(stderr, "\t-e maximum blocks per file in a cylinder group\n"); fprintf(stderr, "\t-m minimum percentage of free space\n"); + fprintf(stderr, "\t-n soft updates (`enable' or `disable')\n"); fprintf(stderr, "\t-o optimization preference (`space' or `time')\n"); fprintf(stderr, "\t-p no change - just prints current tuneable settings\n"); exit(2); @@ -261,6 +280,8 @@ getsb(fs, file) void printfs() { + warnx("soft updates: (-n) %s", + (sblock.fs_flags & FS_DOSOFTDEP)? "enabled" : "disabled"); warnx("maximum contiguous block count: (-a) %d", sblock.fs_maxcontig); warnx("rotational delay between contiguous blocks: (-d) %d ms", |