controller reports a successful seek, it is very unlikely to report
seeking to a cylinder other than the one requested, but we check for
this, and botched the error handling for the requested_cylinder != 0
case. This error happened when the bug fixed in rev.1.52 of <sys/buf.h>
caused the head of buffer queue to change to one starting on a different
cylnder - the requested cylinder was found, but it wasn't what we
thought we requested. The fix is simply to arrange to reset the state
machine.
Corruption of the buffer queue seems to only have been a problem in the
floppy driver. Other drivers dequeue the head of the queue before doing
physical i/o on it, so the corruption at worse broke the elevator sort
order. Dequeueing breaks it anyway.
o When reporting a int21 function we don't know about yet, report
AH as the major and AL as the minor, as opposed to reporting AL
as the major.
o Add support for 21:44:7: ioctl check output status. We
optimistically say that output is always ready.
o Add half support for 21:23: get file size. We always now return
failure. This function isn't supported, according to the interrupt
list, by the DOS box in windows, so I don't feel too bad.
o Remove init printf
o Don't set optind from return value for do_args. getopt has already
done this.
o Bump EMS memory from 1M to 10M (this really should be a command line
option).
o Open /dev/null when requested to open emmxxxx0 to allow many programs
checking to see if EMS is installed to find it.
o Route int67 to ems_entry to allow EMS to be used when DOS is emulated
as well as when DOS is booted. This may obviate the need for the
driver doing anything at all in a really booted situation and won't
hurt that case.
I can now run the DOS program I'm interested in running with enough
EMS memory that its "advanced" functions are enabled and working.
run at the same time.
Notes:
The fileupdate function is still somewhat broken. Instead of
returning a failure code if it can't modify the original file it
renames the .new file and continues as though nothing is wrong.
This will cause the lock on the original file to be lost and could
lead to a similar race condition. I left that portion of the code
alone since I feel that the maintainer of the code would have a
better concept of how he wants to handle errors in that function
than I do.
PR: bin/6787
Submitted by: Craig Spannring <cts@internetcds.com>
These asm statments are not quite as pessimal as when I complained
about them in rev.1.9 of audio.c. They seem to be only 40% slower
than the C version on P5's and the same speed on K6's.
to int32_t's and all unsigned longs to u_int32_t's. Fixed the one
printf format broken by this. The old math emulator now compiles
cleanly on i386's with 64-bit longs. It may even work, provided
suword() doesn't actually write a long.
nearly so many casts here. Casting an pointer that was an integer
back to an integer just to compare it with -1 is bad, and casting
it back just to compare it with NULL is just wrong.
Access the entry address as a uintfptr_t, not as a long, and not
necessarily as what modload(8) passes (it takes a u_long from the
exec header and passes a u_int).