[comp.os.minix] Fix to bug in wini.c

m692040@sdsu.UUCP (deborah mullen) (05/19/87)

I have an ARC Turbo Xt colone with a Xebec hard disk controller.
Minix can up ok except for the hard disk (10mb). I could only use
the first partition and even then occasionally got disk errors.

I used the fixes that Gary Oliver and Harry McGavran posted for
wini.c  For my system, the disk table pointers (type_0 and
type_1) are NOT reversed as Harry McGavran suggests.

I located a new bug. On line 614 of the original listing:
   
  copy_prt( i * 5); 
  should be:  copy_prt( i);

The parameter expected by copy_prt() is the drive number ( 0 or 1).
Copy_prt copies the partition table into an array of structures.

If for some reason (could happen with clones), the variable, nr_drives,
gets set with a 1 instead of a 0, then copy_prt() will fail. I have
no problems with the hard disk now ( Minix is on last partition).

Contrary to other postings, I have no problem with fsck on HD.

bing@galbp.UUCP (Bing Bang) (05/26/87)

I have another bug fix for hard disks. I own a Micro-1 turbo XT with a unknown
made-in-the-orient controller and a 20mb hard disk. I was getting so many disk
errors before this fix that I could hardly do a mkfs without getting into
serious trouble. The same symptoms showed up on all the Wyse PCs at my office
which uses a Adaptec controller. The problem was fixed in the routine com_out
in the file xt_wini.c by holding the interrupts turned off untill after the
status port has been read, right after the 6 command bytes are output to the
controller. This fixed all the problems for my Micro-1 as well as the Wyses at
work. Might want to give this a try if you have hd problems. I posted this
article sometime ago, but because of our news engine having difficulties, I
doubt it made it out of our site.

Bing H Bang
Harris/Lanier
Atlanta GA

MSDOS: An example of what an OS should not be like.