Skip to contentSkip to conversation

leavedos if floppy busy

PATCH Grigory Batalov 2 participants 2 messages May 16, 2003

lore
Share & tools
lore
#0 lore raw

Hi!
I've found that if floppy is busy by running VMWare and I try format it, than dosemu silently exits. There is message in boot.log with -D9+d:

---
INT13: disk=0 ah=0x8 dp=0x83c1180
disk get parameters 0
INT13: disk=0 ah=0x18 dp=0x83c1180
disk: set media type 0 failed, 18 sectors, 80 tracks
...
INT13: disk=0 ah=0x3 dp=0x83c1180
ERROR: (disk) can't open /dev/fd0: Device or resource busy leavedos(22|0x16) called - shutting down
---

Can we just ignore busy disk if it is floppy?
(See attachement)

Signature · 1 line
Grigory Batalov
base/misc/disks.c renamed from base/misc/disks.c.orig +2 -2
@@ -686,14 +686,14 @@
       if (dp->fdesc < 0) {
         error("ERROR: (disk) can't open %s for read nor write: %s\n", dp->dev_name, strerror(errno));
         /* In case we DO get more clever, we want to share that code */
-        leavedos(22);
+        if (!dp->removeable) leavedos(22);
       } else {
         dp->rdonly = 1;
         d_printf("(disk) can't open %s for read/write. Readonly used.\n", dp->dev_name);
       }
     } else {
       d_printf("ERROR: (disk) can't open %s: %s\n", dp->dev_name, strerror(errno));
-      leavedos(22);
+      if (!dp->removeable) leavedos(22);
     }
   }
   else dp->rdonly = dp->wantrdonly;
#1 lore raw

On Fri, May 16, 2003 at 04:03:14PM +0400, Grigory Batalov wrote

Quoted 4 lines

Hi!
I've found that if floppy is busy by running VMWare and I try format it, than dosemu silently exits.

The same seems to happen, if there is no floppy inserted.

Reinhard