From aae7ab5399c855519b7c670cc9fb1f395ee14466 Mon Sep 17 00:00:00 2001 From: Pierre-Alexandre Meyer Date: Sun, 15 Nov 2009 23:37:12 -0800 Subject: [PATCH] gpllib: mbr: add detection for Grub2 minor versions Grub2 v1.96 and v1.97 have different opcodes in their MBR. Reported-by: gert This fixes #26. Signed-off-by: Pierre-Alexandre Meyer --- com32/gpllib/disk/mbrs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com32/gpllib/disk/mbrs.c b/com32/gpllib/disk/mbrs.c index c8e8b30..403458c 100644 --- a/com32/gpllib/disk/mbrs.c +++ b/com32/gpllib/disk/mbrs.c @@ -40,8 +40,8 @@ void get_mbr_string(const uint32_t label, char* buffer, const int buffer_size) case 0xea1e: strncpy(buffer, "Truecrypt Boot Loader", buffer_size - 1); break; case 0xeb04: strncpy(buffer, "Solaris", buffer_size - 1); break; case 0xeb48: strncpy(buffer, "Grub", buffer_size - 1); break; - case 0xeb63: - case 0xeb4c: strncpy(buffer, "Grub2", buffer_size - 1); break; + case 0xeb4c: strncpy(buffer, "Grub2 (v1.96)", buffer_size - 1); + case 0xeb63: strncpy(buffer, "Grub2 (v1.97)", buffer_size - 1); case 0xeb5e: /* We need more than 2 bytes */ if (((label >> 8) & 0xff) == 0x00) -- 2.7.4