[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MiNT-1.07 mediach() patch
Hi,
here is a small patch for MiNT-1.07beta. The problem was
calling mediach() for a filesystem which has no bios device
associated. Now we check if the drive is known to gemdos
and let it fall through.
I'm not sure wether this works without problems. Please let
me know your thoughts about it.
Cheers, Thomas.
ts@uni-paderborn.de
--- filesys.org Thu Jul 1 10:11:28 1993
+++ filesys.c Thu Jul 1 09:12:54 1993
@@ -375,8 +375,17 @@
TRACE(("calling mediach(%d)",d));
r = (int)mediach(d);
TRACE(("mediach(%d) == %d", d, r));
-
+#if 1 /* Local patch by zork/tfs for ydisk and other
+ * non-bios-device-filesystems
+ */
+if (r < 0)
+ if ((r == EUNDEV) && ((drvmap() & (1UL << d)) != 0))
+ return 0; /* No media-change on a no-bios-device-filesystem */
+ else
+ return r;
+#else
if (r < 0) return r;
+#endif
if (r == 1) { /* drive _may_ have changed */
r = rwabs(0, tmpbuf, 1, 0, d, 0L); /* check the BIOS */
if (r != E_CHNG) { /* nope, no change */