diff --git a/src/battery.c b/src/battery.c
index 85bfc00ac373cd644be8a6ca6249c60356056d3b..53442ce6dc049a2145cb53a81460c3e63e934361 100644 (file)
--- a/src/battery.c
+++ b/src/battery.c
if ((dh = opendir ("/proc/acpi/battery")) == NULL)
{
- ERROR ("Cannot open `/proc/acpi/battery': %s", strerror (errno));
+ char errbuf[1024];
+ ERROR ("Cannot open `/proc/acpi/battery': %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
return (-1);
}
if ((fh = fopen (filename, "r")) == NULL)
{
- ERROR ("Cannot open `%s': %s", filename, strerror (errno));
+ char errbuf[1024];
+ ERROR ("Cannot open `%s': %s", filename,
+ sstrerror (errno, errbuf,
+ sizeof (errbuf)));
continue;
}