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:
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:
댓글
댓글 쓰기