mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-05 21:07:52 +00:00
Fixed major issues with ACPI batteries
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@894 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
cf49198176
commit
3bc35afa30
@ -2198,6 +2198,7 @@ static struct text_object *construct_text_object(const char *s, const char *arg,
|
||||
} else {
|
||||
strcpy(bat, "BAT0");
|
||||
}
|
||||
obj->data.s = strdup(bat);
|
||||
#if defined(__linux__)
|
||||
END OBJ(i8k_version, INFO_I8K)
|
||||
END OBJ(i8k_bios, INFO_I8K)
|
||||
|
@ -1460,7 +1460,7 @@ int get_battery_perct(const char *bat)
|
||||
|
||||
/* Only check for ACPI */
|
||||
|
||||
if (acpi_bat_fp == NULL && apm_bat_fp == NULL)
|
||||
if (acpi_bat_fp[idx] == NULL && apm_bat_fp[idx] == NULL)
|
||||
acpi_bat_fp[idx] = open_file(acpi_path, &rep);
|
||||
|
||||
int remaining_capacity = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user