BTW, I called the C program mtdumpoptions.c and the scrip mtoptions. rna On Thu, 31 Aug 2000, Robert Ambrose wrote: > > Here a ye olde quick and dirty options script/program. Think of it as a > starting point. What st.c really needs is a /proc file to get the options > from (hmmm, I feel a plan comming 8-) ). > > The 'C' part: > > #include > #include > #include > #include > > int > main ( > int argc, > char **argv > ) > { > int fd; > struct mtop mtop; > > if((fd = open(argv[1], O_RDONLY|O_NONBLOCK)) == -1) > perror("Can't open tape drive"); > mtop.mt_op = MTSETDRVBUFFER; > mtop.mt_count = MT_ST_CLEARBOOLEANS | MT_ST_DEBUGGING; > if(ioctl(fd, MTIOCTOP, &mtop) == -1) > perror("ioctl failed"); > close(fd); > exit(0); > } > > And the script part: > > mtdumpoptions /dev/st0 > > tail -4 /var/log/messages | cut -f7- -d' ' > > > ________________________________________________ > See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail. > > Plug-discuss mailing list - Plug-discuss@lists.PLUG.phoenix.az.us > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss >