1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Linux: Add getdents64 system call

No 32-bit system call wrapper is added because the interface
is problematic because it cannot deal with 64-bit inode numbers
and 64-bit directory hashes.

A future commit will deprecate the undocumented getdirentries
and getdirentries64 functions.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Florian Weimer
2019-06-07 09:27:01 +02:00
parent de751ebc9e
commit 51ea67d548
38 changed files with 282 additions and 9 deletions

View File

@ -31,8 +31,10 @@
/* Pack the dirent64 struct down into 32-bit offset/inode fields, and
ensure that no overflow occurs. */
ssize_t
__getdents (int fd, char *buf, size_t nbytes)
__getdents (int fd, void *buf0, size_t nbytes)
{
char *buf = buf0;
union
{
/* For !_DIRENT_MATCHES_DIRENT64 kernel 'linux_dirent64' has the same