/******************************** * pisces.h - Pisces specific user level defines go here. * * Last rev: 5-17-83 JRA * *******************************/ #define MAXMOUNT 7 /* maximum number of mount instances */ /* * ioctl defines for discs */ #define DISC_SIZE (('D'<<8)|0) /* get disc size */ #define DISC_FORMAT (('D'<<8)|1) /* format a disc */ #define DSCVOL (('D'<<8)|2) /* get disc volume */ #define DISC_TYPE (('D'<<8)|3) /* is the media non-removable? */ #define DISC_VOLUME (('D'<<8)|4) /* get disc volume and time */ #define VALIDATE_KEY (('D'<<8)|5) /* validate a disc key */ #define DISC_DESCRIBE (('D'<<8)|6) /* get ss80 disc description */ /* * ioctl defines for the realtime driver */ #define WAIT_DISC (('R'<<8)|0) /* wait for a disc to be changed */ #define WHICH_DIR (('R'<<8)|1) /* what is the directory the new disc mounted under */ #define DISABLE_MOUNT (('R'<<8)|2) /* disable auto mount */ #define ENABLE_MOUNT (('R'<<8)|3) /* enable auto mount */ #define SET_DISC (('R'<<8)|4) /* set dir name of last mounted disc */ #define DISC_STATUS (('R'<<8)|5) /* get status of a disc */ #define DEV_STATUS (('R'<<8)|6) /* get status of a disc */ #define KILL_ZOMBIES (('R'<<8)|7) /* kill any zombie processes */ #define MOUNT_DISC (('R'<<8)|8) /* mount a disc, but don't report */ #define UNMOUNT_DISC (('R'<<8)|9) /* unmount a disc, but don't report */ /* * disc_status ioctl commands * implemented by the /dev/realtime driver * The DISC_STATUS ioctl command takes as its * argument the name of a block special file in * /dev and returns the disc's status, volume name, * and directory name onto which the disc is mounted. * The DEV_STATUS is similar to the DISC_STATUS * ioctl, except that it takes the dev number as * its argument. */ /* disc_status defines */ #define READY 0 #define NO_DISK_IN_DRIVE 1 #define MOUNT_FAILED 2 #define BAD_DEVICE 3 #define DISABLED 4 #define OTHER_ERROR 5 #define UNMOUNT_FAILED 6 /* * structure for DISC_STATUS ioctl. * The name of the disc is passed in the dev_name parameter. * The realtime driver fills in the disc_status, dir_name, and * vol_name for the particular disc device. */ struct disc_stat { int disc_status; /* status of disc */ int signal_browser; /* tell browser about change */ char dev_name[32]; /* name of disc device */ char dir_name[32]; /* dir for the disc */ char vol_name[8]; /* volume of the disc */ }; /* * structure for DEV_STATUS ioctl. * The dev number of the disc is passed in the dev parameter. * The realtime driver fills in the disc_status, dir_name, and * vol_name for the particular disc device. */ struct dev_stat { int disc_status; /* status of disc */ int signal_browser; /* tell browser about change */ long dev; /* dev number of block driver */ char dir_name[32]; /* dir for the disc */ char vol_name[8]; /* volume of the disc */ }; /* * structure for the WAIT_DISC command. * This structure is used by .daemon when it issues the * WAIT_DISC command to the realtime driver. * When a driver or application program wakes up the realtime * driver, the information in the structure will be * filled out and returned to the .daemon program. * The .daemon program will then interrogate the disc, * and return the disc's status in a structure of the same type * when it again issues a WAIT_DISC command. */ /* * how the disc is specified in the wait_disc structure */ #define WD_NAME 0 /* specified by dev number */ #define WD_DEV 1 /* specified by dev name */ #define WD_MOUNT 128 /* attempt to mount the disc */ #define WD_UNMOUNT 129 /* attempt to unmount the disc */ struct wait_disc { int type; /* type of request */ int disc_status; /* status of disc */ int signal_browser; /* tell browser about change */ union { long dev; /* dev number of block driver */ char dev_name[32]; /* name of disc device */ } d; char dir_name[32]; /* dir for the disc */ char vol_name[8]; /* volume of the disc */ }; /* * disc_vol structure * This structure is used with the DISC_VOLUME * ioctl command to disc drivers. The structure is * used by an application to obtain a disc's volume * and time of creation. */ struct disc_vol { time_t ctime; char vol_label[14]; };