dfs_getfilemapinfo

Returns file extents, each with the number of blocks, starting block, and volume block. numbers

Library:LibC
Classification:Novell
Service:Direct File System

Syntax

  #include <dfs.h>  
   
  int dfs_getfilemapinfo (
     int              fildes,
     uint32_t         startingBlock,
     int             *entryCount,
     size_t           tableSize,
     dfs_filemap_t   *table );
  

Parameters

fildes

(IN) Specifies the file handle returned from a prior call to open for the file.

startingBlock

(IN) Specifies the starting file block address for which map is requested (zero relative).

entryCount

(OUT) Points to the number of valid file map entries returned.

tableSize

(IN) Specifies the number of file map entries for which space has been allocated by the caller in the following table (that is, maximum number of dfs_filemap_t structures to be returned).

table

(OUT) Points to a table of file map entries.

Return Values

If successful, returns 0. Otherwise, returns a nonzero error code:

Decimal

Constant

Description

4

EBADF

The fildes parameter isn't a valid file descriptor.

79

ENOTSUP

The NLM is loaded in protected address space. This operation is supported only in kernel address space.

106

ENOCONTEXT

The current thread has not context.

For possible DFS errors, see Section 13.4.5, DFS Return Values.

Remarks

This function provides the details of exactly where a given file’s logical blocks are located, including where file holes and the end of a file’s allocated storage space is, so that the application can expand the file by calling dfs_extend.

See Also