[Pkg-wmaker-commits] [wmbattery] 37/241: * Don't crash if there is a /proc/acpi/ with no status file.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:37:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbattery.
commit e64737ff89678c58d167a68dcfe4fe2212f4ae7c
Author: joey <joey at a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Date: Sat Jun 1 01:50:43 2002 +0000
* Don't crash if there is a /proc/acpi/ with no status file.
---
acpi.c | 1 +
debian/changelog | 6 ++++++
sonypi.c | 1 +
3 files changed, 8 insertions(+)
diff --git a/acpi.c b/acpi.c
index 854b2ed..04ffadf 100644
--- a/acpi.c
+++ b/acpi.c
@@ -81,6 +81,7 @@ inline char *scan_acpi_value (const char *buf, const char *key) {
* from a file, slow if called many times. */
char *get_acpi_value (const char *file, const char *key) {
char *buf = get_acpi_file(file);
+ if (! buf) return NULL;
return scan_acpi_value(buf, key);
}
diff --git a/debian/changelog b/debian/changelog
index 5564eb5..2c77e55 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+wmbattery (2.08) unstable; urgency=low
+
+ * Don't crash if there is a /proc/acpi/ with no status file.
+
+ -- Joey Hess <joeyh at debian.org> Fri, 31 May 2002 21:35:06 -0400
+
wmbattery (2.07) unstable; urgency=low
* Added symbolic apm info constants to "apm.h", in case they are
diff --git a/sonypi.c b/sonypi.c
index 942699b..71ff9b1 100644
--- a/sonypi.c
+++ b/sonypi.c
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include <sys/ioctl.h>
#include "apm.h"
#include <sys/types.h>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git
More information about the Pkg-wmaker-commits
mailing list