Skip to contentSkip to conversation

cpufrequtils sysfs: increase MAX_LINE_LEN

PATCH In review Roman Vasiyarov 2 participants 4 messages Apr 23, 2011 – Apr 25, 2011 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufrequtils sysfs: increase MAX_LINE_LEN

larger sysfs data (>255 bytes) was truncated and thus used improperly

---
 lib/sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/sysfs.c +1 -1
index 4e0edab..24dd563 100644
@@ -18,7 +18,7 @@
 #include "cpufreq.h"
 
 #define PATH_TO_CPU "/sys/devices/system/cpu/"
-#define MAX_LINE_LEN 255
+#define MAX_LINE_LEN 4096
 #define SYSFS_PATH_MAX 255
 
 /* helper function to read file from /sys into given buffer */
Signature · 1 line
1.7.4.4
#1 lore raw
Quoted 1 line · Roman Vasiyarov

larger sysfs data (>255 bytes) was truncated and thus used improperly

Thanks, patch looks good and useful. However, could you add a Signed-off-by - line, please, as per Documentation/SubmittingPatches ?

Thanks & best,
Dominik

#2 lore raw

PATCH 1/1 cpufrequtils sysfs: increase MAX_LINE_LEN

larger sysfs data (>255 bytes) was truncated and thus used improperly

---
 lib/sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/sysfs.c +1 -1
index 4e0edab..24dd563 100644
@@ -18,7 +18,7 @@
 #include "cpufreq.h"
 
 #define PATH_TO_CPU "/sys/devices/system/cpu/"
-#define MAX_LINE_LEN 255
+#define MAX_LINE_LEN 4096
 #define SYSFS_PATH_MAX 255
 
 /* helper function to read file from /sys into given buffer */
Signature · 1 line
1.7.4.4