if (rand_fd == INVALID_FD) {
LOG_ERROR(LOG_TAG, "%s can't open rand fd %s: %s ", __func__, RANDOM_PATH,
strerror(errno));
- CHECK(0);
+ CHECK(rand_fd != INVALID_FD);
}
ssize_t read_bytes = read(rand_fd, &rand, sizeof(rand));
}
thread->tid = gettid();
- LOG_WARN(LOG_TAG, "%s: thread id %d, thread name %s started", __func__,
+ LOG_INFO(LOG_TAG, "%s: thread id %d, thread name %s started", __func__,
thread->tid, thread->name);
semaphore_post(start->start_sem);
#include <mutex>
#include <string>
+#include "base/logging.h"
#include "osi/include/alarm.h"
#include "osi/include/allocator.h"
#include "osi/include/log.h"
if (wake_lock_fd == INVALID_FD) {
LOG_ERROR(LOG_TAG, "%s can't open wake lock %s: %s", __func__,
wake_lock_path.c_str(), strerror(errno));
+ CHECK(wake_lock_fd != INVALID_FD);
}
if (wake_unlock_path.empty()) wake_unlock_path = DEFAULT_WAKE_UNLOCK_PATH;
if (wake_unlock_fd == INVALID_FD) {
LOG_ERROR(LOG_TAG, "%s can't open wake unlock %s: %s", __func__,
wake_unlock_path.c_str(), strerror(errno));
+ CHECK(wake_unlock_fd != INVALID_FD);
}
}