Files
oldlinux-files/Minix/1.7.1/fixes/fix-1
2024-02-19 00:21:39 -05:00

53 lines
1.6 KiB
Plaintext

Bug: The AT disk driver uses a scratch buffer in its initialization
routine that has not been initialized. This will cause the driver
to fail on old AT disks, and act funny with IDE disks.
How to fix:
Login as bin and type:
cd /usr && patch -p0 < this-file
Compile and install a new kernel image.
*** /save/std/1.7.1/src/kernel/at_wini.c Tue Oct 31 21:21:02 1995
--- src/kernel/at_wini.c Tue Nov 07 20:16:01 1995
***************
*** 923,928 ****
struct wini *wn;
/* Get the number of drives from the BIOS data area */
! phys_copy(0x475L, tmp_phys, 1L);
! if ((nr_drives = tmp_buf[0]) > 2) nr_drives = 2;
--- 923,930 ----
struct wini *wn;
+ u8_t params[16];
+ phys_bytes param_phys = vir2phys(params);
/* Get the number of drives from the BIOS data area */
! phys_copy(0x475L, param_phys, 1L);
! if ((nr_drives = params[0]) > 2) nr_drives = 2;
***************
*** 935,943 ****
/* Calculate the address of the parameters and copy them */
! phys_copy(hclick_to_physb(parv[1]) + parv[0], tmp_phys, 16L);
/* Copy the parameters to the structures of the drive */
! wn->lcylinders = bp_cylinders(tmp_buf);
! wn->lheads = bp_heads(tmp_buf);
! wn->lsectors = bp_sectors(tmp_buf);
! wn->precomp = bp_precomp(tmp_buf) >> 2;
}
--- 937,945 ----
/* Calculate the address of the parameters and copy them */
! phys_copy(hclick_to_physb(parv[1]) + parv[0], param_phys, 16L);
/* Copy the parameters to the structures of the drive */
! wn->lcylinders = bp_cylinders(params);
! wn->lheads = bp_heads(params);
! wn->lsectors = bp_sectors(params);
! wn->precomp = bp_precomp(params) >> 2;
}