Commit Graph

6 Commits

Author SHA1 Message Date
Xin LI
4c1f1c62ca Cleanup usr.sbin/fd* so they can compile under WARNS=6.
fdcontrol/fdcontrol.c:
	- Add const constraint to an intermediate value
	  which is not supposed to be changed elsewhere.
fdread/fdread.c:
	- Use _devname in favor of devname to avoid name
	  conflicit.
	- -1 is less than any positive number so in order
	  to get the block to function, we should get the
	  block a little earlier.
	- Cast to remove signed when we are sure that a
	  return value is positive, or is compared with
	  an positive number (tracknumber of a floppy
	  disk is not likely to have UINT_MAX/2 anyway)
fdread/fdutil.c:
	- Use more specific initializer
fdwrite/fdwrite.c:
	- Use static on format_track since it's not
	  referenced in other places.
	- Use const char* to represent string constant.

Bump WARNS accordingly.
2005-01-08 15:46:06 +00:00
Joerg Wunsch
65217f13ff Break out the function to print the FDC error information into
fdutil.c so it can be used elsewhere.
2001-07-02 21:21:58 +00:00
Joerg Wunsch
8a5f4c1290 Implement the -I option that uses the FD_READID ioctl in order to read
sector ID fields from a floppy, and display them.
2001-06-26 22:17:21 +00:00
Joerg Wunsch
d137c337ae Part #2 of the <machine/ioctl_fd.h> => <sys/fdcio.h> move: handle the
tools in usr.sbin/fd*.
2001-06-06 06:16:19 +00:00
Joerg Wunsch
ba44060da7 Now that we've got the ne765.h file installed under <dev/ic/>, use it
here instead of the old "/sys/isa/ic/..." hack.  This should fix
building the world for machines that don't have a /sys symlink,
finally.
2001-06-04 21:16:28 +00:00
Joerg Wunsch
b97809a770 Initial import of fdread(1), a logical counterpart to fdwrite(1).
Its main purpose is to adapt automatically to the floppy parameters
(in particular the track size for efficient reading), and to allow a
simple error recovery for CRC-errored sectors.  Requires the newly
added fdc(4) options.
2001-05-14 20:22:49 +00:00