add debug output for backlight
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 10 Jan 2012 21:08:58 +0000 (21:08 +0000)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 10 Jan 2012 21:08:58 +0000 (21:08 +0000)
SVN revision: 67023

src/bin/e_backlight_main.c

index cdeecf8..7ae56fa 100644 (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;
 }