summaryrefslogtreecommitdiff
path: root/src/chown-core.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-10-17 11:12:44 +0000
committerJim Meyering <jim@meyering.net>2003-10-17 11:12:44 +0000
commitd0557a629424d0a8698e471c74af19851e0c765c (patch)
treee423d90d40359647a6b9e2e89a9bbe09a8f63d46 /src/chown-core.c
parent433a4c3059046642b0b79f9e6e9f0d8242e0117f (diff)
downloadcoreutils-d0557a629424d0a8698e471c74af19851e0c765c.tar.xz
Include "xfts.h".
(chown_files): Use xfts_open, rather than fts_open.
Diffstat (limited to 'src/chown-core.c')
-rw-r--r--src/chown-core.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/chown-core.c b/src/chown-core.c
index 41edd4c6f..532f84a05 100644
--- a/src/chown-core.c
+++ b/src/chown-core.c
@@ -25,7 +25,7 @@
#include "system.h"
#include "error.h"
-#include "fts_.h"
+#include "xfts.h"
#include "lchown.h"
#include "quote.h"
#include "savedir.h"
@@ -285,27 +285,7 @@ chown_files (char **files, int bit_flags,
{
int fail = 0;
- FTS *fts = fts_open (files, bit_flags, NULL);
- if (fts == NULL)
- {
- /* This can fail in three ways: out of memory, invalid bit_flags,
- and one or more of the FILES is an empty string. We could try
- to decipher that errno==EINVAL means invalid bit_flags and
- errno==ENOENT means there's an empty string, but that seems wrong.
- Ideally, fts_open would return a proper error indicator. For now,
- we'll presume that the bit_flags are valid and just check for
- empty strings. */
- bool invalid_arg = false;
- for (; *files; ++files)
- {
- if (**files == '\0')
- invalid_arg = true;
- }
- if (invalid_arg)
- error (EXIT_FAILURE, 0, _("invalid argument: %s"), quote (""));
- else
- xalloc_die ();
- }
+ FTS *fts = xfts_open (files, bit_flags, NULL);
while (1)
{