summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authormrg <mrg>2003-11-10 23:53:32 +0000
committermrg <mrg>2003-11-10 23:53:32 +0000
commit367d5e0ead7c8b841edcdf02fb5667747fa589fe (patch)
tree9a04b297aaa6f45b787ccf2eba2b0a9be8729ce6 /sysutils
parent95982600e3c10ea92402e79b91c62a1d06c31b52 (diff)
downloadpkgsrc-367d5e0ead7c8b841edcdf02fb5667747fa589fe.tar.gz
rework the previous to not try to use _PATH_SYSMON if it isn't defined.
fixes PR#23355 finally.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xbattbar/distinfo4
-rw-r--r--sysutils/xbattbar/patches/patch-ab23
2 files changed, 16 insertions, 11 deletions
diff --git a/sysutils/xbattbar/distinfo b/sysutils/xbattbar/distinfo
index faa5c50990c..c8a3be90b88 100644
--- a/sysutils/xbattbar/distinfo
+++ b/sysutils/xbattbar/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.8 2003/11/05 07:26:04 mrg Exp $
+$NetBSD: distinfo,v 1.9 2003/11/10 23:53:32 mrg Exp $
SHA1 (xbattbar_1.4.2.tar.gz) = 14e9aafd62919e4a625d3f84df3b074b9eef8279
Size (xbattbar_1.4.2.tar.gz) = 14079 bytes
SHA1 (patch-aa) = 3bd4b688ccaeebe766335245c1a8c5dde52768c2
-SHA1 (patch-ab) = 4c2fd818e877606d8c5026c33a4475fa8b65bbf1
+SHA1 (patch-ab) = dfaf520dcc10228da4ab4c222210f0ecb4914f4f
diff --git a/sysutils/xbattbar/patches/patch-ab b/sysutils/xbattbar/patches/patch-ab
index 7ff04579586..32108a7cd55 100644
--- a/sysutils/xbattbar/patches/patch-ab
+++ b/sysutils/xbattbar/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.5 2003/11/05 07:26:04 mrg Exp $
+$NetBSD: patch-ab,v 1.6 2003/11/10 23:53:32 mrg Exp $
--- xbattbar.c.orig 2001-02-02 16:25:29.000000000 +1100
-+++ xbattbar.c 2003-11-03 17:17:11.000000000 +1100
++++ xbattbar.c 2003-11-10 17:50:08.000000000 +1100
@@ -27,6 +27,14 @@
#include <sys/types.h>
@@ -17,7 +17,7 @@ $NetBSD: patch-ab,v 1.5 2003/11/05 07:26:04 mrg Exp $
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
-@@ -583,39 +590,171 @@
+@@ -583,39 +591,174 @@
#define _PATH_APM_CTLDEV "/dev/apmctl"
#define _PATH_APM_NORMAL "/dev/apm"
@@ -89,17 +89,22 @@ $NetBSD: patch-ab,v 1.5 2003/11/05 07:26:04 mrg Exp $
{
int fd, r, p;
struct apm_power_info info;
+-
+- if ((fd = open(_PATH_APM_NORMAL, O_RDONLY)) == -1) {
+- fprintf(stderr, "xbattbar: cannot open apm device\n");
+- exit(1);
+ int acpi;
+ size_t ns;
+ size_t cc;
++ char *apmdev;
+ int i;
-
++
+ acpi = 0;
- if ((fd = open(_PATH_APM_NORMAL, O_RDONLY)) == -1) {
-- fprintf(stderr, "xbattbar: cannot open apm device\n");
-- exit(1);
++ apmdev = _PATH_APM_NORMAL;
++ if ((fd = open(apmdev, O_RDONLY)) == -1) {
+#ifdef HAVE_NETBSD_ACPI
-+ fd = open(_PATH_SYSMON, O_RDONLY);
++ apmdev = _PATH_SYSMON;
++ fd = open(apmdev, O_RDONLY);
+ acpi = 1;
+#endif
}
@@ -107,7 +112,7 @@ $NetBSD: patch-ab,v 1.5 2003/11/05 07:26:04 mrg Exp $
- if (ioctl(fd, APM_IOC_GETPOWER, &info) != 0) {
- fprintf(stderr, "xbattbar: ioctl APM_IOC_GETPOWER failed\n");
+ if (fd < 0) {
-+ fprintf(stderr, "xbattbar: cannot open %s device\n", (acpi) ? _PATH_SYSMON : _PATH_APM_NORMAL);
++ fprintf(stderr, "xbattbar: cannot open %s device\n", apmdev);
exit(1);
}