mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-01 20:57:03 +03:00
host/limine: Simplify some redundantly written code
This commit is contained in:
parent
5ab25407c6
commit
3c9e5d6b12
@ -720,41 +720,41 @@ static int bios_install(int argc, char *argv[]) {
|
||||
if (!force_mbr) {
|
||||
mbr = 0;
|
||||
} else {
|
||||
hint8 = hint8 & 0x80 ? 0x80 : 0x00;
|
||||
hint8 &= 0x80;
|
||||
device_write(&hint8, 446, sizeof(uint8_t));
|
||||
}
|
||||
}
|
||||
any_active = any_active ? any_active : (hint8 & 0x80) != 0;
|
||||
any_active = any_active || (hint8 & 0x80) != 0;
|
||||
device_read(&hint8, 462, sizeof(uint8_t));
|
||||
if (hint8 != 0x00 && hint8 != 0x80) {
|
||||
if (!force_mbr) {
|
||||
mbr = 0;
|
||||
} else {
|
||||
hint8 = hint8 & 0x80 ? 0x80 : 0x00;
|
||||
hint8 &= 0x80;
|
||||
device_write(&hint8, 462, sizeof(uint8_t));
|
||||
}
|
||||
}
|
||||
any_active = any_active ? any_active : (hint8 & 0x80) != 0;
|
||||
any_active = any_active || (hint8 & 0x80) != 0;
|
||||
device_read(&hint8, 478, sizeof(uint8_t));
|
||||
if (hint8 != 0x00 && hint8 != 0x80) {
|
||||
if (!force_mbr) {
|
||||
mbr = 0;
|
||||
} else {
|
||||
hint8 = hint8 & 0x80 ? 0x80 : 0x00;
|
||||
hint8 &= 0x80;
|
||||
device_write(&hint8, 478, sizeof(uint8_t));
|
||||
}
|
||||
}
|
||||
any_active = any_active ? any_active : (hint8 & 0x80) != 0;
|
||||
any_active = any_active || (hint8 & 0x80) != 0;
|
||||
device_read(&hint8, 494, sizeof(uint8_t));
|
||||
if (hint8 != 0x00 && hint8 != 0x80) {
|
||||
if (!force_mbr) {
|
||||
mbr = 0;
|
||||
} else {
|
||||
hint8 = hint8 & 0x80 ? 0x80 : 0x00;
|
||||
hint8 &= 0x80;
|
||||
device_write(&hint8, 494, sizeof(uint8_t));
|
||||
}
|
||||
}
|
||||
any_active = any_active ? any_active : (hint8 & 0x80) != 0;
|
||||
any_active = any_active || (hint8 & 0x80) != 0;
|
||||
|
||||
char hintc[64];
|
||||
device_read(hintc, 4, 8);
|
||||
|
Loading…
Reference in New Issue
Block a user