17 #define stralloc strdup
18 #define P(x) x /* for function prototypes */
21 * Tape drive status structure. This abstracts the things we are
22 * interested in from the free-for-all of what the various drivers
27 char online_valid; /* is the online flag valid? */
28 char bot_valid; /* is the BOT flag valid? */
29 char eot_valid; /* is the EOT flag valid? */
30 char protected_valid; /* is the protected flag valid? */
31 char flags_valid; /* is the flags field valid? */
32 char fileno_valid; /* is the fileno field valid? */
33 char blkno_valid; /* is the blkno field valid? */
34 char device_status_valid; /* is the device status field valid? */
35 char error_status_valid; /* is the device status field valid? */
37 char online; /* true if device is online/ready */
38 char bot; /* true if tape is at the beginning */
39 char eot; /* true if tape is at end of medium */
40 char protected; /* true if tape is write protected */
41 long flags; /* device flags, whatever that is */
42 long fileno; /* tape file number */
43 long blkno; /* block within file */
44 int device_status_size; /* size of orig device status field */
45 unsigned long device_status; /* "device status", whatever that is */
46 int error_status_size; /* size of orig error status field */
47 unsigned long error_status; /* "error status", whatever that is */
51 extern int rait_open ();
52 extern int rait_access P((char *, int));
53 extern int rait_stat P((char *, struct stat *));
54 extern int rait_close P((int ));
55 extern int rait_lseek P((int , long, int));
56 extern ssize_t rait_write P((int , const void *, size_t));
57 extern ssize_t rait_read P((int , void *, size_t));
58 extern int rait_ioctl P((int , int, void *));
59 extern int rait_copy P((char *f1, char *f2, int buflen));
61 extern char *rait_init_namelist P((char * dev,
65 extern int rait_next_name P((char * dev_left,
70 extern int rait_tape_open ();
71 extern int rait_tapefd_fsf P((int rait_tapefd, int count));
72 extern int rait_tapefd_rewind P((int rait_tapefd));
73 extern void rait_tapefd_resetofs P((int rait_tapefd));
74 extern int rait_tapefd_unload P((int rait_tapefd));
75 extern int rait_tapefd_status P((int rait_tapefd, struct am_mt_status *stat));
76 extern int rait_tapefd_weof P((int rait_tapefd, int count));
77 extern int rait_tapefd_can_fork P((int));
81 /* handle ugly Solaris stat mess */
83 #ifdef _FILE_OFFSET_BITS
87 #if _FILE_OFFSET_BITS == 64
90 long st_pad1[3]; /* reserved for network id */
104 char st_fstype[_ST_FSTYPSZ];
105 long st_pad4[8]; /* expansion area */
111 #define access(p,f) rait_access(p,f)
112 #define stat(a,b) rait_stat(a,b)
113 #define open rait_open
114 #define close(a) rait_close(a)
115 #define read(f,b,l) rait_read(f,b,l)
116 #define write(f,b,l) rait_write(f,b,l)
117 #define ioctl(f,n,x) rait_ioctl(f,n,x)