From owner-cvs-all Tue May 28 22:36:54 2002 Delivered-To: cvs-all@freebsd.org Received: from kayak.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by hub.freebsd.org (Postfix) with ESMTP id 3FF1937B400; Tue, 28 May 2002 22:36:49 -0700 (PDT) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by kayak.xcllnt.net (8.11.6/8.11.4) with ESMTP id g4T5akJ62657; Tue, 28 May 2002 22:36:46 -0700 (PDT) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.3/8.12.3) with ESMTP id g4T5arVJ000349; Tue, 28 May 2002 22:36:53 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.3/8.12.3/Submit) id g4T5arno000348; Tue, 28 May 2002 22:36:53 -0700 (PDT) (envelope-from marcel) Date: Tue, 28 May 2002 22:36:53 -0700 From: Marcel Moolenaar To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/sys gpt.h Message-ID: <20020529053653.GA306@dhcp01.pn.xcllnt.net> References: <200205290258.g4T2wgF83137@freefall.freebsd.org> <9551.1022648961@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9551.1022648961@critter.freebsd.dk> User-Agent: Mutt/1.3.99i 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 Wed, May 29, 2002 at 07:09:21AM +0200, Poul-Henning Kamp wrote: > In message <200205290258.g4T2wgF83137@freefall.freebsd.org>, Marcel Moolenaar w > rites: > >marcel 2002/05/28 19:58:41 PDT > > > > Modified files: > > sys/sys gpt.h > > Log: > > Add attribute packed to struct gpt_hdr to avoid unwanted padding at > > the end of the struct to make it an integral number of "longs" on > > 64-bit architectures. The size of the struct must be 92, not 96. > > I think the correct thing to do would be to add a pack/unpack function > like it is already done in geom_bsd, geom_sun and geom_mbr. That way > the alignment and wordsize of the local platform doesn't matter. I see what you mean, but packing and unpacking is not the problem. It's sizeof() that's got it wrong. I don't quite understand why sizeof() would yield a size that's 4 bytes longer than the structure actually is. It smells like a gcc bug, but I assume for now I'm just missing something. BTW: the dump of the GPT headers have the wrong size. I can make a new dump if you want, but you can also change the 12th byte in the GPT header sectors from 0x60 to 0x5c. -- 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