Shave two more bytes off the MBR
authorH. Peter Anvin <hpa@zytor.com>
Wed, 11 Jul 2007 22:45:49 +0000 (15:45 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 11 Jul 2007 22:45:49 +0000 (15:45 -0700)
mbr/mbr.S

index cb8f6dc..7597d79 100644 (file)
--- a/mbr/mbr.S
+++ b/mbr/mbr.S
@@ -194,11 +194,10 @@ scan_partition_table:
        movb    $4, %cl         /* cx == 0 here */
 7:
        movb    4(%di), %al
-       cmpb    $0x05, %al      /* MS-DOS extended */
+       cmpb    $0x0f, %al      /* 0x0f = Win9x extended */
        je      8f
-       cmpb    $0x0f, %al      /* Win9x extended */
-       je      8f
-       cmpb    $0x85, %al      /* Linux extended */
+       andb    $~0x80, %al     /* 0x85 = Linux extended */
+       cmpb    $0x05, %al      /* 0x05 = MS-DOS extended */
        jne     9f
 
        /* It is an extended partition.  Read the extended partition and