[syslinux:pathbased] gfxboot: set media type

syslinux-bot for Sebastian Herbszt herbszt at gmx.de
Sun Jun 13 15:57:09 PDT 2010


Commit-ID:  b23fe2afe076f88f6c0a74efc9688a5770cdb940
Gitweb:     http://syslinux.zytor.com/commit/b23fe2afe076f88f6c0a74efc9688a5770cdb940
Author:     Sebastian Herbszt <herbszt at gmx.de>
AuthorDate: Sun, 13 Jun 2010 23:00:39 +0200
Committer:  Sebastian Herbszt <herbszt at gmx.de>
CommitDate: Sun, 13 Jun 2010 23:00:39 +0200

gfxboot: set media type

Set media type according to the drive number and cd mode.

Signed-off-by: Sebastian Herbszt <herbszt at gmx.de>


---
 com32/gfxboot/gfxboot.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index b3ee676..dd4d641 100644
--- a/com32/gfxboot/gfxboot.c
+++ b/com32/gfxboot/gfxboot.c
@@ -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



More information about the Syslinux-commits mailing list