02.07.2013 Views

A/UX® System Administrator's Reference Sections 1M, 7, and 8

A/UX® System Administrator's Reference Sections 1M, 7, and 8

A/UX® System Administrator's Reference Sections 1M, 7, and 8

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

tc(7) tc(7)<br />

The tcb(l) program helps overcome the fixed-block-size problem<br />

when it is used to read from the tape or when it is used just before<br />

a write to the tape.<br />

Each read or wri te call reads or writes the next record on the<br />

tape. When writing, the record size returned is the same length as<br />

the block size given. When reading, the record size returned is the<br />

actual number of bytes read, which can be no greater than the<br />

buffer size; if the record is too long, an error is indicated.<br />

For the tc device driver, the ioctls <strong>and</strong> data structures associated<br />

with the mtio(7) generic tape interface are supported, including<br />

MTIOCGET <strong>and</strong> MTIOCTOP. The MTIOCGET ioctl returns the<br />

driver's notion of current file <strong>and</strong> block number information in<br />

mt fileno <strong>and</strong> mt blkno. The rot dsreg field contains the<br />

logIcal block numbef where the last I/O operation occurred.<br />

Though this generally matches mt blkno, they are both returned<br />

for testing purposes. -<br />

The mt _ erreg field always contains the current driver version.<br />

The number is a short integer, which is expressed as x. mn (for example,<br />

3.24). The version is encoded as<br />

(100 * x) + (10 *m) + n<br />

For this example, the value would be decimal 324.<br />

The mt resid field contains the number of usable blocks on the<br />

currently loaded cartridge. If this field is 0, the cartridge is not<br />

formatted.<br />

FILES<br />

/dev/rmt/tc [0-7]<br />

/dev/rmt/tc[0-7]n<br />

SEE ALSO<br />

mt(1), tar(1), tcb(1), tp(l), mtio(7).<br />

Rewind on close<br />

No rewind on close<br />

DIAGNOSTICS<br />

If an unformatted cartridge is loaded <strong>and</strong> the device is opened for<br />

read only, EINVAL is returned<br />

BUGS<br />

The tapemark format does not conform to any known st<strong>and</strong>ard because<br />

such st<strong>and</strong>ards are nonexistent. When end-of-file is encountered<br />

at a simulated tapemark, the tapemark record is transferred<br />

to the user's buffer, even though the return from read(2)<br />

(correctly) does not include the tapemark bytes. A O-byte count is<br />

February,1990<br />

Revision C<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!