z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


BPX1VRD, BPX4VRD (v_readdir)

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

The following code reads the multiple entries from a directory, whose previously looked-up vnode token is in DIRVNODETOK, into the buffer provided. FUIOCURSOR, set to zero by the BPXYFUIO macro, indicates that the system is to begin reading with the first entry in the directory. Presuming that this is the first time the directory is read, FUIOCHKACC is set, in order to verify access authority. For the callable service, see v_readdir (BPX1VRD, BPX4VRD) — Read entries from a directory. For the data structures, see BPXYOSS — Map operating system specific informationand Mapping macros in z/OS UNIX System Services Programming: Assembler Callable Services Reference.
         MVC   OSSSTOR,OSS           Initialize BPXYOSS area
         MVC   FUIOSTOR,FUIO         Initialize BPXYFUIO area
         LA    R5,FUIOSTOR           Address and
         USING FUIO,R5               map BPXYFUIO area
         LA    R15,BUFFERA           Set address of buffer
         ST    R15,FUIOBUFFERADDR    for directory data in FUIO
         MVC   FUIOIBYTESRW,=F'1023' Max number of bytes to read
         OI    FUIOFLAGS,FUIOCHKACC  Check authorization
         DROP  R5
         SPACE ,
         CALL  BPX1VRD,              Read directory entries            +
               (DIRVNODETOK,         Input: Vnode token for directory  +
               OSSSTOR,              Input/output: BPXYOSS             +
               FUIOSTOR,             Input/output: BPXYFUIO            +
               RETVAL,               Return value: 0, -1 or char count +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014