On 09/02/11 15:39, Kevin Brott wrote:> ...
> $ echo xxxx > file1
> $ TAR_OPTIONS=--numeric-owner truss src/tar chof archive file1
> fstatat (-2, "file1", 2ff22688, 0) -> -1; errno = 22 (A system call received a parameter that is not valid.)
> $ src/tar cf archive file1That's interesting. It appears that fstatat (AT_FDCWD, ...) works
> fstatat (-2, "file1", 2ff226a8, 1) -> 0; st_size = 5
only if the last argument is 1. Can you reproduce the problem with
the following little test program?
if (fstatat (AT_FDCWD, ".", &a, 0) != 0)
struct stat a;
If my guess is right, this returns nonzero exit status, which is a bug.
If my guess is wrong, perhaps you can change the test to make it
"right", by replacing "." with the name of some other file in the
working directory, or by compiling with -D_LARGE_FILES, or by doing
both at the same time.