Timothy Baldwin <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <stddef.h> 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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel