gfxboot: set media type
authorSebastian Herbszt <herbszt@gmx.de>
Sun, 13 Jun 2010 21:00:39 +0000 (23:00 +0200)
committerSebastian Herbszt <herbszt@gmx.de>
Sun, 13 Jun 2010 21:00:39 +0000 (23:00 +0200)
Set media type according to the drive number and cd mode.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
com32/gfxboot/gfxboot.c

index b3ee676..dd4d641 100644 (file)
@@ -199,6 +199,12 @@ int main(int argc, char **argv)
     gfx_config.boot_drive = 0;
   }
 
+  gfx_config.media_type = gfx_config.boot_drive < 0x80 ? 1 : 0;
+
+  if(sdi->c.filesystem == SYSLINUX_FS_ISOLINUX) {
+    gfx_config.media_type = sdi->iso.cd_mode ? 0 : 2;
+  }
+
   gfx_config.bootloader = 1;
   gfx_config.sysconfig_size = sizeof gfx_config;
   gfx_config.bootloader_seg = 0;       // apparently not needed