libpower: log errors to logcat

Bug: n/a
Test: failure to open /sys/power/wake_lock is now recorded in logcat
Change-Id: Ifb390888d0e83b411295a35a3addbef604c930d0
This commit is contained in:
Tri Vo 2018-05-17 13:34:31 -07:00
parent a0f1235676
commit 80cdb8d1d0

View file

@ -57,7 +57,7 @@ open_file_descriptors(const char * const paths[])
int fd = open(paths[i], O_RDWR | O_CLOEXEC);
if (fd < 0) {
g_error = -errno;
fprintf(stderr, "fatal error opening \"%s\": %s\n", paths[i],
ALOGE("fatal error opening \"%s\": %s\n", paths[i],
strerror(errno));
return -1;
}