1
0
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:
Toni Spets 2007-08-07 06:05:19 +00:00
parent cf49198176
commit 3bc35afa30
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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;