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

Function check_directory

tools/configure.c:450–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448}
449
450static bool check_directory(const char *directory)
451{
452 struct stat buf;
453
454 if (stat(directory, &buf) < 0)
455 {
456 debug("stat of %s failed: %s\n", directory, strerror(errno));
457 return false;
458 }
459
460 if (!S_ISDIR(buf.st_mode))
461 {
462 debug("%s exists but is not a directory\n", directory);
463 return false;
464 }
465
466 return true;
467}
468
469static void verify_directory(const char *directory)
470{

Callers 1

find_topdirFunction · 0.85

Calls 3

strerrorFunction · 0.85
statClass · 0.70
debugFunction · 0.70

Tested by

no test coverage detected