On Mon, Jun 14, 2010 at 08:07:35AM -0500, richardvo...@gmail.com wrote: > Colin Watson wrote: > > I can think of an alternative. We do still need grub_install_dos_part > > and grub_install_bsd_part for the multiboot trampoline, which is in > > assembly, so it's difficult to abandon them altogether. However, > > there's no reason we need to use them in make_install_device. How about > > we invent a way to encode most of the information in string form in > > grub_prefix, while leaving a placeholder for make_install_device to fill > > in the disk? There are 64 bytes available for grub_prefix, which should > > be plenty. For example, how about the following (with \0 standing for > > ASCII NUL): > > > > (\0,msdos1,bsd1)/boot/grub > > > > It's then just a matter of spotting the "(\0," sequence and replacing > > the \0 with the drive name. I think this can probably be done using > > less code than the first option above, and all told it feels a bit less > > hacky to me. > > Instead of doing string replacement, why not just define a > disk-relative partition format?
Simple string replacement would be much easier to implement, and probably smaller. Plus, we don't need disk-relative device naming elsewhere, and I think it would require putting platform-specific code (otherwise how do you know which disk to be relative to?) in places that are otherwise pretty platform-independent. > Also, the '\0' seems unnecessary. Is having "(," meaningful in some > way already? Good point. This would be sufficient. -- Colin Watson [cjwat...@ubuntu.com] _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel