diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-02-26 01:14:27 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-02-26 01:14:27 +0000 |
commit | f0df387d8416e8fa18a3e6e923a4b45b5e8771d4 (patch) | |
tree | fc9111877d18382c6d76139cc79472cce73691e5 /sbin/newfs/newfs.c | |
parent | 1de257deb3229812024de5861eb0aaa41e471448 (diff) | |
download | FreeBSD-src-f0df387d8416e8fa18a3e6e923a4b45b5e8771d4.zip FreeBSD-src-f0df387d8416e8fa18a3e6e923a4b45b5e8771d4.tar.gz |
Add a "-l" flag to newfs, which sets the FS_MULTILABEL flag. This
permits users of newfs to set the multilabel flag on UFS1 and UFS2
file systems from inception without using tunefs.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, McAfee Research
Diffstat (limited to 'sbin/newfs/newfs.c')
-rw-r--r-- | sbin/newfs/newfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index aff266e..ab90cf4 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -120,6 +120,7 @@ int Oflag = 2; /* file system format (1 => UFS1, 2 => UFS2) */ int Rflag; /* regression test */ int Uflag; /* enable soft updates for file system */ int Eflag = 0; /* exit in middle of newfs for testing */ +int lflag; /* enable multilabel for file system */ quad_t fssize; /* file system size */ int sectorsize; /* bytes/sector */ int realsectorsize; /* bytes/sector in hardware */ @@ -157,7 +158,7 @@ main(int argc, char *argv[]) off_t mediasize; while ((ch = getopt(argc, argv, - "EL:NO:RS:T:Ua:b:c:d:e:f:g:h:i:m:o:s:")) != -1) + "EL:NO:RS:T:Ua:b:c:d:e:f:g:h:i:lm:o:s:")) != -1) switch (ch) { case 'E': Eflag++; @@ -239,6 +240,9 @@ main(int argc, char *argv[]) if ((density = atoi(optarg)) <= 0) errx(1, "%s: bad bytes per inode", optarg); break; + case 'l': + lflag = 1; + break; case 'm': if ((minfree = atoi(optarg)) < 0 || minfree > 99) errx(1, "%s: bad free space %%", optarg); |