Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ readv(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                 readv(2)



        _________________________________________________________________
        readv                                                 System Call
        Read from file.
        _________________________________________________________________


        SYNTAX

        #include <sys/types.h>
        #include <sys/uio.h>

        int   readv  (fildes, iov, iovent)
        int             fildes;
        struct iovec    iov[];
        int             iovent;


        PARAMETERS

        fildes         An active, valid file descriptor.


        iov            An array of extents.


        iovent         The number of extents given.


        DESCRIPTION

        Readv transfers data from the object associated with <fildes>
        into the <iovent> buffers specified by the members of <iov[]>:
        iov[0], iov[1], ..., iov[iovent-1].  Each <iov[]> member
        specifies the base address and length of an area in memory where
        data should be placed.  Readv fills an area completely before
        proceeding to the next.

        The iov structure is defined as:
        struct iovec {
        caddr_t  iov_base;
        int      iov_len;
        };

        <Iovent> must be a positive number less than or equal to a
        system-imposed limit guaranteed to be at least 16.  The length of
        each extent (iov_len) in <iov[]> must be non-negative and the sum
        of these lengths must not overflow a `long'.

        Except for the disposition of the data, readv is equivalent to
        read.




        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                 readv(2)



        ACCESS CONTROL

        <Fildes> must be open for reading.


        RETURN VALUE

        0..nbyte       Completed successfully.  The number of bytes
                       actually read is returned.  The value 0 indicates
                       the `end-of-file' condition.  Here, nbyte is the
                       sum of the lengths of the <iovent> extents given
                       in <iov[]>.


        -1             An error occurred.  Errno is set to indicate the
                       error.


        EXCEPTIONS

        Errno may be set to one of the following error codes:


        EBADF          <Fildes> is not a valid file descriptor open for
                       reading.


        EFAULT         <Iov> points outside the allocated address space.


        EFAULT         One or more of the <iov[]> members point outside
                       the allocated address space.


        EINTR          A signal was caught during the system call.


        EINVAL         <Iovent> was invalid.


        EINVAL         One or more of the iov_len values in <iov[]> was
                       negative.


        EINVAL         The sum of the iov_len values in <iov[]>
                       overflowed a `long'.


        SEE ALSO

        The related manual sections:  creat(2), dup(2), dup2(2),



        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)





                                                                 readv(2)



        fcntl(2), ioctl(2), open(2), pipe(2), read(2), select(2),
        socket(2), socketpair(2),
        termio(7).



















































        DG/UX 4.00                                                 Page 3
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026