Raw vs. block device. I'm confused.

sdyer%bbn-unix at sri-unix.UUCP sdyer%bbn-unix at sri-unix.UUCP
Tue Jan 10 04:06:06 AEST 1984


From:  Steve Dyer <sdyer at bbn-unix>


In general, most UNIX magtape drivers use the following conventions with
the RAW device:

	read(fh, buf, nbytes) returns -1 when nbytes < physical record size

		otherwise,

	read(fh, buf, nbytes) returns the actual number of bytes in the record
		(i.e., it transfers only a single record, regardless of the
		 byte count.)

I have always ascribed the former behavior to a limitation of the controller;
it transfers a full record or nothing.

/Steve Dyer
sdyer at bbncca
decvax!bbncca!sdyer



More information about the Comp.unix mailing list