[syslinux:master] disklib: Add WEE bootloader detection code

syslinux-bot for Gert Hulselmans gerth at zytor.com
Thu Jun 24 15:21:14 PDT 2010


Commit-ID:  a9c8bd1a98973165c0b217c0f52319828d398d3b
Gitweb:     http://syslinux.zytor.com/commit/a9c8bd1a98973165c0b217c0f52319828d398d3b
Author:     Gert Hulselmans <gerth at zytor.com>
AuthorDate: Thu, 24 Jun 2010 22:08:21 +0200
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Thu, 24 Jun 2010 22:08:21 +0200

disklib: Add WEE bootloader detection code

WEE, is a bootloader based on grub4dos. It fits in the first 63 sectors of
the drive.

The first 4 bytes are:
$ hexdump -n 4 /media/Data/ubcd-new/wee-2010-06-20/wee63.mbr
0000000 5eeb 0090
0000004

Or in the format get_mbr_string wants it:
$ hexdump -C -n 4 wee63.mbr
00000000  eb 5e 90 00

Patch tested in qemu:
  qemu -boot d -cdrom hdt.iso -hda wee-2010-06-20/wee63.mbr


---
 com32/gpllib/disk/mbrs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/com32/gpllib/disk/mbrs.c b/com32/gpllib/disk/mbrs.c
index f2942fc..41bb20c 100644
--- a/com32/gpllib/disk/mbrs.c
+++ b/com32/gpllib/disk/mbrs.c
@@ -71,6 +71,8 @@ void get_mbr_string(const uint32_t label, char *buffer, const int buffer_size)
 	    strlcpy(buffer, "fbinst", buffer_size - 1);
 	else if (((label >> 8) & 0xff) == 0x80)
 	    strlcpy(buffer, "Grub4Dos", buffer_size - 1);
+	else if (((label >> 8) & 0xff) == 0x90)
+	    strlcpy(buffer, "WEE", buffer_size - 1);
 	else
 	    strlcpy(buffer, "Unknown mbr", buffer_size - 1);
 	break;



More information about the Syslinux-commits mailing list