aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGert Hulselmans <gerth@zytor.com>2011-01-24 23:08:23 +0100
committerErwan Velu <erwanaliasr1@gmail.com>2011-01-25 20:54:08 +0100
commit07cabef97538fdb83594e99ccc93805da19c7e50 (patch)
treee5f9d58f0ed9a9bbc390810416c3556ad8ed3754
parent9258c91750514fc5fd7b116e7e43b6c6da19900e (diff)
downloadsyslinux-07cabef97538fdb83594e99ccc93805da19c7e50.tar.gz
syslinux-07cabef97538fdb83594e99ccc93805da19c7e50.tar.xz
syslinux-07cabef97538fdb83594e99ccc93805da19c7e50.zip
disklib: Detect new Syslinux (normal + isohybrid) MBR
Add detection code for new Syslinux (normal + isohybrid) MBR to disklib. Switch old Syslinux MBR and Master Boot LoaDeR detection code. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
-rw-r--r--com32/gpllib/disk/mbrs.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/com32/gpllib/disk/mbrs.c b/com32/gpllib/disk/mbrs.c
index da692286..c889eece 100644
--- a/com32/gpllib/disk/mbrs.c
+++ b/com32/gpllib/disk/mbrs.c
@@ -39,7 +39,16 @@ void get_mbr_string(const uint32_t label, char *buffer, const int buffer_size)
strlcpy(buffer, "Acer 3", buffer_size - 1);
break;
case 0x33c0:
- strlcpy(buffer, "Windows", buffer_size - 1);
+ /* We need more than 2 bytes */
+ if (((label >> 8) & 0xff) == 0x8e)
+ strlcpy(buffer, "Windows", buffer_size - 1);
+ else if (((label >> 8) & 0xff) == 0xfa)
+ strlcpy(buffer, "Syslinux", buffer_size - 1);
+ else
+ strlcpy(buffer, "Unknown mbr", buffer_size - 1);
+ break;
+ case 0x33ed:
+ strlcpy(buffer, "Syslinux ISOhybrid", buffer_size - 1);
break;
case 0x33ff:
strlcpy(buffer, "HP/Gateway", buffer_size - 1);
@@ -81,10 +90,10 @@ void get_mbr_string(const uint32_t label, char *buffer, const int buffer_size)
break;
case 0xfa31:
/* We need more than 2 bytes */
- if (((label >> 8) & 0xff) == 0xc9)
- strlcpy(buffer, "Master Boot LoaDeR", buffer_size - 1);
- else if (((label >> 8) & 0xff) == 0xc0)
+ if (((label >> 8) & 0xff) == 0xc0)
strlcpy(buffer, "Syslinux", buffer_size - 1);
+ else if (((label >> 8) & 0xff) == 0xc9)
+ strlcpy(buffer, "Master Boot LoaDeR", buffer_size - 1);
else
strlcpy(buffer, "Unknown mbr", buffer_size - 1);
break;