[Bug libc/4076] New: nftw "/" 0 FTW_CHDIR fails with "no such file or directory"
aurelien at aurel32 dot net
sourceware-bugzilla@sourceware.org
Mon Feb 19 16:20:00 GMT 2007
nftw to "/" with FTW_CHDIR fails with "no such file or directory"; see
the example below.
#define _GNU_SOURCE
#include <error.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <ftw.h>
static int fn(const char *file, const struct stat *sb, int flag, struct FTW *s)
{
puts(file);
return 0;
}
int main()
{
if (nftw("/", fn, 0, FTW_CHDIR) < 0) {
error(EXIT_FAILURE, errno, "nftw / FTW_CHDIR");
}
exit(EXIT_SUCCESS);
}
--
Summary: nftw "/" 0 FTW_CHDIR fails with "no such file or
directory"
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: aurelien at aurel32 dot net
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=4076
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the Glibc-bugs
mailing list