From owner-freebsd-current Thu Mar 2 15:46: 0 2000 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id 0FEED37BDE1 for ; Thu, 2 Mar 2000 15:45:53 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.freebsd.dk [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.3) with ESMTP id AAA00695; Fri, 3 Mar 2000 00:45:46 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Warner Losh Cc: current@freebsd.org Subject: Re: Please review: fdisk -e -> -I In-reply-to: Your message of "Thu, 02 Mar 2000 13:33:41 MST." <200003022033.NAA17898@harmony.village.org> Date: Fri, 03 Mar 2000 00:45:46 +0100 Message-ID: <693.952040746@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG You have my OK to change the option, but you'll need Jordans OK to commit it. Poul-Henning In message <200003022033.NAA17898@harmony.village.org>, Warner Losh writes: > >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); > -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message