Description: support more that 4 entries in /sys/.../power_supply/ Author: Dietz Proepper --- acpitool-0.5.1.orig/src/battery.cpp +++ acpitool-0.5.1/src/battery.cpp @@ -788,7 +788,7 @@ int Count_Batteries_ProcFS() int Count_Batteries_SysFS() { DIR *battery_dir; - char filename[4][65], str[100]; + char filename[10][65], str[100]; char *name, *dirname; int findex = 0, batcount = 0; @@ -813,7 +813,7 @@ int Count_Batteries_SysFS() // skip . and .. // if (!strcmp (".", name) || !strcmp ("..", name)) continue; - assert (findex < 4); + assert (findex < 10); sprintf(filename[findex], "/sys/class/power_supply/%s/type", name); findex++;