From owner-cvs-all Sat Nov 2 4:19:17 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3334C37B401; Sat, 2 Nov 2002 04:19:14 -0800 (PST) Received: from kayak.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2653D43E88; Sat, 2 Nov 2002 04:19:13 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by kayak.xcllnt.net (8.12.6/8.12.6) with ESMTP id gA2CIt0N087767; Sat, 2 Nov 2002 04:18:55 -0800 (PST) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id gA2CItOX001424; Sat, 2 Nov 2002 04:18:55 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.6/8.12.6/Submit) id gA2CItfT001423; Sat, 2 Nov 2002 04:18:55 -0800 (PST) Date: Sat, 2 Nov 2002 04:18:54 -0800 From: Marcel Moolenaar To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/geom geom_mbr.c Message-ID: <20021102121854.GA1417@athlon.pn.xcllnt.net> References: <200211021201.gA2C1CKD025754@repoman.freebsd.org> <20451.1036239062@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20451.1036239062@critter.freebsd.dk> User-Agent: Mutt/1.5.1i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Nov 02, 2002 at 01:11:02PM +0100, Poul-Henning Kamp wrote: > In message <200211021201.gA2C1CKD025754@repoman.freebsd.org>, Marcel Moolenaar > writes: > >marcel 2002/11/02 04:01:12 PST > > > > Modified files: > > sys/geom geom_mbr.c > > Log: > > Remove the GEOM_GPT hack. We now check for partition type 0xEE and > > skip those. This handles the Protective MBR (PMBR) which consists > > of a single partition of type 0xEE that covers the whole disk and > > as such protects the GPT partitioning. We allow other partitions to > > be present besides partitions of type 0xEE and as such interpret > > partition type 0xEE as a "hands-off" partition only. > > > > While here, fix g_mbrext_dumpconf to test if indent is NULL and > > dump the data in a form that libdisk can grok. Change the logic > > in g_mbr_dumpconf to match that of g_mbrext_dumpconf. This does > > not change the output, but prevents a NULL-pointer dereference > > when indent == NULL && pp == NULL. > > Thanks! I had overlooked that one. No problem. I also fixed libdisk (see my commit to disk.c). My disk is now correctly handled. Feel free to tweak it further if you think it can be done better. athlon% ./tst01 ad0 MBR [ad0s4] 16783 16383 error = 0 MBREXT [ad0s5] 16783 16383 error = 357 MBR [ad0s3] 33167 45129 error = 0 BSD [ad0s3f] 41359 36937 error = 0 BSD [ad0s3e] 37263 4096 error = 0 BSD [ad0s3b] 33167 4096 error = 0 MBR [ad0s2] 399 16383 error = 0 MBR [ad0s1] 0 399 error = 0 BSD [ad0s1a] 0 399 error = 0 c 0x8062040 c->p 0x8062080 c->p->p 0x0 --==##==-- Debug_Disk(ad0) bios_geom=0/16/63 = 0 boot1=0x0, boot2=0x0, bootmgr=0x0 --> 0x8062040 0 40088160 40088159 ad0 - ?? 0x00 --> 0x8062080 0 63 62 - - unused 0x00 --> 0x8062240 63 204561 204623 ad0s1 (null) freebsd 0xa5 = --> 0x8062280 63 204561 204623 ad0s1a (null) part 0x00 --> 0x8062200 204624 8388576 8593199 ad0s2 (null) mbr 0x0c = --> 0x80620c0 8593200 8388576 16981775 ad0s4 (null) mbr 0x0f = --> 0x8062100 16981776 23106384 40088159 ad0s3 (null) freebsd 0xa5 = --> 0x8062180 16981776 2097152 19078927 ad0s3b (null) part 0x00 --> 0x80621c0 19078928 2097152 21176079 ad0s3e (null) part 0x00 --> 0x8062140 21176080 18912080 40088159 ad0s3f (null) part 0x00 kern.geom.conftxt: 0 DISK ad0 20525137920 512 hd 16 sc 63 1 MBR ad0s4 4294950912 512 i 3 o 4399718400 ty 15 2 MBREXT ad0s5 4294918656 512 i 0 o 32256 ty 11 1 MBR ad0s3 11830468608 512 i 2 o 8694669312 ty 165 2 BSD ad0s3f 9682984960 512 i 5 o 2147483648 2 BSD ad0s3e 1073741824 512 i 4 o 1073741824 2 BSD ad0s3c 11830468608 512 i 2 o 0 2 BSD ad0s3b 1073741824 512 i 1 o 0 1 MBR ad0s2 4294950912 512 i 1 o 104767488 ty 12 1 MBR ad0s1 104735232 512 i 0 o 32256 ty 165 2 BSD ad0s1c 104735232 512 i 2 o 0 2 BSD ad0s1a 104735232 512 i 0 o 0 -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message