#include <sys/types.h>#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <unistd.h>#include <fcntl.h>#include <string.h>#include <sys/ioctl.h>#include <sys/mtio.h>Include dependency graph for mt.c:

Go to the source code of this file.
Data Structures | |
| struct | tape_operation |
Defines | |
| #define | nil NULL |
| #define | _POSIX_SOURCE 1 |
| #define | DS_OK 0 |
| #define | DS_ERR 1 |
| #define | DS_EOF 2 |
| #define | SENSE_KEY 0x0F |
| #define | SENSE_ILI 0x20 |
| #define | SENSE_EOM 0x40 |
| #define | SENSE_EOF 0x80 |
| #define | SELF -1 |
| #define | IGN -1 |
| #define | NNG 0 |
| #define | POS 1 |
| #define | arraysize(a) (sizeof(a)/sizeof((a)[0])) |
| #define | arraylimit(a) ((a) + arraysize(a)) |
Typedefs | |
| typedef tape_operation | tape_operation_t |
Functions | |
| void | usage (void) |
| int | main (int argc, char **argv) |
Variables | |
| tape_operation_t | tapeops [] |
| char * | dev_state [] |
| char * | scsi_sense [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Definition at line 82 of file mt.c. References arraylimit, count, ERANGE, errno, exit(), fprintf(), getenv(), mtop::mt_count, nil, op, r, stderr, strcmp, strlen(), strncmp(), strtol(), tapeops, and usage. |
|
|
|
|
|
Initial value: {
"OK", "ERR", "EOF"
}
|
|
|
Initial value: {
"NO SENSE INFO", "RECOVERED ERROR", "NOT READY", "MEDIUM ERROR",
"HARDWARE ERROR", "ILLEGAL REQUEST", "UNIT ATTENTION", "DATA PROTECT",
"BLANK CHECK", "VENDOR UNIQUE ERROR", "COPY ABORTED", "ABORTED COMMAND",
"EQUAL", "VOLUME OVERFLOW", "MISCOMPARE", "SENSE RESERVED"
}
|
|
|
Initial value: {
{ MTWEOF, "eof", POS },
{ MTWEOF, "weof", POS },
{ MTFSF, "fsf", POS },
{ MTFSR, "fsr", POS },
{ MTBSF, "bsf", NNG },
{ MTBSR, "bsr", POS },
{ MTEOM, "eom", IGN },
{ MTREW, "rewind", IGN },
{ MTOFFL, "offline", IGN },
{ MTOFFL, "rewoffl", IGN },
{ SELF, "status", IGN },
{ MTRETEN, "retension",IGN },
{ MTERASE, "erase", IGN },
{ MTMODE, "density", NNG },
{ MTBLKZ, "blksize", NNG },
{ MTBLKZ, "blocksize",NNG },
}
Definition at line 42 of file mt.c. Referenced by main(). |
1.4.6