DosSetFSInfo (OS/2 1.x): Difference between revisions
Appearance
Created page with "==Description== This call sets information for a file system device. ==Syntax== <PRE> DosSetFSInfo (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize) </PRE> ==Paramet..." |
mNo edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This call sets information for a file system device. | This call sets information for a file system device. | ||
==Syntax== | ==Syntax== | ||
DosSetFSInfo (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize) | |||
DosSetFSInfo | |||
==Parameters== | ==Parameters== | ||
; DriveNumber (USHORT) - input : Logical drive number, for example, 0 = default and 1 = A, and the FSD for the media currently in that drive. A value of '0xFFFF' notes that FSInfoBuf contains the ASCIIZ path name of the FSD. | ;DriveNumber (USHORT) - input : Logical drive number, for example, 0 = default and 1 = A, and the FSD for the media currently in that drive. A value of '0xFFFF' notes that FSInfoBuf contains the ASCIIZ path name of the FSD. | ||
; FSInfoLevel (USHORT) - input : Level of file information to be set. A value of 2 is the only valid value for FSInfoLevel. | |||
; FSInfoLevel (USHORT) - input : Level of file information to be set. A value of 2 is the only valid value for FSInfoLevel. | |||
; FSInfoBuf (PBYTE) - input : Address of the storage area where the system gets the new file system information. | ; FSInfoBuf (PBYTE) - input : Address of the storage area where the system gets the new file system information. | ||
'''Level 2 Information''' | '''Level 2 Information''' | ||
Level 2 information is specified in the following format: | Level 2 information is specified in the following format: | ||
::1 Length of Volume Label (null not included) | |||
::2-N Volume Label ASCIIZ string. | |||
;FSInfoBufSize (USHORT) - input : Length of FSInfoBuf. | |||
; FSInfoBufSize (USHORT) - input : Length of FSInfoBuf. | |||
==Return Code== | ==Return Code== | ||
;rc (USHORT) - return:Return code descriptions are: | |||
*0 NO_ERROR | |||
*15 ERROR_INVALID_DRIVE | |||
Return code descriptions are: | *82 ERROR_CANNOT_MAKE | ||
*122 ERROR_INSUFFICIENT_BUFFER | |||
* 0 | *123 ERROR_INVALID_NAME | ||
* 15 | *124 ERROR_INVALID_LEVEL | ||
* 82 | *154 ERROR_LABEL_TOO_LONG | ||
* 122 | |||
* 123 | |||
* 124 | |||
* 154 | |||
==Remarks== | ==Remarks== | ||
Trailing blanks supplied at volume label definition time are not returned by DosQFSInfo. | Trailing blanks supplied at volume label definition time are not returned by [[DosQFSInfo]]. | ||
File system information can be set only if the volume is opened in a mode that allows write-access. | File system information can be set only if the volume is opened in a mode that allows write-access. | ||
== | ==Bindings== | ||
===C | ===C=== | ||
<PRE> | <PRE> | ||
#define INCL_DOSFILEMGR | #define INCL_DOSFILEMGR | ||
Line 52: | Line 38: | ||
FSInfoBufSize); | FSInfoBufSize); | ||
USHORT | USHORT DriveNumber; /* Drive number */ | ||
USHORT | USHORT FSInfoLevel; /* File system data type */ | ||
PBYTE | PBYTE FSInfoBuf; /* File system info buffer */ | ||
USHORT | USHORT FSInfoBufSize; /* File system info buffer size */ | ||
USHORT | USHORT rc; /* return code */ | ||
</PRE> | </PRE> | ||
===MASM | ===MASM=== | ||
<PRE> | <PRE> | ||
EXTRN DosSetFSInfo:FAR | EXTRN DosSetFSInfo:FAR | ||
Line 73: | Line 59: | ||
Returns WORD | Returns WORD | ||
</PRE> | </PRE> | ||
[[Category: | [[Category:Dos16]] |
Latest revision as of 07:47, 26 January 2020
This call sets information for a file system device.
Syntax
DosSetFSInfo (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize)
Parameters
- DriveNumber (USHORT) - input
- Logical drive number, for example, 0 = default and 1 = A, and the FSD for the media currently in that drive. A value of '0xFFFF' notes that FSInfoBuf contains the ASCIIZ path name of the FSD.
- FSInfoLevel (USHORT) - input
- Level of file information to be set. A value of 2 is the only valid value for FSInfoLevel.
- FSInfoBuf (PBYTE) - input
- Address of the storage area where the system gets the new file system information.
Level 2 Information Level 2 information is specified in the following format:
- 1 Length of Volume Label (null not included)
- 2-N Volume Label ASCIIZ string.
- FSInfoBufSize (USHORT) - input
- Length of FSInfoBuf.
Return Code
- rc (USHORT) - return
- Return code descriptions are:
- 0 NO_ERROR
- 15 ERROR_INVALID_DRIVE
- 82 ERROR_CANNOT_MAKE
- 122 ERROR_INSUFFICIENT_BUFFER
- 123 ERROR_INVALID_NAME
- 124 ERROR_INVALID_LEVEL
- 154 ERROR_LABEL_TOO_LONG
Remarks
Trailing blanks supplied at volume label definition time are not returned by DosQFSInfo.
File system information can be set only if the volume is opened in a mode that allows write-access.
Bindings
C
#define INCL_DOSFILEMGR USHORT rc = DosSetFSInfo(DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize); USHORT DriveNumber; /* Drive number */ USHORT FSInfoLevel; /* File system data type */ PBYTE FSInfoBuf; /* File system info buffer */ USHORT FSInfoBufSize; /* File system info buffer size */ USHORT rc; /* return code */
MASM
EXTRN DosSetFSInfo:FAR INCL_DOSFILEMGR EQU 1 PUSH WORD DriveNumber ;Drive number PUSH WORD FSInfoLevel ;File system data type PUSH@ OTHER FSInfoBuf ;File system info buffer PUSH WORD FSInfoBufSize ;File system info buffer size CALL DosSetFSInfo Returns WORD