TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Alan Clifford
date: 1995-10-18 22:09:08
subject: checking drives

Hello all

I'm porting a dos program to OS/2 using Gnu/Emx.

The problem is this:

I have a file name, say "b:\log\activity.log" which I want to try
to open.  It is possible the file does not exist as the name is user input.

Under dos, I use int 21h, function 44h to switch the floppy drive to 'b' to
avoid the dos message "insert disk in drive b" which occurs when
'a' and 'b' share the same physical drive.

I also use the Turbo C harderr() function to avoid the dos message
"drive not ready" if there isn't a floppy in the drive.

Now how do I do the same thing with Gnu for OS/2 to avoid the "Insert
diskette for drive B:" and the "B: device not ready" system
error messages and handle the errors myself?

Also, suggestions for what to read about this sort of thing would be welcome.

Alan
---
* Origin: Alan's point off Donor/2 (2:440/4.6)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 440/4 141/209 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.