MCPcopy Create free account
hub / github.com/apple/foundationdb / getDeviceId

Function getDeviceId

flow/Platform.actor.cpp:900–917  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

898}
899
900dev_t getDeviceId(std::string path) {
901 struct stat statInfo;
902
903 while (true) {
904 int returnValue = stat(path.c_str(), &statInfo);
905 if (!returnValue)
906 break;
907
908 if (errno == ENOENT) {
909 path = parentDirectory(path);
910 } else {
911 TraceEvent(SevError, "GetDeviceIdError").detail("Path", path).GetLastError();
912 throw platform_error();
913 }
914 }
915
916 return statInfo.st_dev;
917}
918
919#endif
920

Callers 2

openMethod · 0.85
Net2FileSystemMethod · 0.85

Calls 5

TraceEventClass · 0.85
detailMethod · 0.80
statClass · 0.70
parentDirectoryFunction · 0.70
c_strMethod · 0.45

Tested by

no test coverage detected