From owner-p4-projects@FreeBSD.ORG Fri Aug 22 11:50:19 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 17B3316A4C1; Fri, 22 Aug 2003 11:50:19 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C436116A4BF for ; Fri, 22 Aug 2003 11:50:18 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37B9F43FA3 for ; Fri, 22 Aug 2003 11:50:14 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h7MIoE0U031502 for ; Fri, 22 Aug 2003 11:50:14 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h7MIoDNA031499 for perforce@freebsd.org; Fri, 22 Aug 2003 11:50:13 -0700 (PDT) Date: Fri, 22 Aug 2003 11:50:13 -0700 (PDT) Message-Id: <200308221850.h7MIoDNA031499@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 36692 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2003 18:50:20 -0000 X-List-Received-Date: Fri, 22 Aug 2003 18:50:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=36692 Change 36692 by rwatson@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*/