aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-04 21:11:42 -0800
committerErwan Velu <erwan.velu@free.fr>2009-11-05 16:33:06 +0100
commitf1ea9a8949d447bfbbaf1fed8dc33a011ec55e69 (patch)
tree655834b06f19978ba2938c083de0bb49574eea2d /com32/gpllib
parentdc24eae6d772bc7e69e3d4c17ecb23071d4878e2 (diff)
downloadsyslinux-f1ea9a8949d447bfbbaf1fed8dc33a011ec55e69.tar.gz
syslinux-f1ea9a8949d447bfbbaf1fed8dc33a011ec55e69.tar.xz
syslinux-f1ea9a8949d447bfbbaf1fed8dc33a011ec55e69.zip
disklib: add support for detection of the fbinst mbr
Note that fbinst and grub4dos mbrs share the first two bytes. Patch originally submitted by gerth. This fixes #20. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/gpllib')
-rw-r--r--com32/gpllib/disk/mbrs.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/com32/gpllib/disk/mbrs.c b/com32/gpllib/disk/mbrs.c
index 808fb78a..d52bc4c5 100644
--- a/com32/gpllib/disk/mbrs.c
+++ b/com32/gpllib/disk/mbrs.c
@@ -41,7 +41,15 @@ void get_mbr_string(const uint32_t label, char* buffer, const int buffer_size)
case 0xeb48: strncpy(buffer, "Grub", buffer_size - 1); break;
case 0xeb63:
case 0xeb4c: strncpy(buffer, "Grub2", buffer_size - 1); break;
- case 0xeb5e: strncpy(buffer, "Grub4Dos", buffer_size - 1); break;
+ case 0xeb5e:
+ /* We need more than 2 bytes */
+ if (((label >> 8) & 0xff) == 0x00)
+ strncpy(buffer, "fbinst", buffer_size - 1);
+ else if (((label >> 8) & 0xff) == 0x80)
+ strncpy(buffer, "Grub4Dos", buffer_size - 1);
+ else
+ strncpy(buffer, "Unknown mbr", buffer_size - 1); break;
+ break;
case 0xfa31:
/* We need more than 2 bytes */
if (((label >> 8) & 0xff) == 0xc9)