public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* leavedos if floppy busy
@ 2003-05-16 12:03 Grigory Batalov
  2003-05-16 12:13 ` Reinhard Karcher
  0 siblings, 1 reply; 3+ messages in thread
From: Grigory Batalov @ 2003-05-16 12:03 UTC (permalink / raw)
  To: linux-msdos

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

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)

-- 
Grigory Batalov

[-- Attachment #2: disks.diff --]
[-- Type: text/plain, Size: 753 bytes --]

--- src/base/misc/disks.c.orig	2003-05-16 14:41:05 +0400
+++ src/base/misc/disks.c	2003-05-16 14:48:08 +0400
@@ -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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* leavedos if floppy busy
  2003-05-16 12:03 Grigory Batalov
@ 2003-05-16 12:13 ` Reinhard Karcher
  0 siblings, 0 replies; 3+ messages in thread
From: Reinhard Karcher @ 2003-05-16 12:13 UTC (permalink / raw)
  To: linux-msdos

On Fri, May 16, 2003 at 04:03:14PM +0400, Grigory Batalov wrote
> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: leavedos if floppy busy
@ 2003-05-17 18:08 Stas Sergeev
  0 siblings, 0 replies; 3+ messages in thread
From: Stas Sergeev @ 2003-05-17 18:08 UTC (permalink / raw)
  To: linux-msdos

Hello.

Grigory Batalov wrote:
> Can we just ignore busy disk if it is floppy?
It seems that checkdp() is always
called after disk_open(), so indeed
it seems to me that doing such a
checks in open_disk() was useless.
So I think that checks should be
removed entirely, no matter whether
it is the removable media or not.
Also calling leavedos() when you can
just return an error to DOS looks
evil.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-17 18:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-17 18:08 leavedos if floppy busy Stas Sergeev
  -- strict thread matches above, loose matches on Subject: below --
2003-05-16 12:03 Grigory Batalov
2003-05-16 12:13 ` Reinhard Karcher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox