syslinux/syslinux-4.04-isohybrid_mbr.diff

28 lines
702 B
Diff
Raw Normal View History

diff --git a/utils/isohybrid.c b/utils/isohybrid.c
index 09f4520..954b5ed 100644
--- a/utils/isohybrid.c
+++ b/utils/isohybrid.c
@@ -653,12 +653,10 @@ initialise_mbr(uint8_t *mbr)
continue;
}
- if (i == 1)
- mbr[0] = 0x80;
-
if (i == part_data)
{
chs = ofs2chs(offset);
+ mbr[0] = 0x80;
mbr[1] = chs >> 8;
mbr[2] = chs >> 16;
mbr[3] = chs >> 24;
@@ -945,7 +943,7 @@ main(int argc, char *argv[])
}
if (!(mode & (MODE_MBR | MODE_GPT))) {
- mode |= (mode & EFI) ? MODE_GPT : MODE_MBR;
+ mode |= MODE_MBR;
}
if ((mode & EFI) && !offset) type = 0;