jlu@cs.umr.edu (Jui-lin Lu) (01/16/91)
Greeting *, I downloaded DOSREAD.C from plains.nodak.edu a couple of days ago. Unfortunately, I cannot make it work properly with my 1.44MB floppy in B. Only partial dir entries were shown by using dosdir. After tracing down to kernel/floppy.c and dosread.c, it seemed to me that problem occurred at lseek() system call. Dosread could correctly compute the ROOTADDR, TOTSEC, etc. But, when it tried to locate file position by lseek(), it failed. The following are what I got when running dosdir: ROOTADDR 9728(decimal, which is computed by 19*512) lssek() locates 11264th byte. The difference is 1536 which, in turn, is 512*3. Because 1.2MB has 15 sectors per track and 18 for 1.44MB, I kind of believed 3 = 18 - 15. In other words, when lseek() reached 16th sector, it switch to next track. As a result, it located 11264th byte. Any info can help me out? I'm using Bruce's 386 (with bcc) with shoelace. Is there any patch for lseek()? Or, if my guess were wrong, please show me the correct one? Thanks in advance!! -- ***************************************--- student ---* * Obviousness is always the enemy of * \ Eric J. Lu / * * correctness. -- Bertrand Russell * / jlu@cs.umr.edu \ * ***************************************--- Univ. of Missouri-Rolla ---*