Jump to content

DosSetFSInfo (OS/2 1.x): Difference between revisions

From EDM2
Created page with "==Description== This call sets information for a file system device. ==Syntax== <PRE> DosSetFSInfo (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize) </PRE> ==Paramet..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
This call sets information for a file system device.
This call sets information for a file system device.


==Syntax==
==Syntax==
<PRE>
  DosSetFSInfo (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize)
  DosSetFSInfo


    (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize)
</PRE>
==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)
'''Byte          Description'''
::2-N Volume Label ASCIIZ string.
  1              Length of Volume Label (null not included)  
;FSInfoBufSize (USHORT) - input : Length of FSInfoBuf.
2-N           Volume Label ASCIIZ string.  
 
; FSInfoBufSize (USHORT) - input : Length of FSInfoBuf.


==Return Code==
==Return Code==
 
;rc (USHORT) - return:Return code descriptions are:
rc (USHORT) - return
*0 NO_ERROR
 
*15 ERROR_INVALID_DRIVE
Return code descriptions are:
*82 ERROR_CANNOT_MAKE
 
*122 ERROR_INSUFFICIENT_BUFFER
* 0         NO_ERROR  
*123 ERROR_INVALID_NAME
* 15       ERROR_INVALID_DRIVE  
*124 ERROR_INVALID_LEVEL
* 82       ERROR_CANNOT_MAKE
*154 ERROR_LABEL_TOO_LONG
* 122       ERROR_INSUFFICIENT_BUFFER
* 123       ERROR_INVALID_NAME
* 124       ERROR_INVALID_LEVEL  
* 154       ERROR_LABEL_TOO_LONG


==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.  


==Example Code==
==Bindings==
===C Binding===
===C===
<PRE>
<PRE>
#define INCL_DOSFILEMGR
#define INCL_DOSFILEMGR
Line 52: Line 38:
                           FSInfoBufSize);
                           FSInfoBufSize);


USHORT           DriveNumber;  /* Drive number */
USHORT DriveNumber;  /* Drive number */
USHORT           FSInfoLevel;  /* File system data type */
USHORT FSInfoLevel;  /* File system data type */
PBYTE           FSInfoBuf;    /* File system info buffer */
PBYTE   FSInfoBuf;    /* File system info buffer */
USHORT           FSInfoBufSize; /* File system info buffer size */
USHORT FSInfoBufSize; /* File system info buffer size */


USHORT           rc;            /* return code */
USHORT rc;            /* return code */
</PRE>
</PRE>


===MASM Binding===
===MASM===
<PRE>
<PRE>
EXTRN  DosSetFSInfo:FAR
EXTRN  DosSetFSInfo:FAR
Line 73: Line 59:
Returns WORD
Returns WORD
</PRE>
</PRE>
==Related Functions==
*


[[Category:The OS/2 API Project]]
[[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