dfs_readnowait

Reads the sectors requested from a file using DFS, returning after initiation.

Library:LibC
Classification:Novell
Service:Direct File System

Syntax

  #include <dfs.h>  
   
  int dfs_readnowait (
     int              fildes,
     uint32_t         startingSector,
     size_t           sectorCount,
     void            *buffer,
     dfs_cbparms_t   *cbNode );
  

Parameters

fildes

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

startingSector

(IN) Specifies the starting sector number (logical offset from beginning of file) in the file where the read operation is to begin.

sectorCount

(IN) Specifies the number of sectors to be read into the buffer.

buffer

(OUT) Points to a contiguous buffer area large enough to contain the number of sectors indicated to be read.

cbNode

(IN) Pointer to a structure used to signal completion of all requested reads for a particular call to dfs_readnowait.

Return Values

If successful in initiating the request, 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.

The actual completion is stored in the ccode field of the dfs_cbparms_t structure upon completion of the request. For possible DFS errors, see Section 13.4.5, DFS Return Values.

Remarks

This function is identical to dfs_read, except that the function caller returns immediately after posting the reads to the driver. This means that the status returned from the function only indicates whether the call was initiated or not. The completion status is returned in the structure provided for completion notification.

A calling process must allow other processes to run. Consequently, any long sequence of code including this function call should call a thread yield function to allow other processes to execute.

See Also