From owner-freebsd-current Thu Mar 2 12:34: 4 2000 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 5185837B51E; Thu, 2 Mar 2000 12:33:54 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id NAA38673; Thu, 2 Mar 2000 13:33:52 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id NAA17898; Thu, 2 Mar 2000 13:33:41 -0700 (MST) Message-Id: <200003022033.NAA17898@harmony.village.org> To: current@freebsd.org Cc: phk@freebsd.org Subject: Please review: fdisk -e -> -I Date: Thu, 02 Mar 2000 13:33:41 -0700 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Given that OpenBSD had the -e flag to fdisk first, and that it means edit there and that disklabel -e means edit, I'd like to apply the following patch to -current before it becomes 4.0. If we wait, we'll have compatibility problems. Right now it is too easy to shoot yourself in the foot with this. When this was hashed out here, the idea was met with wide spread support, even fiven the advanced nature of the freeze. I take that support to mean that this is something that would be a good idea to do for 4.0. Comments? Warner Index: fdisk.8 =================================================================== RCS file: /home/imp/FreeBSD/CVS/src/sbin/i386/fdisk/fdisk.8,v retrieving revision 1.16 diff -u -r1.16 fdisk.8 --- fdisk.8 1999/08/28 00:13:01 1.16 +++ fdisk.8 2000/03/02 20:29:12 @@ -8,7 +8,7 @@ .Nd PC partition table maintenance program .Sh SYNOPSIS .Nm fdisk -.Op Fl Baeitu +.Op Fl BIaitu .Op Fl b Ar bootcode .Op Fl 1234 .Op Ar disk @@ -62,7 +62,7 @@ if .Fl f is given. -.It Fl e +.It Fl I Initialize the contents of sector 0 with one FreeBSD slice covering the entire disk. .It Fl f Ar configfile Set partition values using the file Index: fdisk.c =================================================================== RCS file: /home/imp/FreeBSD/CVS/src/sbin/i386/fdisk/fdisk.c,v retrieving revision 1.34 diff -u -r1.34 fdisk.c --- fdisk.c 2000/02/11 11:25:23 1.34 +++ fdisk.c 2000/03/02 20:31:56 @@ -120,7 +120,7 @@ static int B_flag = 0; /* replace boot code */ static int a_flag = 0; /* set active partition */ static char *b_flag = NULL; /* path to boot code */ -static int e_flag = 0; /* use entire disk for FreeBSD */ +static int I_flag = 0; /* use entire disk for FreeBSD */ static int i_flag = 0; /* replace partition data */ static int u_flag = 0; /* update partition data */ static int t_flag = 0; /* test only, if f_flag is given */ @@ -216,7 +216,7 @@ { int c, i; - while ((c = getopt(argc, argv, "Bab:ef:ituv1234")) != -1) + while ((c = getopt(argc, argv, "BIab:f:ituv1234")) != -1) switch (c) { case 'B': B_flag = 1; @@ -227,8 +227,8 @@ case 'b': b_flag = optarg; break; - case 'e': - e_flag = 1; + case 'I': + I_flag = 1; break; case 'f': f_flag = optarg; @@ -292,7 +292,7 @@ printf("******* Working on device %s *******\n",disk); - if (e_flag) + if (I_flag) { struct dos_partition *partp; @@ -648,7 +648,7 @@ if ( !(st.st_mode & S_IFCHR) ) warnx("device %s is not character special", disk); if ((fd = open(disk, - a_flag || e_flag || B_flag || u_flag ? O_RDWR : O_RDONLY)) == -1) { + a_flag || I_flag || B_flag || u_flag ? O_RDWR : O_RDONLY)) == -1) { if(errno == ENXIO) return -2; warnx("can't open device %s", disk); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message