From 9258c91750514fc5fd7b116e7e43b6c6da19900e Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Mon, 24 Jan 2011 23:58:35 +0100 Subject: disklib: Detect Paragon MBR Add detection code for Paragon MBR to disklib. Signed-off-by: Gert Hulselmans --- com32/gpllib/disk/mbrs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/com32/gpllib/disk/mbrs.c b/com32/gpllib/disk/mbrs.c index 41bb20c6..da692286 100644 --- a/com32/gpllib/disk/mbrs.c +++ b/com32/gpllib/disk/mbrs.c @@ -56,6 +56,9 @@ void get_mbr_string(const uint32_t label, char *buffer, const int buffer_size) case 0xeb04: strlcpy(buffer, "Solaris", buffer_size - 1); break; + case 0xeb31: + strlcpy(buffer, "Paragon", buffer_size - 1); + break; case 0xeb48: strlcpy(buffer, "Grub", buffer_size - 1); break; -- cgit v1.2.1 From 07cabef97538fdb83594e99ccc93805da19c7e50 Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Mon, 24 Jan 2011 23:08:23 +0100 Subject: 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 --- com32/gpllib/disk/mbrs.c | 17 +++++++++++++---- 1 file 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; -- cgit v1.2.1 From dbc4b9f8092cd9a500149cc3a10a9a38c11a580b Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Tue, 25 Jan 2011 00:12:48 +0100 Subject: disklib: Detect "MS-DOS 3.30 through Windows 95 (A)" MBR Add detection code for "MS-DOS 3.30 through Windows 95 (A)" MBR to disklib. Signed-off-by: Gert Hulselmans --- com32/gpllib/disk/mbrs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/com32/gpllib/disk/mbrs.c b/com32/gpllib/disk/mbrs.c index c889eece..82b45c03 100644 --- a/com32/gpllib/disk/mbrs.c +++ b/com32/gpllib/disk/mbrs.c @@ -27,7 +27,6 @@ void get_mbr_string(const uint32_t label, char *buffer, const int buffer_size) switch (s_label) { case 0x0000: - case 0xfa33: case 0xfab8: case 0xfabe: strlcpy(buffer, "No bootloader", buffer_size - 1); @@ -97,6 +96,9 @@ void get_mbr_string(const uint32_t label, char *buffer, const int buffer_size) else strlcpy(buffer, "Unknown mbr", buffer_size - 1); break; + case 0xfa33: + strlcpy(buffer, "MS-DOS 3.30 through Windows 95 (A)", buffer_size - 1); + break; case 0xfaeb: strlcpy(buffer, "Lilo", buffer_size - 1); break; -- cgit v1.2.1 From 2a1dd834b9e1f579d6d4fc2cfb72ad70d52b7289 Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Tue, 25 Jan 2011 00:17:57 +0100 Subject: disklib: Detect "FreeDOS (eXtended FDisk)" MBR Add detection code for "FreeDOS (eXtended FDisk)" MBR to disklib. Signed-off-by: Gert Hulselmans --- com32/gpllib/disk/mbrs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/com32/gpllib/disk/mbrs.c b/com32/gpllib/disk/mbrs.c index 82b45c03..d87acdc5 100644 --- a/com32/gpllib/disk/mbrs.c +++ b/com32/gpllib/disk/mbrs.c @@ -27,7 +27,6 @@ void get_mbr_string(const uint32_t label, char *buffer, const int buffer_size) switch (s_label) { case 0x0000: - case 0xfab8: case 0xfabe: strlcpy(buffer, "No bootloader", buffer_size - 1); break; @@ -99,6 +98,9 @@ void get_mbr_string(const uint32_t label, char *buffer, const int buffer_size) case 0xfa33: strlcpy(buffer, "MS-DOS 3.30 through Windows 95 (A)", buffer_size - 1); break; + case 0xfab8: + strlcpy(buffer, "FreeDOS (eXtended FDisk)", buffer_size - 1); + break; case 0xfaeb: strlcpy(buffer, "Lilo", buffer_size - 1); break; -- cgit v1.2.1 From 9e1c7c49ac466b91343fd45373d21538d1b33838 Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Mon, 24 Jan 2011 23:53:34 +0100 Subject: disklib: Detect DiskCryptor MBR Add detection code for DiskCryptor MBR to disklib. Signed-off-by: Gert Hulselmans --- com32/gpllib/disk/mbrs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com32/gpllib/disk/mbrs.c b/com32/gpllib/disk/mbrs.c index d87acdc5..6150fcf4 100644 --- a/com32/gpllib/disk/mbrs.c +++ b/com32/gpllib/disk/mbrs.c @@ -40,6 +40,8 @@ void get_mbr_string(const uint32_t label, char *buffer, const int buffer_size) /* We need more than 2 bytes */ if (((label >> 8) & 0xff) == 0x8e) strlcpy(buffer, "Windows", buffer_size - 1); + else if (((label >> 8) & 0xff) == 0x90) + strlcpy(buffer, "DiskCryptor", buffer_size - 1); else if (((label >> 8) & 0xff) == 0xfa) strlcpy(buffer, "Syslinux", buffer_size - 1); else -- cgit v1.2.1