summaryrefslogtreecommitdiff
path: root/getfattr/getfattr.c
diff options
context:
space:
mode:
authorTim Shimmin <tes@sgi.com>2007-12-04 05:10:47 +0000
committerTim Shimmin <tes@sgi.com>2007-12-04 05:10:47 +0000
commit770365fc7cdee68d0f397b376d49970ff396a296 (patch)
treecdacc3bbbce7ca65eb2102f592b6dee325cf35a8 /getfattr/getfattr.c
parentc329461afb4c9a95eca8f44cd1d87471e8213464 (diff)
downloadattr-770365fc7cdee68d0f397b376d49970ff396a296.tar.gz
Add some code to the tree walking to better handle file descriptors.
Merge of master-melb:xfs-cmds:30192a by kenmcd.
Diffstat (limited to 'getfattr/getfattr.c')
-rw-r--r--getfattr/getfattr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/getfattr/getfattr.c b/getfattr/getfattr.c
index 9cabe43..ddd856e 100644
--- a/getfattr/getfattr.c
+++ b/getfattr/getfattr.c
@@ -346,12 +346,14 @@ int list_attributes(const char *path, int *header_printed)
return 0;
}
-int do_print(const char *path, const struct stat *stat, int walk_flags, void *unused)
+int do_print(const char *path, const struct stat *stat, int walk_flags,
+ void *unused)
{
int header_printed = 0;
if (walk_flags & WALK_TREE_FAILED) {
- fprintf(stderr, "%s: %s: %s\n", progname, xquote(path), strerror(errno));
+ fprintf(stderr, "%s: %s: %s\n", progname, xquote(path),
+ strerror(errno));
return 1;
}
@@ -474,7 +476,8 @@ int main(int argc, char *argv[])
}
while (optind < argc) {
- had_errors += walk_tree(argv[optind], walk_flags, do_print, NULL);
+ had_errors += walk_tree(argv[optind], walk_flags, 0,
+ do_print, NULL);
optind++;
}