OS/2 codes: How to check if IFS was loaded

IFS stands for Installable File System. With IFS, OS/2 can support various file systems even if they are not supported by default.

What should we do to check if a specific IFS was loaded ?

First of all, we can iterate all drives from A to Z, and check the attached IFS to them. However, this method cannot check IFS which is loaded but not attached yet. In addition, same IFS may be attached to the different drives. This causes extra cost when programming.

To solve the above unconveniences is to check IFS directly. How ? DosFSCtl() provides such functions.

DosFSCtl() provides the communication between an application and a specific IFS. If the given IFS was not loaded, it returns ERROR_INVALID_FSD_NAME, otherwise any other error codes. Using this, it's possible to check if a specific IFS was loaded.

However, note that the IFS name passed to DosFSCtl() is neither the filename of the IFS nor the file-system name in the boot sector. It's the exported name by IFS. For example, HPFS386.IFS exports HPFS, NETWKSTA.200 exports LAN.

Here are the source codes:

댓글

이 블로그의 인기 게시물

토렌트: < 왕좌의 게임 > 시즌 1 ~ 시즌 8 완결편 마그넷

토렌트: NGC < 코스모스 > 우리말 더빙 전편(1편~13편) 마그넷

토렌트: < 스타워즈 > Ep.1 ~ Ep.6 마그넷