/* * MADER Project N.O.A.A. - FSL/NCDC * * This software and its documentation are in the public domain * and are furnished "as is." The United States government, * its instrumentalities, officers, employees, and agents make * no warranty, express or implied, as to the usefulness of the * software and documentation for any purpose. They assume no * responsibility (1) for the use of the software and * documentation; or (2) to provide technical support to users. * */ #include #include #include #include #include #define ERR -1 /*----------------------------------------------------------------------------- * Name: checkdrive.c * * Author: Dan Manns ( 12 Nov 1991 ) * * Purpose: to check to see if the tape drive is loaded * * Description: attempts to open the device and returns an exit status * * Parameters: none * * Return values: 0 - a tape is loaded * -1 - the drive is not loaded * * Dependencies: none * * Modifications: none *----------------------------------------------------------------------------- */ main() { int ftape; struct mtop mt_command; if ((ftape = open("/dev/nrst1",O_RDWR,0)) == ERR) { exit(ERR); } return 0; }