Provided by: manpages-es-dev_4.13-4_all bug

NOMBRE

       readdir - lee una entrada de un directorio

SINOPSIS

       int readdir(unsigned int fd, struct old_linux_dirent *dirp,
                   unsigned int count);

       Nota: No hay envoltorio glibc para esta llamada al sistema; véase NOTAS.

DESCRIPCIÓN

       This  is  not  the  function  you  are  interested  in.  Look at readdir(3)  for the POSIX
       conforming C  library  interface.   This  page  documents  the  bare  kernel  system  call
       interface, which is superseded by getdents(2).

       readdir()  reads one old_linux_dirent structure from the directory referred to by the file
       descriptor fd into the buffer pointed to by dirp.  The argument count is ignored; at  most
       one old_linux_dirent structure is read.

       The  old_linux_dirent  structure is declared (privately in Linux kernel file fs/readdir.c)
       as follows:

           struct old_linux_dirent {
               unsigned long d_ino;     /* número de nodo-í */
               unsigned long d_offset;  /* desplazamiento hasta el old_linux_dirent */
               unsigned short d_namlen; /* longitud del d_name */
               char  d_name[1];         /* nombre de fichero
                                           (acabado en nulo)*/
           }

       d_ino is an inode number.  d_offset is the distance from the start  of  the  directory  to
       this  old_linux_dirent.  d_reclen is the size of d_name, not counting the terminating null
       byte ('\0').  d_name is a null-terminated filename.

VALOR DEVUELTO

       En caso de éxito se devuelve 1.  Si se alcanzó el final del directorio se devuelve 0.   Si
       hubo un error se devuelve -1 y la variable errno se modifica apropiadamente.

ERRORES

       EBADF  Descriptor de fichero fd inválido.

       EFAULT El  argumento  señala  fuera  del espacio de direcciones del proceso que realiza la
              llamada.

       EINVAL El buffer para el resultado es demasiado pequeño.

       ENOENT No existe el directorio.

       ENOTDIR
              El descriptor de fichero no se refiere a un directorio.

CONFORME A

       Esta llamada al sistema es específica de Linux.

NOTAS

       Glibc does not provide a wrapper for this system call; call it using syscall(2).  You will
       need  to define the old_linux_dirent structure yourself.  However, probably you should use
       readdir(3)  instead.

       This system call does not exist on x86-64.

VÉASE TAMBIÉN

       getdents(2), readdir(3)

COLOFÓN

       Esta página es parte de la versión 5.10 del proyecto Linux man-pages. Puede encontrar  una
       descripción  del  proyecto, información sobre cómo informar errores y la última versión de
       esta página en https://www.kernel.org/doc/man-pages/.

TRADUCCIÓN

       La traducción al español de esta página del manual fue creada  por  Vicente  Pastor  Gómez
       <vpastorg@santandersupernet.com>

       Esta  traducción  es  documentación  libre;  lea  la  GNU General Public License Version 3
       ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩ o posterior con respecto a las condiciones  de
       copyright.  No existe NINGUNA RESPONSABILIDAD.

       Si  encuentra  algún  error  en  la  traducción de esta página del manual, envíe un correo
       electrónico a debian-l10n-spanish@lists.debian.org ⟨⟩.