Fix a really stupid bug where I assumed sizeof(int) == 2. This resulted in
MBR's with a 4th slice failing the signature check and fdisk saying that they are invalid. Submitted by: bde
This commit is contained in:
parent
0ce76c7dd0
commit
fe81981fdb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63729
@ -794,7 +794,7 @@ read_s0()
|
||||
warnx("can't read fdisk partition table");
|
||||
return -1;
|
||||
}
|
||||
if (*(int *)&mboot.bootinst[MBRSIGOFF] != BOOT_MAGIC) {
|
||||
if (*(uint16_t *)&mboot.bootinst[MBRSIGOFF] != BOOT_MAGIC) {
|
||||
warnx("invalid fdisk partition table found");
|
||||
/* So should we initialize things */
|
||||
return -1;
|
||||
|
@ -794,7 +794,7 @@ read_s0()
|
||||
warnx("can't read fdisk partition table");
|
||||
return -1;
|
||||
}
|
||||
if (*(int *)&mboot.bootinst[MBRSIGOFF] != BOOT_MAGIC) {
|
||||
if (*(uint16_t *)&mboot.bootinst[MBRSIGOFF] != BOOT_MAGIC) {
|
||||
warnx("invalid fdisk partition table found");
|
||||
/* So should we initialize things */
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user