aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2009-02-21 14:14:32 -0300
committerLeandro A. F. Pereira <leandro@hardinfo.org>2009-02-21 14:14:32 -0300
commit5be48c1fcba0d3526fe6e1940b2120e83970a7da (patch)
treed64de3405e8539c65b4c810aea3795ac9d140075
parent6bc92795d0855cc08cf93e00a13f11595d36c7ec (diff)
Use find_program() for apcaccess too.
-rw-r--r--hardinfo2/arch/linux/common/battery.h8
-rw-r--r--hardinfo2/pixmaps/network-statistics.pngbin1011 -> 1163 bytes
2 files changed, 6 insertions, 2 deletions
diff --git a/hardinfo2/arch/linux/common/battery.h b/hardinfo2/arch/linux/common/battery.h
index f4cf46dc..683cf01d 100644
--- a/hardinfo2/arch/linux/common/battery.h
+++ b/hardinfo2/arch/linux/common/battery.h
@@ -56,10 +56,12 @@ __scan_battery_apcupsd(void)
{
GHashTable *ups_data;
FILE *apcaccess;
- char buffer[512];
+ char buffer[512], *apcaccess_path;
int i;
- if ((apcaccess = popen("apcaccess", "r"))) {
+ apcaccess_path = find_program("apcaccess");
+
+ if ((apcaccess = popen(apcaccess_path, "r"))) {
/* first line isn't important */
if (fgets(buffer, 512, apcaccess)) {
/* allocate the key, value hash table */
@@ -92,6 +94,8 @@ __scan_battery_apcupsd(void)
pclose(apcaccess);
}
+
+ g_free(apcaccess_path);
}
static void
diff --git a/hardinfo2/pixmaps/network-statistics.png b/hardinfo2/pixmaps/network-statistics.png
index c82d574f..18a118a2 100644
--- a/hardinfo2/pixmaps/network-statistics.png
+++ b/hardinfo2/pixmaps/network-statistics.png
Binary files differ