mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Fix slice handling. Add 6 (`big' DOS partition) as a legal systemID.
This commit is contained in:
parent
72a9cf5eb8
commit
d0cd0e62b4
1 changed files with 3 additions and 2 deletions
|
|
@ -235,14 +235,15 @@ init_hdisk(int drive, int cyl, int head, int tracksize, char *file, char *fake_p
|
|||
for (fd = 0; fd < 4; ++fd) {
|
||||
if (*(u_short *)(di->sector0 + 0x1FE) == 0xAA55 &&
|
||||
ptab[fd].numSectors == head * tracksize * cyl &&
|
||||
(ptab[fd].systemID == 1 || ptab[fd].systemID == 4))
|
||||
(ptab[fd].systemID == 1 || ptab[fd].systemID == 4 ||
|
||||
ptab[fd].systemID == 6))
|
||||
break;
|
||||
}
|
||||
if (fd < 4) {
|
||||
if (fd)
|
||||
memcpy(ptab, ptab + fd, sizeof(PTAB));
|
||||
memset(ptab + 1, 0, sizeof(PTAB) * 3);
|
||||
di->offset = ptab[fd].relSector;
|
||||
di->offset = ptab[0].relSector;
|
||||
di->cylinders += di->offset / cylsize(di);
|
||||
} else {
|
||||
memset(ptab, 0, sizeof(PTAB) * 4);
|
||||
|
|
|
|||
Loading…
Reference in a new issue