OEMCrypto v18.3
Updates to OEMCrypto API, OPK, ODK, and unit tests. See the file CHANGELOG.md for details.
This commit is contained in:
@@ -176,6 +176,22 @@ bool FileSystem::Exists(const std::string& path) {
|
||||
return res;
|
||||
}
|
||||
|
||||
bool FileSystem::Exists(const std::string& path, int* errno_value) {
|
||||
struct stat buf;
|
||||
int error = 0;
|
||||
int res = stat(path.c_str(), &buf) == 0;
|
||||
if (!res) {
|
||||
error = errno;
|
||||
if (error == ENOENT) {
|
||||
LOGI("stat failed: ENOENT");
|
||||
} else {
|
||||
LOGE("stat failed: %d, %s", error, strerror(error));
|
||||
}
|
||||
}
|
||||
if (errno_value != nullptr) *errno_value = error;
|
||||
return res;
|
||||
}
|
||||
|
||||
bool FileSystem::Remove(const std::string& path) {
|
||||
if (IsDirectory(path)) {
|
||||
// Handle directory deletion
|
||||
|
||||
@@ -25,7 +25,7 @@ void InitLogging() {
|
||||
// set by jenkins (http://go/wvbuild), so that we have more details when the
|
||||
// build breaks.
|
||||
const char* verbose_env = getenv("VERBOSE_LOG");
|
||||
if (verbose_env && !strncmp(verbose_env, "yes", 3)) {
|
||||
if (verbose_env && strncmp(verbose_env, "yes", 3) == 0) {
|
||||
g_cutoff = CDM_LOG_VERBOSE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user