OSDN Git Service

enlarge the read buffer jb-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 18 Aug 2013 14:58:46 +0000 (22:58 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 18 Aug 2013 14:58:46 +0000 (22:58 +0800)
As Michael Cunningham suggested, intel_video has more digits.

lights.c

index 53ccb82..74d8eaf 100644 (file)
--- a/lights.c
+++ b/lights.c
@@ -73,8 +73,8 @@ static int read_int(char* path)
 
     fd = open(path, O_RDONLY);
     if (fd >= 0) {
-        char buffer[3];
-        int amt = read(fd, buffer, 3);
+        char buffer[20];
+        int amt = read(fd, buffer, 20);
         close(fd);
         if (amt <= 0) return -errno;
         int ret = -1;