+2000-09-13 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/getdents.c: Pretty print.
+
2000-09-01 Jes Sorensen <jes@linuxcare.com>
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Add
#include <errno.h>
#include <dirent.h>
#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <sys/param.h>
struct kernel_dirent64
{
- u_int64_t d_ino;
+ uint64_t d_ino;
int64_t d_off;
unsigned short int d_reclen;
unsigned char d_type;
ssize_t retval;
#ifdef __NR_getdents64
-#ifndef __ASSUME_GETDENTS64_SYSCALL
+# ifndef __ASSUME_GETDENTS64_SYSCALL
if (!__have_no_getdents64)
-#endif
+# endif
{
-#ifndef __ASSUME_GETDENTS64_SYSCALL
+# ifndef __ASSUME_GETDENTS64_SYSCALL
int saved_errno = errno;
-#endif
+# endif
char *kbuf = buf;
size_t kbytes = nbytes;
if (offsetof (DIRENT_TYPE, d_name)
}
retval = INLINE_SYSCALL (getdents64, 3, fd, CHECK_N(kbuf, kbytes),
kbytes);
-#ifndef __ASSUME_GETDENTS64_SYSCALL
+# ifndef __ASSUME_GETDENTS64_SYSCALL
if (retval != -1 && errno != -EINVAL)
-#endif
+# endif
{
struct kernel_dirent64 *kdp;
const size_t size_diff = (offsetof (struct kernel_dirent64, d_name)
size_t old_reclen = kdp->d_reclen;
size_t new_reclen = ((old_reclen - size_diff + alignment - 1)
& ~(alignment - 1));
- u_int64_t d_ino = kdp->d_ino;
+ uint64_t d_ino = kdp->d_ino;
int64_t d_off = kdp->d_off;
unsigned char d_type = kdp->d_type;
return (char *) dp - buf;
}
-#ifndef __ASSUME_GETDENTS64_SYSCALL
+# ifndef __ASSUME_GETDENTS64_SYSCALL
__set_errno (saved_errno);
__have_no_getdents64 = 1;
-#endif
+# endif
}
#endif
{