From owner-freebsd-qa@FreeBSD.ORG Sun Sep 5 16:49:01 2004 Return-Path: Delivered-To: freebsd-qa@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC49816A4CF for ; Sun, 5 Sep 2004 16:49:01 +0000 (GMT) Received: from mail.freebsd.org.cn (dns3.freebsd.org.cn [61.129.66.75]) by mx1.FreeBSD.org (Postfix) with SMTP id 4E4E643D48 for ; Sun, 5 Sep 2004 16:48:56 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: (qmail 20443 invoked by uid 0); 5 Sep 2004 16:45:33 -0000 Received: from unknown (HELO beastie.frontfree.net) (219.239.98.7) by mail.freebsd.org.cn with SMTP; 5 Sep 2004 16:45:33 -0000 Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id 8416E131015; Mon, 6 Sep 2004 00:48:41 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02236-07; Mon, 6 Sep 2004 00:48:37 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id 451FF130C42; Mon, 6 Sep 2004 00:48:36 +0800 (CST) To: FreeBSD-gnats-submit@freebsd.org From: Xin LI X-send-pr-version: 3.113 X-GNATS-Notify: Message-Id: <20040905164836.451FF130C42@beastie.frontfree.net> Date: Mon, 6 Sep 2004 00:48:36 +0800 (CST) X-Virus-Scanned: by amavisd-new at frontfree.net cc: re@FreeBSD.org cc: FreeBSD-qa@FreeBSD.org Subject: [PATCH] Only make one active partition in sysinstall(8) X-BeenThere: freebsd-qa@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Xin LI List-Id: FreeBSD Quality Assurance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2004 16:49:01 -0000 >Submitter-Id: current-users >Originator: Xin LI >Organization: The FreeBSD Simplified Chinese Project >Confidential: no >Synopsis: [PATCH] Only make one active partition in sysinstall(8) >Severity: serious >Priority: high >Category: bin >Class: sw-bug >Release: FreeBSD 5.2-delphij i386 >Environment: System: FreeBSD beastie.frontfree.net 5.2-delphij FreeBSD 5.2-delphij #0: Tue Aug 17 14:22:25 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 >Description: The handling of active partition in sysinstall(8) contained a minor flaw that allows two partitions to be marked as "active" in the same time. Before having a user shoot his or her feet, I think it would be a good idea not permitting this at all. >How-To-Repeat: Run sysinstall(8), Configure -> Fdisk -> (choose a disk having more than one partition) -> try to use "S" on more than one partition. >Fix: The attached patch would reset active states in the whole partition chain and hence won't allow two partitions to be set "active" at the same time. Might be a good candidate for the upcoming 5.3-RELEASE. Along with the functional patch I have added a "CHUNK_INFO_ENTRIES" define to make it easier to have consist code. --- patch-sysinstall::disks.c begins here --- Index: disks.c =================================================================== RCS file: /home/fcvs/src/usr.sbin/sysinstall/disks.c,v retrieving revision 1.152 diff -u -r1.152 disks.c --- disks.c 2 Aug 2004 23:18:48 -0000 1.152 +++ disks.c 5 Sep 2004 16:39:22 -0000 @@ -74,7 +74,8 @@ #define CHUNK_START_ROW 5 /* Where we keep track of MBR chunks */ -static struct chunk *chunk_info[16]; +#define CHUNK_INFO_ENTRIES 16 +static struct chunk *chunk_info[CHUNK_INFO_ENTRIES]; static int current_chunk; static void diskPartitionNonInteractive(Device *dev); @@ -312,6 +313,7 @@ { char *cp, *p; int rv, key = 0; + int i; Boolean chunking; char *msg = NULL; #ifdef PC98 @@ -535,6 +537,10 @@ break; case 'S': + /* Clear active states so we won't have two */ + for (i = 0; (chunk_info[i] != NULL) && (i < CHUNK_INFO_ENTRIES); i++) + chunk_info[i]->flags &= !CHUNK_ACTIVE; + /* Set Bootable */ chunk_info[current_chunk]->flags |= CHUNK_ACTIVE; break; --- patch-sysinstall::disks.c ends here --- From owner-freebsd-qa@FreeBSD.ORG Mon Sep 6 11:02:57 2004 Return-Path: Delivered-To: freebsd-qa@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A19C316A4CE for ; Mon, 6 Sep 2004 11:02:57 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BBE543D2F for ; Mon, 6 Sep 2004 11:02:57 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i86B2vur094423 for ; Mon, 6 Sep 2004 11:02:57 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i86B2up8094417 for freebsd-qa@freebsd.org; Mon, 6 Sep 2004 11:02:56 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 6 Sep 2004 11:02:56 GMT Message-Id: <200409061102.i86B2up8094417@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-qa@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-qa@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Quality Assurance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2004 11:02:57 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2002/10/25] misc/44471 qa [sysinstall] 4.6 install writes MBR even o [2003/02/16] bin/48341 qa [sysinstall] sysinstall deletes mbr altho 2 problems total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/02/24] bin/16948 qa [sysinstall] sysinstall/disklabel: bad pa o [2000/07/29] bin/20282 qa [sysinstall] sysinstall does not recover o [2001/03/16] bin/25851 qa [patch] security hole in anonymous FTP se o [2001/03/19] bin/25929 qa Can't use MAKEDEV in fixit mount o [2001/04/27] bin/26897 qa [sysinstall] 4.3R sysinstall fails to cre f [2001/05/29] i386/27729 qa the ls120 device "afd" does not show up u o [2001/08/02] bin/29375 qa [sysinstall] disk editor gets confused by o [2001/09/26] bin/30837 qa [sysinstall] sysinstall doesn't set the s o [2001/10/18] bin/31363 qa [sysinstall] "partition editor" silently o [2001/12/31] bin/33370 qa [sysinstall] post-configuration issue o [2002/03/15] bin/35925 qa [sysinstall] fixit floppy cannot be mount o [2002/03/29] bin/36508 qa [sysinstall] installation floppy bug (4.5 o [2002/04/08] bin/36911 qa [sysinstall] installation floppies miss a o [2002/04/30] i386/37585 qa [hang] System hangs on install at probing o [2002/05/26] bin/38582 qa [sysinstall] sysinstall sets newfs flag a o [2002/05/27] bin/38609 qa [sysinstall] sysinstall should know the s o [2002/07/06] bin/40260 qa [sysinstall] hang when detecting devices f [2002/07/16] bin/40656 qa [patch] [sysinstall] scripted deletion of o [2002/08/18] bin/41757 qa [sysinstall] sysinstall 4.6.x unstable o [2002/08/21] kern/41850 qa sysinstall fails to create root filesyste o [2002/11/21] bin/45565 qa [sysinstall] write error, filesystem full o [2003/01/23] bin/47384 qa [sysinstall] sysinstall ignores intended f [2003/01/25] i386/47451 qa 5.0 GENERIC(sysinstall CD) locks during b o [2003/06/27] bin/53839 qa [sysinstall] disklabel editor fails on po o [2003/09/14] kern/56873 qa [boot] system hangs on boot at Buslogic d o [2004/01/19] bin/61587 qa [patch] [sysinstall] installation problem o [2004/01/21] bin/61658 qa [sysinstall] 5.2R error "Add of package q o [2004/01/24] bin/61811 qa [sysinstall] 5.2 release no resolv.conf c o [2004/01/26] bin/61937 qa [sysinstall] cannot install 5.2-REL via s o [2004/02/05] bin/62367 qa [sysinstall] 5.2.1-RC installation proble o [2004/02/05] bin/62375 qa [sysinstall] sysinstall core dump o [2004/02/14] bin/62833 qa [sysinstall] can't install: integer divid o [2004/04/14] bin/65546 qa [sysinstall] 4.10-BETA fails to install f o [2004/05/20] bin/66950 qa [sysinstall] upgrading to 4.10-RC3: packa 34 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [1997/09/28] bin/4646 qa [sysinstall] can't fixit with an NFS-moun s [1998/07/10] bin/7232 qa [sysinstall] suggestion for FreeBSD insta o [1999/06/21] bin/12324 qa [sysinstall] fdisk partition editor is mi o [1999/11/22] bin/15038 qa [sysinstall] easy to not notice that sele o [1999/12/28] bin/15748 qa [sysinstall] upgrade removes /boot/kernel o [2000/02/08] conf/16584 qa Hostname field too small during install ( o [2000/10/15] conf/21994 qa Config of Anonftp (at install) always cre a [2000/12/09] bin/23402 qa [sysinstall] upgrade ought to check parti o [2001/02/06] bin/24907 qa [sysinstall] Options screen at MenuMedia o [2001/08/20] bin/29893 qa [sysinstall] suggestions for 4.4 sysinsta f [2002/04/16] bin/37137 qa [sysinstall] doesn't recognize version nu o [2002/04/16] bin/37160 qa [sysinstall] coredumps when trying to loa o [2002/05/14] bin/38056 qa [sysinstall] User (creation)'s "Member gr o [2002/05/24] bin/38477 qa [sysinstall] in Choose Distributions scre o [2002/05/24] bin/38478 qa [sysinstall] In Choose Distributions scre o [2002/05/24] bin/38480 qa [sysinstall] sysinstall should prompt for o [2002/05/26] bin/38583 qa [sysinstall] sysinstall installs crypto s f [2002/06/02] bin/38835 qa [sysinstall] sysinstall always installs c o [2002/06/20] bin/39574 qa [sysinstall] error mounting /dev/acd0c on o [2002/08/23] bin/41949 qa [sysinstall] sysinstall sorts /etc/rc.con o [2003/01/19] bin/47204 qa [sysinstall] base + XFree86 install fails o [2003/05/15] bin/52271 qa sysinstall panics in machine with no hard o [2003/10/14] bin/58008 qa [patch] [sysinstall] sysinstall postfix i o [2003/12/18] bin/60350 qa [sysinstall] in Choose Distributions scre o [2003/12/28] bin/60662 qa [sysinstall] 5.2 Anonymous FTP server out o [2004/01/12] bin/61264 qa [sysinstall] unable To Use VT100 Terminal o [2004/02/11] bin/62702 qa [sysinstall] backup of /etc and /root dur o [2004/02/11] bin/62711 qa [sysinstall] installation: "Insert Next C a [2004/02/28] bin/63480 qa /etc/mail/aliases has executable bit set, 29 problems total. From owner-freebsd-qa@FreeBSD.ORG Mon Sep 6 11:05:28 2004 Return-Path: Delivered-To: freebsd-qa@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34DC616A4CE for ; Mon, 6 Sep 2004 11:05:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6779F43D5D for ; Mon, 6 Sep 2004 11:05:22 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i86B5Mfl096106 for ; Mon, 6 Sep 2004 11:05:22 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i86B5Le3096100 for qa@freebsd.org; Mon, 6 Sep 2004 11:05:21 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 6 Sep 2004 11:05:21 GMT Message-Id: <200409061105.i86B5Le3096100@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: qa@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-qa@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Quality Assurance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2004 11:05:28 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2003/01/01] bin/46670 qa [sysinstall] 5.0-RC2 install leaves CD dr 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [1998/11/27] bin/8867 qa [sysinstall] [patch] /stand/sysinstall co o [1999/09/24] bin/13936 qa [sysinstall] no clear indication of how m o [1999/10/14] bin/14318 qa [sysinstall] sysinstall upon install has o [2000/03/22] bin/17546 qa [sysinstall] sysinstall does not let you o [2000/08/28] bin/20908 qa [sysinstall] /stand/sysinstall too limite o [2001/01/18] bin/24435 qa [libdisk] changing slice type causes Auto o [2001/04/28] bin/26919 qa sysinstall' fdisk can ONLY set bootable f o [2001/05/08] bin/27216 qa [sysinstall] can not get to shell prompt o [2001/05/21] bin/27483 qa make sysinstall ask for the keymap at ins o [2001/06/04] bin/27872 qa [sysinstall] "Load Config" hangs Compaq D o [2001/09/12] bin/30517 qa [sysinstall] using sysinstall with instal o [2001/11/26] conf/32288 qa After install: /etc/rc complains if crypt o [2002/02/28] bin/35400 qa [sysinstall] sysinstall could improve man o [2002/04/09] kern/36916 qa [libdisk] DOS active partition flag lost o [2002/05/14] bin/38055 qa [sysinstall] Groups (creation) item shoul o [2002/05/14] bin/38057 qa [sysinstall] "install" document doesn't d o [2002/05/27] bin/38610 qa Sysinstall should be able to mount ISO im o [2002/06/03] bin/38854 qa [sysinstall] resetting during setup cause o [2002/06/16] bin/39360 qa [sysinstall] if linux emu is added as a d o [2002/07/23] kern/40926 qa After Upgrading or Clean Installing 4.6, o [2002/08/01] bin/41238 qa [sysinstall] problems with FreeBSD instal o [2002/08/17] bin/41744 qa [sysinstall] cannot stop comat22 from bei o [2002/08/26] bin/42022 qa [sysinstall] non-interactive mode prompts o [2002/08/29] bin/42162 qa [sysinstall] installation crashes, md0c f o [2002/09/18] bin/42934 qa [sysinstall] installation procedure on in o [2002/09/20] kern/42977 qa FreeBSD installer doesn't probe past EISA o [2002/10/08] misc/43825 qa please remove object files in source (src o [2002/10/18] bin/44188 qa cannot install FreeBSD 4.0-4.6 to Compaq o [2002/11/05] bin/44915 qa [sysinstall] 'choose installation media' o [2002/11/13] bin/45254 qa [patch] [sysinstall] sysinstall installs o [2002/11/23] bin/45608 qa [sysinstall] install should config all et o [2003/01/09] bin/46905 qa FreeBSD 5.x cannot be installed from mult o [2003/01/21] bin/47314 qa [sysinstall] wish: install should not req o [2003/02/04] bin/47908 qa [sysinstall] /stand/sysinstall can't disp o [2003/03/06] bin/48989 qa Sysinstall's partition editor gets confu o [2003/06/10] bin/53131 qa [sysinstall] "ALL" could not turn check B o [2003/06/15] bin/53341 qa dump frequency in sysinstall is always th o [2004/03/17] conf/64381 qa lo0 not up and no IPs assigned after inst 38 problems total. From owner-freebsd-qa@FreeBSD.ORG Mon Sep 6 13:53:46 2004 Return-Path: Delivered-To: freebsd-qa@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57E3C16A4CE for ; Mon, 6 Sep 2004 13:53:46 +0000 (GMT) Received: from mail.freebsd.org.cn (dns3.freebsd.org.cn [61.129.66.75]) by mx1.FreeBSD.org (Postfix) with SMTP id D5CA143D55 for ; Mon, 6 Sep 2004 13:53:44 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: (qmail 27668 invoked by uid 0); 6 Sep 2004 13:50:20 -0000 Received: from unknown (HELO beastie.frontfree.net) (219.239.98.7) by mail.freebsd.org.cn with SMTP; 6 Sep 2004 13:50:20 -0000 Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id 01DE513139C; Mon, 6 Sep 2004 21:32:34 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03183-10; Mon, 6 Sep 2004 21:32:29 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id 8613C131278; Mon, 6 Sep 2004 21:32:28 +0800 (CST) Date: Mon, 6 Sep 2004 21:32:28 +0800 From: Xin LI To: FreeBSD bugmaster Message-ID: <20040906133228.GA2841@frontfree.net> References: <200409061102.i86B2up8094417@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: <200409061102.i86B2up8094417@freefall.freebsd.org> User-Agent: Mutt/1.4.2.1i X-GPG-key-ID/Fingerprint: 0xCAEEB8C0 / 43B8 B703 B8DD 0231 B333 DC28 39FB 93A0 CAEE B8C0 X-GPG-Public-Key: http://www.delphij.net/delphij.asc X-Operating-System: FreeBSD beastie.frontfree.net 5.2-delphij FreeBSD 5.2-delphij #0: Tue Aug 17 14:22:25 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 X-URL: http://www.delphij.net X-By: delphij@beastie.frontfree.net X-Location: Beijing, China X-Virus-Scanned: by amavisd-new at frontfree.net cc: freebsd-qa@FreeBSD.org Subject: Re: Current problem reports assigned to you X-BeenThere: freebsd-qa@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Quality Assurance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2004 13:53:46 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Please consider assigning bin/71404 to qa@ as well. The patch I have submitted in bin/71404 is likely to correct the problem that sysinstall(8) sets more than one partitions' "active" flag which will render the system not bootable, and a lot of users have complained this when installing FreeBSD in their multi-boot configurations. The proposaled change prevents these users from shooting their feet by mistakenly set two "active" partitions. Cheers, --=20 Xin LI http://www.delphij.net/ See complete headers for GPG key and other information. --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBPGbsOfuToMruuMARApl0AJ9s3vY5tg431N+kQgqeAuQEX7NHYgCfRf3w pDAre7j9RWIfMCnZW7cUDV8= =UVeu -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb-- From owner-freebsd-qa@FreeBSD.ORG Mon Sep 6 14:08:43 2004 Return-Path: Delivered-To: freebsd-qa@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A5D916A4CE; Mon, 6 Sep 2004 14:08:43 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6648943D1D; Mon, 6 Sep 2004 14:08:43 +0000 (GMT) (envelope-from arved@FreeBSD.org) Received: from freefall.freebsd.org (arved@localhost [127.0.0.1]) i86E8hWH028596; Mon, 6 Sep 2004 14:08:43 GMT (envelope-from arved@freefall.freebsd.org) Received: (from arved@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i86E8haD028592; Mon, 6 Sep 2004 14:08:43 GMT (envelope-from arved) Date: Mon, 6 Sep 2004 14:08:43 GMT From: Tilman Linneweh Message-Id: <200409061408.i86E8haD028592@freefall.freebsd.org> To: arved@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-qa@FreeBSD.org Subject: Re: bin/71404: [sysinstall] [patch] Only make one active partition in sysinstall(8) X-BeenThere: freebsd-qa@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Quality Assurance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2004 14:08:43 -0000 Synopsis: [sysinstall] [patch] Only make one active partition in sysinstall(8) Responsible-Changed-From-To: freebsd-bugs->freebsd-qa Responsible-Changed-By: arved Responsible-Changed-When: Mon Sep 6 14:08:24 GMT 2004 Responsible-Changed-Why: Over to sysinstall "maintainers" http://www.freebsd.org/cgi/query-pr.cgi?pr=71404 From owner-freebsd-qa@FreeBSD.ORG Mon Sep 6 16:21:53 2004 Return-Path: Delivered-To: freebsd-qa@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C9B516A4CE; Mon, 6 Sep 2004 16:21:53 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id B025643D45; Mon, 6 Sep 2004 16:21:52 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.0.200] ([192.168.0.200]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i86GM66X099515; Mon, 6 Sep 2004 10:22:06 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <413C8DF5.5050308@samsco.org> Date: Mon, 06 Sep 2004 10:19:01 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040831 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Xin LI References: <20040905164836.451FF130C42@beastie.frontfree.net> In-Reply-To: <20040905164836.451FF130C42@beastie.frontfree.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: re@freebsd.org cc: FreeBSD-qa@freebsd.org Subject: Re: [PATCH] Only make one active partition in sysinstall(8) X-BeenThere: freebsd-qa@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Quality Assurance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2004 16:21:53 -0000 Xin, Please feel free to commit this to HEAD right now and get it reviewed for RELENG_5. Thanks! Scott Xin LI wrote: >>Submitter-Id: current-users >>Originator: Xin LI >>Organization: The FreeBSD Simplified Chinese Project >>Confidential: no >>Synopsis: [PATCH] Only make one active partition in sysinstall(8) >>Severity: serious >>Priority: high >>Category: bin >>Class: sw-bug >>Release: FreeBSD 5.2-delphij i386 >>Environment: > > System: FreeBSD beastie.frontfree.net 5.2-delphij FreeBSD 5.2-delphij #0: Tue Aug 17 14:22:25 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 > > >>Description: > > The handling of active partition in sysinstall(8) contained a minor > flaw that allows two partitions to be marked as "active" in the same time. > Before having a user shoot his or her feet, I think it would be a good idea > not permitting this at all. > > >>How-To-Repeat: > > Run sysinstall(8), Configure -> Fdisk -> (choose a disk having more > than one partition) -> try to use "S" on more than one partition. > > >>Fix: > > > The attached patch would reset active states in the whole partition > chain and hence won't allow two partitions to be set "active" at the same > time. Might be a good candidate for the upcoming 5.3-RELEASE. > > Along with the functional patch I have added a "CHUNK_INFO_ENTRIES" > define to make it easier to have consist code. > > --- patch-sysinstall::disks.c begins here --- > Index: disks.c > =================================================================== > RCS file: /home/fcvs/src/usr.sbin/sysinstall/disks.c,v > retrieving revision 1.152 > diff -u -r1.152 disks.c > --- disks.c 2 Aug 2004 23:18:48 -0000 1.152 > +++ disks.c 5 Sep 2004 16:39:22 -0000 > @@ -74,7 +74,8 @@ > #define CHUNK_START_ROW 5 > > /* Where we keep track of MBR chunks */ > -static struct chunk *chunk_info[16]; > +#define CHUNK_INFO_ENTRIES 16 > +static struct chunk *chunk_info[CHUNK_INFO_ENTRIES]; > static int current_chunk; > > static void diskPartitionNonInteractive(Device *dev); > @@ -312,6 +313,7 @@ > { > char *cp, *p; > int rv, key = 0; > + int i; > Boolean chunking; > char *msg = NULL; > #ifdef PC98 > @@ -535,6 +537,10 @@ > break; > > case 'S': > + /* Clear active states so we won't have two */ > + for (i = 0; (chunk_info[i] != NULL) && (i < CHUNK_INFO_ENTRIES); i++) > + chunk_info[i]->flags &= !CHUNK_ACTIVE; > + > /* Set Bootable */ > chunk_info[current_chunk]->flags |= CHUNK_ACTIVE; > break; > --- patch-sysinstall::disks.c ends here --- > > From owner-freebsd-qa@FreeBSD.ORG Wed Sep 8 21:27:44 2004 Return-Path: Delivered-To: freebsd-qa@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCDD216A4CE; Wed, 8 Sep 2004 21:27:44 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AEEB043D46; Wed, 8 Sep 2004 21:27:44 +0000 (GMT) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) i88LRiZ3046052; Wed, 8 Sep 2004 21:27:44 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i88LRiMX046048; Wed, 8 Sep 2004 21:27:44 GMT (envelope-from linimon) Date: Wed, 8 Sep 2004 21:27:44 GMT From: Mark Linimon Message-Id: <200409082127.i88LRiMX046048@freefall.freebsd.org> To: linimon@FreeBSD.org, qa@FreeBSD.org, freebsd-doc@FreeBSD.org Subject: Re: docs/42977: request: document the fact that the FreeBSD installer doesn't probe past EISA slot 10. X-BeenThere: freebsd-qa@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Quality Assurance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 21:27:45 -0000 Synopsis: request: document the fact that the FreeBSD installer doesn't probe past EISA slot 10. Responsible-Changed-From-To: qa->freebsd-doc Responsible-Changed-By: linimon Responsible-Changed-When: Wed Sep 8 21:27:12 GMT 2004 Responsible-Changed-Why: Reclassify this as a doc PR, since the Audit-Trail claims that the code is doing The Right Thing (in general). http://www.freebsd.org/cgi/query-pr.cgi?pr=42977