|
|
@ -36,9 +36,6 @@ |
|
|
|
static int write_int(char const *path, const int value) |
|
|
|
static int write_int(char const *path, const int value) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int fd; |
|
|
|
int fd; |
|
|
|
static int already_warned; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
already_warned = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ALOGV("write_int: path %s, value %d", path, value); |
|
|
|
ALOGV("write_int: path %s, value %d", path, value); |
|
|
|
fd = open(path, O_RDWR); |
|
|
|
fd = open(path, O_RDWR); |
|
|
@ -50,10 +47,7 @@ static int write_int(char const *path, const int value) |
|
|
|
close(fd); |
|
|
|
close(fd); |
|
|
|
return amt == -1 ? -errno : 0; |
|
|
|
return amt == -1 ? -errno : 0; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (already_warned == 0) { |
|
|
|
|
|
|
|
ALOGE("write_int failed to open %s\n", path); |
|
|
|
ALOGE("write_int failed to open %s\n", path); |
|
|
|
already_warned = 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return -errno; |
|
|
|
return -errno; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|