mtget
struct mtget mt;
static void status(struct mtget *);
struct mtget mt_status;
status(struct mtget *bp)
struct mtget mb;
memset(arg, 0, sizeof(struct mtget));
if (((struct mtget *)(void *)p)->mt_type < 256)
struct mtget *
struct mtget mts;
((struct mtget*)addr)->mt_type =
((struct mtget*)addr)->mt_dsreg = sc->flags; /* status */
((struct mtget*)addr)->mt_erreg = sc->error; /* errors */
((struct mtget*)addr)->mt_resid = 0;
((struct mtget*)addr)->mt_fileno = 0; /* file */
((struct mtget*)addr)->mt_blkno = 0; /* block */
((struct mtget *)data)->mt_type = MT_ISTMSCP;
mtget = (struct mtget *)data;
mtget->mt_type = MT_ISTS;
mtget->mt_dsreg = TS_RCSR(TSSR);
mtget->mt_erreg = sc->sc_vts->status.xst0;
mtget->mt_resid = 0; /* ??? */
mtget->mt_density = 0; /* ??? */
struct mtget *mtget; /* mag tape struct to get info in */
struct mtget *g = (struct mtget *) arg;
memset(g, 0, sizeof(struct mtget));
#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */
struct mtget mtget;
if (ioctl(tape, MTIOCGET, (char *)&mtget) < 0)
rval = sizeof (mtget);
(void)write(STDOUT_FILENO, (char *)&mtget, rval);