add debug output for backlight

SVN revision: 67023
This commit is contained in:
Mike Blumenkrantz 2012-01-10 21:08:58 +00:00
parent ea8f8c3a75
commit a0ae01c227
1 changed files with 2 additions and 1 deletions

View File

@ -22,13 +22,14 @@ _bl_write_file(const char *file, int val)
perror("open");
return -1;
}
snprintf(buf, sizeof(buf), "%i", val);
snprintf(buf, sizeof(buf), "%d", val);
if (write(fd, buf, strlen(buf)) != (int)strlen(buf))
{
perror("write");
close(fd);
return -1;
}
fprintf(stderr, "BACKLIGHT: %s -> %d", file, val);
close(fd);
return 0;
}