Lines Matching refs:mtfd
46 static int print_config(int mtfd);
49 static int status(int mtfd, struct mtget *);
95 int mtfd; in main() local
129 mtfd = open(tape, comp->c_oflag); in main()
130 if (mtfd < 0) { in main()
155 if (ioctl(mtfd, comp->c_code) < 0) { in main()
175 (void) ioctl(mtfd, MTIOCGET, (char *)&mt_status); in main()
176 if (ioctl(mtfd, MTIOCGET, (char *)&mt_status) < 0) { in main()
192 if (ioctl(mtfd, MTIOCLTOP, &mt_com) < 0) { in main()
211 if (ioctl(mtfd, MTIOCLTOP, &mt_com) < 0) { in main()
218 return (print_config(mtfd)); in main()
232 if (ioctl(mtfd, MTIOCLTOP, &mt_com) < 0) { in main()
255 if (ioctl(mtfd, MTIOCGET, (char *)&mt_status) < 0) { in main()
259 return (status(mtfd, &mt_status)); in main()
265 print_config(int mtfd) in print_config() argument
277 if (ioctl(mtfd, MTIOCGETDRIVETYPE, &mdt_req) != 0) { in print_config()
348 status(int mtfd, struct mtget *bp) in status() argument
361 if (ioctl(mtfd, MTIOCGETDRIVETYPE, &mdt_req) == 0) { in status()