The Ftape Installation Guide - Ioctls
The following comes from the ftape replacement mtio.h for the kernel's
`mtio.h
' (see MTSETBLK). Note that mt_blksz
is measured
in bytes but mt_size
and mt_rawsize
are measured in
kilobytes.
struct mtvolinfo { unsigned int mt_volno; /* vol-number */ unsigned int mt_blksz; /* blocksize used when recording */ unsigned int mt_rawsize; /* raw tape space consumed, in kb */ unsigned int mt_size; /* volume size after decompression, in kb */ unsigned int mt_cmpr:1; /* this volume has been compressed */ }; #define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo)
This ioctl queries information about the volume the tape drive is positioned at. The meaning of the components of the structure are:
mt_volno
mt_blksz
mt_rawsize
mt_size
mt_cmpr
When this ioctl is send to the driver when it is located at EOM (end of
recorded media, end of data), then mt_rawsize
gives the raw
amount of data (i.e. without compression) still usable on the tape. In
this case the mt_size
component will be set to zero and
mt_blksz
reflects block size currently used by zftape.
Use these buttons to jump to the top menu