From owner-p4-projects@FreeBSD.ORG Fri Aug 22 11:50:20 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2830C16A4D7; Fri, 22 Aug 2003 11:50:20 -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 1969916A4BF for ; Fri, 22 Aug 2003 11:50:19 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C13C243FD7 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 h7MIoE0U031510 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 h7MIoEuA031505 for perforce@freebsd.org; Fri, 22 Aug 2003 11:50:14 -0700 (PDT) Date: Fri, 22 Aug 2003 11:50:14 -0700 (PDT) Message-Id: <200308221850.h7MIoEuA031505@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 36693 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:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=36693 Change 36693 by rwatson@rwatson_tislabs on 2003/08/22 11:50:11 Hypothetical support for specifying the -l flag in sysinstall when creating new file systems by hitting "L" in the labeling tool. Affected files ... .. //depot/projects/trustedbsd/mac/usr.sbin/sysinstall/install.c#21 edit .. //depot/projects/trustedbsd/mac/usr.sbin/sysinstall/label.c#19 edit .. //depot/projects/trustedbsd/mac/usr.sbin/sysinstall/sysinstall.h#18 edit Differences ... ==== //depot/projects/trustedbsd/mac/usr.sbin/sysinstall/install.c#21 (text+ko) ==== @@ -885,10 +885,11 @@ if (pi->do_newfs) { switch(pi->newfs_type) { case NEWFS_UFS: - snprintf(buffer, LINE_MAX, "%s %s %s %s %s", + snprintf(buffer, LINE_MAX, "%s %s %s %s %s %s", NEWFS_UFS_CMD, pi->newfs_data.newfs_ufs.softupdates ? "-U" : "", pi->newfs_data.newfs_ufs.ufs1 ? "-O1" : "-O2", + pi->newfs_data.newfs_ufs.multilabel ? "-l" : "", pi->newfs_data.newfs_ufs.user_options, dname); break; ==== //depot/projects/trustedbsd/mac/usr.sbin/sysinstall/label.c#19 (text+ko) ==== @@ -463,9 +463,10 @@ switch (p->newfs_type) { case NEWFS_UFS: - snprintf(buffer, NEWFS_CMD_ARGS_MAX, "%s %s %s %s", + snprintf(buffer, NEWFS_CMD_ARGS_MAX, "%s %s %s %s %s", NEWFS_UFS_CMD, p->newfs_data.newfs_ufs.softupdates ? "-U" : "", p->newfs_data.newfs_ufs.ufs1 ? "-O1" : "-O2", + p->newfs_data.newfs_ufs.multilabel ? "-l" : "", p->newfs_data.newfs_ufs.user_options); break; case NEWFS_MSDOS: @@ -519,7 +520,8 @@ static void print_label_chunks(void) { - int i, j, spaces, srow, prow, pcol; + int j, spaces, srow, prow, pcol; + int needspaces = 0, i; int sz; char clrmsg[80]; int ChunkPartStartRow; @@ -689,15 +691,22 @@ switch (pi->newfs_type) { case NEWFS_UFS: + strcpy(newfs, NEWFS_UFS_STRING); if (pi->newfs_data.newfs_ufs.ufs1) strcat(newfs, "1"); else strcat(newfs, "2"); if (pi->newfs_data.newfs_ufs.softupdates) - strcat(newfs, "+S"); + strcat(newfs, "S"); + else + needspaces++; + if (pi->newfs_data.newfs_ufs.multilabel) + strcat(newfs, "L"); else - strcat(newfs, " "); + needspaces++; + for (j = 0; j < needspaces; i++) + strcat(newfs, " "); break; case NEWFS_MSDOS: @@ -1078,6 +1087,19 @@ record_label_chunks(devs, dev); break; + case 'L': /* toggle multilabel */ + if (label_chunk_info[here].type == PART_FILESYSTEM) { + PartInfo *pi = + ((PartInfo *)label_chunk_info[here].c->private_data); + + if ((pi != NULL) && + (pi->newfs_type == NEWFS_UFS)) { + pi->newfs_data.newfs_ufs.multilabel = + !pi->newfs_data.newfs_ufs.multilabel; + } else msg = MSG_NOT_APPLICABLE; + } else msg = MSG_NOT_APPLICABLE; + break; + case 'M': /* mount */ switch(label_chunk_info[here].type) { case PART_SLICE: ==== //depot/projects/trustedbsd/mac/usr.sbin/sysinstall/sysinstall.h#18 (text+ko) ====