PERFORCE change 36692 for review
Robert Watson
rwatson at FreeBSD.org
Fri Aug 22 18:50:13 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=36692
Change 36692 by rwatson at rwatson_tislabs on 2003/08/22 11:49:40
Permit multilabel flag to be specified for a file system on
creation using the newfs -l flag.
Affected files ...
.. //depot/projects/trustedbsd/mac/sbin/newfs/mkfs.c#17 edit
.. //depot/projects/trustedbsd/mac/sbin/newfs/newfs.8#14 edit
.. //depot/projects/trustedbsd/mac/sbin/newfs/newfs.c#14 edit
.. //depot/projects/trustedbsd/mac/sbin/newfs/newfs.h#8 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sbin/newfs/mkfs.c#17 (text+ko) ====
@@ -138,6 +138,8 @@
sblock.fs_flags |= FS_DOSOFTDEP;
if (Lflag)
strlcpy(sblock.fs_volname, volumelabel, MAXVOLLEN);
+ if (lflag)
+ sblock.fs_flags |= FS_MULTILABEL;
/*
* Validate the given file system size.
* Verify that its last block can actually be accessed.
==== //depot/projects/trustedbsd/mac/sbin/newfs/newfs.8#14 (text+ko) ====
@@ -40,7 +40,7 @@
.Nd construct a new UFS1/UFS2 file system
.Sh SYNOPSIS
.Nm
-.Op Fl NU
+.Op Fl NUl
.Op Fl L Ar volname
.Op Fl O Ar filesystem-type
.Op Fl S Ar sector-size
@@ -149,6 +149,8 @@
to create more inodes a smaller number should be given.
One inode is required for each distinct file, so this value effectively
specifies the average file size on the file system.
+.It Fl l
+Enables multilabel MAC on the new file system.
.It Fl m Ar free-space
The percentage of space reserved from normal users; the minimum free
space threshold.
==== //depot/projects/trustedbsd/mac/sbin/newfs/newfs.c#14 (text+ko) ====
@@ -119,6 +119,7 @@
int Oflag = 2; /* file system format (1 => UFS1, 2 => UFS2) */
int Rflag; /* regression test */
int Uflag; /* enable soft updates for file system */
+int lflag; /* enable multilabel for file system */
quad_t fssize; /* file system size */
int sectorsize; /* bytes/sector */
int realsectorsize; /* bytes/sector in hardware */
@@ -156,7 +157,7 @@
off_t mediasize;
while ((ch = getopt(argc, argv,
- "L:NO:RS:T:Ua:b:c:d:e:f:g:h:i:m:o:s:")) != -1)
+ "L:NO:RS:T:Ua:b:c:d:e:f:g:h:i:lm:o:s:")) != -1)
switch (ch) {
case 'L':
volumelabel = optarg;
@@ -235,6 +236,9 @@
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);
==== //depot/projects/trustedbsd/mac/sbin/newfs/newfs.h#8 (text+ko) ====
@@ -52,6 +52,7 @@
extern int Oflag; /* build UFS1 format file system */
extern int Rflag; /* regression test */
extern int Uflag; /* enable soft updates for file system */
+extern int lflag; /* enable multilabel MAC for file system */
extern quad_t fssize; /* file system size */
extern int sectorsize; /* bytes/sector */
extern int realsectorsize; /* bytes/sector in hardware*/
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list