Set the boot device based on the derivative information.
Signed-off-by: Sebastian Herbszt <herbszt at gmx.de>
diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c
index d008da0..526d10a 100644
--- a/com32/mboot/mboot.c
+++ b/com32/mboot/mboot.c
@@ -224,6 +224,14 @@ int main(int argc, char *argv[])
mboot_apm();
mboot_syslinux_info();
+ /* Set boot device info */
+ const union syslinux_derivative_info *sdi;
+ sdi = syslinux_derivative_info();
+ if (sdi->c.filesystem != SYSLINUX_FS_PXELINUX) {
+ mbinfo.boot_device = (sdi->disk.drive_number << 24) |
0xffffff;
+ mbinfo.flags |= MB_INFO_BOOTDEV;
+ }
+
if (opt.solaris)
mboot_solaris_dhcp_hack();
On 04/04/2010 11:39 AM, Sebastian Herbszt wrote:> Set the boot device based on the derivative information. > > Signed-off-by: Sebastian Herbszt <herbszt at gmx.de> > > diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c > index d008da0..526d10a 100644 > --- a/com32/mboot/mboot.c > +++ b/com32/mboot/mboot.c > @@ -224,6 +224,14 @@ int main(int argc, char *argv[]) > mboot_apm(); > mboot_syslinux_info(); > > + /* Set boot device info */ > + const union syslinux_derivative_info *sdi; > + sdi = syslinux_derivative_info(); > + if (sdi->c.filesystem != SYSLINUX_FS_PXELINUX) { > + mbinfo.boot_device = (sdi->disk.drive_number << 24) | 0xffffff; > + mbinfo.flags |= MB_INFO_BOOTDEV; > + } > + > if (opt.solaris) > mboot_solaris_dhcp_hack(); >Is this really a good idea (that is, giving the device number but not the partition information)? Obviously, the partition info is totally Grub-model centric, but I'm wondering how OSes may react to a mishmash. -hpa
Maybe Matching Threads
- [PATCH] mboot: set boot loader name
- [PATCH] Extend Multiboot1 with support for ELF64 file format
- [PATCH] Wedding gift, removing double l from auxilliary
- Patch for chain.c32: Set default boot drive to CD drive from which ISOLINUX is booted
- [GIT PULL] gfxboot module changes