TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Patrick Haller
date: 1996-01-29 08:11:58
subject: DosDevIOCtls

Hi All!

Situation:
* Syquest 3270S drive -> removeable media
* LOCKDRV.FLT         -> the "removeable media drive" is
"converted" to a "fixed disk".
* I use HPFS on the medias (beats FAT at least factor 3).

Now I tried to regain the ability to change the HPFS-formatted media. I
know very well (really :) that it's up to IBM to invent FS_UNMOUNT and
FS_FLUSHCACHE into the IFS (re: HPFS), several new IOCTLs and to provide
mechanisms for HPFS on removeable medias. However - why not try some tricky
things :) So I checked all (documented) IOCtls for the disk subsystems.

Working so far:
* DosShutdown(1L) flushes the filesystem data caches (lazy writes).
* DSK_REDETERMINEMEDIA seems to be 90% reliable for flushing the HPFS
CDI-caches (directory structure). Sometimes the old directory structure
remains and I was unable to figure out why so far.

If OS2ASPI.DMD /SHARE is active, then the media can be ejected with RMVTOOL
(adaptec scsi kit). The new inserted media becomes correctly mounted after
DSK_REDETERMINEMEDIA. 

But:
* DSK_SETDEVICEPARAMS fails when trying to set the device type from
"5-fixed disk" to any other value, e.g. "removeable" or
"other". However the return code is NO_ERROR.
* DSK_UNLOCKEJECTMEDIA gives me 87 ERROR_INVALID_PARAMETER when used on
fixed disks. Using it on the CDROM drive (same parameters!!!) gives
rc=NO_ERROR but does absolutely nothing. My intention was to unlock the
syquest so I can eject the media without tricks via OS2ASPI.DMD and
RMVTOOL.

Can anyone comment the behaviour of those IOCTLs ? Is DSK_UNLOCKEJECTMEDIA
only good for advanced floppy drives with eject functionality ?


At last I think I can't create pseudo-removeable media support without
sending SCSI-commands directly. So I'll rather wait for IBM to invent the
missing functionality :)
     __
     |_)
cu/2 |atrick
[Team  OS/2]

---
* Origin: OS/2 Bodensee ! (2:246/2315.18)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 246/2315 2300 2340 24/901 240/5500 24/24 396/1 270/101 712/515
@PATH: 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™.