DosSetFSInfo (OS/2 1.x)

From EDM2
Jump to: navigation, search

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