.\" -*- coding: UTF-8 -*- .\" Copyright (C) 1995 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Written 11 June 1995 by Andries Brouwer .\" Modified 22 July 1995 by Michael Chastain : .\" In 1.3.X, returns only one entry each time; return value is different. .\" Modified 2004-12-01, mtk, fixed headers listed in SYNOPSIS .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH READDIR 2 "6 marca 2019 r." Linux "Podręcznik programisty Linuksa" .SH NAZWA readdir \- odczytanie wpisu w katalogu .SH SKŁADNIA .nf .PP \fBint readdir(unsigned int \fP\fIfd\fP\fB, struct old_linux_dirent *\fP\fIdirp\fP\fB,\fP \fB unsigned int \fP\fIcount\fP\fB);\fP .fi .PP \fIUwaga\fP: Do tego wywołania systemowego brak opakowania glibc, zob. UWAGI. .SH OPIS This is not the function you are interested in. Look at \fBreaddir\fP(3) for the POSIX conforming C library interface. This page documents the bare kernel system call interface, which is superseded by \fBgetdents\fP(2). .PP \fBreaddir\fP() reads one \fIold_linux_dirent\fP structure from the directory referred to by the file descriptor \fIfd\fP into the buffer pointed to by \fIdirp\fP. The argument \fIcount\fP is ignored; at most one \fIold_linux_dirent\fP structure is read. .PP The \fIold_linux_dirent\fP structure is declared (privately in Linux kernel file \fBfs/readdir.c\fP) as follows: .PP .in +4n .EX struct old_linux_dirent { unsigned long d_ino; /* inode number */ unsigned long d_offset; /* offset to this \fIold_linux_dirent\fP */ unsigned short d_namlen; /* length of this \fId_name\fP */ char d_name[1]; /* filename (null\-terminated) */ } .EE .in .PP \fId_ino\fP jest numerem i\-węzła. \fId_off\fP jest odległością od początku katalogu do tego wpisu \fIold_linux_dirent\fP. \fId_reclen\fP jest rozmiarem \fId_name\fP, nie licząc kończącego znaku NUL. \fId_name\fP jest zakończoną znakiem NUL nazwą pliku. .SH "WARTOŚĆ ZWRACANA" Po pomyślnym zakończeniu zwracane jest 1. Po natrafieniu na koniec katalogu zwracane jest 0. Po błędzie zwracane jest \-1 i odpowiednio ustawiane \fIerrno\fP. .SH BŁĘDY .TP \fBEBADF\fP Nieprawidłowy deskryptor \fIfd\fP. .TP \fBEFAULT\fP Argument wskazuje poza przestrzeń adresową wywołującego procesu. .TP \fBEINVAL\fP Bufor na wynik jest za mały. .TP \fBENOENT\fP Nie ma takiego katalogu. .TP \fBENOTDIR\fP Deksryptor pliku nie odnosi się do katalogu. .SH "ZGODNE Z" Tp wywołanie systemowe jest specyficzne dla Linuksa. .SH UWAGI Glibc does not provide a wrapper for this system call; call it using \fBsyscall\fP(2). You will need to define the \fIold_linux_dirent\fP structure yourself. However, probably you should use \fBreaddir\fP(3) instead. .PP This system call does not exist on x86\-64. .SH "ZOBACZ TAKŻE" \fBgetdents\fP(2), \fBreaddir\fP(3) .SH "O STRONIE" Angielska wersja tej strony pochodzi z wydania 5.10 projektu Linux \fIman\-pages\fP. Opis projektu, informacje dotyczące zgłaszania błędów oraz najnowszą wersję oryginału można znaleźć pod adresem \%https://www.kernel.org/doc/man\-pages/. .SH TŁUMACZENIE Autorami polskiego tłumaczenia niniejszej strony podręcznika są: Przemek Borys i Andrzej Krzysztofowicz . Niniejsze tłumaczenie jest wolną dokumentacją. Bliższe informacje o warunkach licencji można uzyskać zapoznając się z .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License w wersji 3 .UE lub nowszej. Nie przyjmuje się ŻADNEJ ODPOWIEDZIALNOŚCI. Błędy w tłumaczeniu strony podręcznika prosimy zgłaszać na adres .MT manpages-pl-list@lists.sourceforge.net .ME .