1Magnetic Tape ioctl's are just (again) a compatibility problem with Linux. 2 3 4The /etc/rmt protocol allows to send ioctls to the remote system and relies on 5the fact that MTIO opcodes 0..7 of all UNIX systems are mapped to the same function. 6Linux unfortunately does not follow these rules. 7 8/*--------------------------------------------------------------------------*/ 9All other UNIX 10/*--------------------------------------------------------------------------*/ 11/* 12 * values for mt_op 13 */ 14#define MTWEOF 0 /* write an end-of-file record */ 15#define MTFSF 1 /* forward space over file mark */ 16#define MTBSF 2 /* backward space over file mark (1/2" only ) */ 17#define MTFSR 3 /* forward space to inter-record gap */ 18#define MTBSR 4 /* backward space to inter-record gap */ 19#define MTREW 5 /* rewind */ 20#define MTOFFL 6 /* rewind and put the drive offline */ 21#define MTNOP 7 /* no operation, sets status only */ 22 23/*--------------------------------------------------------------------------*/ 24Linux 25/*--------------------------------------------------------------------------*/ 26/* Magnetic Tape operations [Not all operations supported by all drivers]: */ 27#define MTRESET 0 /* +reset drive in case of problems */ 28#define MTFSF 1 /* forward space over FileMark, 29 * position at first record of next file 30 */ 31#define MTBSF 2 /* backward space FileMark (position before FM) */ 32#define MTFSR 3 /* forward space record */ 33#define MTBSR 4 /* backward space record */ 34#define MTWEOF 5 /* write an end-of-file record (mark) */ 35#define MTREW 6 /* rewind */ 36#define MTOFFL 7 /* rewind and put the drive offline (eject?) */ 37#define MTNOP 8 /* no op, set status only (read with MTIOCGET) */ 38 39Operation Description UNIX -> Linux 40==================================================================== 410 weof writes EOF (file mark) resets drive!!! 421 fsf forward skip file mark OK 432 bsf backwd skip file mark OK 443 fsr forward skip record OK 454 bsr backwd skip record OK 465 rew rewind writes file mark!!! 476 offl unload media partially OK 487 nop set status in driver unloads media 498 NOP is mapped to the vendor dependant 50 range. On Sun this is a retension 51 which takes a long time... 52 53 54The rmt server and client code used in the star distribution voids 55these problems with Linux. 56 57