MCPcopy Create free account
hub / github.com/coreutils/coreutils / process_files

Function process_files

src/chmod.c:370–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368 Return true if successful. */
369
370static bool
371process_files (char **files, int bit_flags)
372{
373 bool ok = true;
374
375 FTS *fts = xfts_open (files, bit_flags, NULL);
376
377 while (true)
378 {
379 FTSENT *ent;
380
381 ent = fts_read (fts);
382 if (ent == NULL)
383 {
384 if (errno != 0)
385 {
386 /* FIXME: try to give a better message */
387 if (! force_silent)
388 error (0, errno, _("fts_read failed"));
389 ok = false;
390 }
391 break;
392 }
393
394 ok &= process_file (fts, ent);
395 }
396
397 if (fts_close (fts) != 0)
398 {
399 error (0, errno, _("fts_close failed"));
400 ok = false;
401 }
402
403 return ok;
404}
405
406void
407usage (int status)

Callers 1

mainFunction · 0.70

Calls 2

xfts_openFunction · 0.85
process_fileFunction · 0.70

Tested by

no test coverage detected