From 7108b2c75cb41d58403ce832c336c24da490b6e0 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Wed, 9 Nov 2016 23:49:00 +0100 Subject: [PATCH] Make tape work when not using a device process, i.e. -DKLH10_DEV_DPTM03=0. --- src/dvtm03.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/dvtm03.c b/src/dvtm03.c index effe3ad..b6cf110 100644 --- a/src/dvtm03.c +++ b/src/dvtm03.c @@ -239,7 +239,8 @@ static void tm_attn(struct tmdev *tm); static void tm_ssint(struct tmdev *tm); static void tm_space(struct tmdev *tm, int revf); static int tm_io(struct tmdev *tm, int dirf); -static void tm_ssel(struct tmdev *tm), tm_ssta(struct tmdev *tm); +static void tm_ssel(struct tmdev *tm); +static void tm_ssta(struct tmdev *tm); static int tm_filbuf(struct tmdev *tm); static int tm_flsbuf(struct tmdev *tm, int revf); static void tm_showbuf(struct tmdev *tm, @@ -1668,9 +1669,15 @@ tm_cmddon(register struct tmdev *tm) ** Use the dp status, rather than the register, in case the OS ** happens to have another slave selected, as TOPS-20 will initially. */ +#if KLH10_DEV_DPTM03 + int mounted = tm->tm_sdptm->dptm_mol; +#else + int mounted = vmt_ismounted(&(tm->tm_vmt)); /* Get state */ +#endif /* KLH10_DEV_DPTM03 */ + fprintf(DVDBF(tm), "[%s: Tape %s]\r\n", tm->tm_dv.dv_name, - (tm->tm_sdptm->dptm_mol) ? "online" : "offline"); + mounted ? "online" : "offline"); } TMREG(tm, RHR_STS) |= TM_SSSC; /* Set SSC - slave changed state */ tm_attn(tm);