From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EbKKW-0001EQ-7I for mharc-grub-devel@gnu.org; Sun, 13 Nov 2005 11:03:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EbKKT-0001E9-PP for grub-devel@gnu.org; Sun, 13 Nov 2005 11:03:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EbKKS-0001Du-SL for grub-devel@gnu.org; Sun, 13 Nov 2005 11:03:41 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EbKKS-0001Dm-6X for grub-devel@gnu.org; Sun, 13 Nov 2005 11:03:40 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EbKKR-0004t6-RV for grub-devel@gnu.org; Sun, 13 Nov 2005 11:03:40 -0500 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id 508E58B33 for ; Sun, 13 Nov 2005 17:03:39 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.11]) by vscan-cn.han.nl (venus.han.nl [145.74.65.6]) (amavisd-new, port 10024) with ESMTP id 21044-07 for ; Sun, 13 Nov 2005 17:03:38 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 616258B0A for ; Sun, 13 Nov 2005 17:03:38 +0100 (CET) Received: from localhost.localdomain (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id 08618C046 for ; Sun, 13 Nov 2005 17:03:38 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <200510201547.51345.T.E.Baldwin99@members.leeds.ac.uk> <200511081920.13335.T.E.Baldwin99@members.leeds.ac.uk> From: Marco Gerards Date: Sun, 13 Nov 2005 17:03:38 +0100 In-Reply-To: <200511081920.13335.T.E.Baldwin99@members.leeds.ac.uk> (Timothy Baldwin's message of "Tue, 8 Nov 2005 19:20:13 +0000") Message-ID: <877jbclelh.fsf@student.han.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-cn.han.nl Subject: Re: Linux/ADFS partition table support X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2005 16:03:42 -0000 Timothy Baldwin writes: > On Thursday 20 Oct 2005 15:47, Timothy Baldwin wrote: >> Here is support for Linux/ADFS partition tables, which is used for Linux >> partitions on discs connected to the motherboard interface of systems which >> run RISC OS. Since it shares a structure with the RISC OS disc API, that >> has been separated into a header file. > > Revised for current CVS + 64-bit disk address support. Changelog as before. Please include the Changelog entry every time you send in a patch, otherwise I can't reply to in the a single mail. I've included it this time 2005-10-20 Timothy Baldwin Add support for Linux/ADFS partition tables. * partmap/acorn.c: New file. * include/grub/acorn_filecore.h: Likewise. I would prefer to move this to partmap/acorn.c. Or do you have to use this struct elsewhere? If you reply to this email about what needs to be changed, I could do it before committing the patch, if there are not that many changes required. I will also change it so it will work with my latest commit. > static inline grub_disk_addr_t > diff -purN -x '*.mk' -x '*~' -x autom4te.cache -x configure -x '.#*' -x '*.orig' -x '*.rej' -x CVS grub2-submitted/partmap/acorn.c grub2-work/partmap/acorn.c > --- grub2-submitted/partmap/acorn.c 1970-01-01 01:00:00.000000000 +0100 > +++ grub2-work/partmap/acorn.c 2005-11-08 18:57:40.000000000 +0000 [...] > +#include Why do you include stddef? I really want to avoid this. > + > +#define LINUX_NATIVE_MAGIC grub_cpu_to_le32 (0xdeafa1de) > +#define LINUX_SWAP_MAGIC grub_cpu_to_le32 (0xdeafab1e) > +#define LINUX_MAP_ENTRIES (512 / 12) > + > +struct grub_acorn_boot_block > +{ > + grub_uint8_t misc[0x1C0]; > + struct grub_filecore_disc_record disc_record; > + grub_uint8_t flags; > + grub_uint16_t start_cylinder; > + grub_uint8_t checksum; > +} __attribute__ ((packed, aligned)); What is aligned? Insn't it the opposite of packed? > +static grub_err_t > +find (grub_disk_t disk, struct linux_part *m, unsigned *sector) > +{ > + int i; > + struct grub_acorn_boot_block boot; > + grub_err_t err = grub_disk_read (disk, 0xC00 / GRUB_DISK_SECTOR_SIZE, 0, > + sizeof (struct grub_acorn_boot_block), > + &boot); > + if (err) > + return err; > + > + if ((boot.flags & 15) != 9) > + goto fail; What is 15 and 9? Can you please create macro's for such values? > +/* Partition map type. */ > +static struct grub_partition_map grub_acorn_partition_map = { Please put the opening brace on a separate line. Thanks, Marco