MCPcopy Create free account
hub / github.com/apache/nuttx / verify_directory

Function verify_directory

tools/configure.c:469–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469static void verify_directory(const char *directory)
470{
471 struct stat buf;
472
473 if (stat(directory, &buf) < 0)
474 {
475 fprintf(stderr, "ERROR: stat of %s failed: %s\n",
476 directory, strerror(errno));
477 exit(EXIT_FAILURE);
478 }
479
480 if (!S_ISDIR(buf.st_mode))
481 {
482 fprintf(stderr, "ERROR: %s exists but is not a directory\n",
483 directory);
484 exit(EXIT_FAILURE);
485 }
486}
487
488static bool verify_optiondir(const char *directory)
489{

Callers 3

dumpcfgsFunction · 0.70
find_topdirFunction · 0.70
check_configdirFunction · 0.70

Calls 4

fprintfFunction · 0.85
strerrorFunction · 0.85
exitFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected