summaryrefslogtreecommitdiff
path: root/emulators/hercules/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/hercules/patches/patch-ab')
-rw-r--r--emulators/hercules/patches/patch-ab30
1 files changed, 30 insertions, 0 deletions
diff --git a/emulators/hercules/patches/patch-ab b/emulators/hercules/patches/patch-ab
new file mode 100644
index 00000000000..9619d8ed0e7
--- /dev/null
+++ b/emulators/hercules/patches/patch-ab
@@ -0,0 +1,30 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/02/19 12:35:21 agc Exp $
+
+Linux tape handling.
+
+--- tapedev.c 2001/02/19 11:50:37 1.1
++++ tapedev.c 2001/02/19 11:57:16
+@@ -1149,7 +1149,11 @@
+ dev->filename, strerror(errno));
+ return 0;
+ }
++#if (defined(BSD) && BSD >= 199306)
++ stat = (stblk.mt_dsreg << 16) | stblk.mt_erreg;
++#else
+ stat = stblk.mt_gstat;
++#endif
+
+ /* Display tape status */
+ if (dev->ccwtrace || dev->ccwstep)
+@@ -1240,7 +1244,11 @@
+ }
+
+ /* Intervention required if no tape is mounted */
++#if (defined(BSD) && BSD >= 199306)
++ if (GMT_DR_OPEN(((stblk.mt_dsreg << 16) | stblk.mt_erreg)))
++#else
+ if (GMT_DR_OPEN(stblk.mt_gstat))
++#endif
+ {
+ dev->sense[0] = SENSE_IR;
+ dev->sense[1] = SENSE1_TAPE_TUB;