On 08/18/2011 03:24 PM, Kevin Brott wrote:
> Any chance you could pass a short .diff this way for create.c that would
> result in the data dump you want?
Sure, here's a short (and untested) suggestion.
By the way, in rereading the truss output it appears
I misread how fstatat is implemented on AIX 7.1.
It's done via statxat, which should work.
--- create.c 2011-03-12 01:09:33.000000000 -0800
+++ create-test.c 2011-08-18 15:43:32.290722424 -0700
@@ -1638,7 +1638,11 @@ dump_file0 (struct tar_stat_info *st, ch
}
else if (fstatat (parentfd, name, &st->stat, fstatat_flags) != 0)
diag = stat_diag;
- else if (file_dumpable_p (&st->stat))
+ else
+ {
+ fprintf (stderr, "fstatat(...\"%s\"...) reports size=%lld\n",
+ name, (long long) st->stat.st_size);
+ if (file_dumpable_p (&st->stat))
{
fd = subfile_open (parent, name, open_read_flags);
if (fd < 0)
@@ -1648,8 +1652,12 @@ dump_file0 (struct tar_stat_info *st, ch
st->fd = fd;
if (fstat (fd, &st->stat) != 0)
diag = stat_diag;
+ else
+ fprintf (stderr, "fstat(...\"%s\"...) reports size=%lld\n",
+ name, (long long) st->stat.st_size);
}
}
+ }
if (diag)
{
file_removed_diag (p, top_level, diag);