From 209e86a61a99b20823cb2fee5b8ae7edcdc91caf Mon Sep 17 00:00:00 2001 From: wiz Date: Fri, 3 May 2002 10:56:38 +0000 Subject: Fix apm handling, per pkg/16626 from Joachim Koenig-Baltes. --- wm/icewm/distinfo | 4 ++-- wm/icewm/patches/patch-ab | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'wm/icewm') diff --git a/wm/icewm/distinfo b/wm/icewm/distinfo index 1a898d876ce..b05c221224e 100644 --- a/wm/icewm/distinfo +++ b/wm/icewm/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.5 2002/03/10 22:08:14 wiz Exp $ +$NetBSD: distinfo,v 1.6 2002/05/03 10:56:38 wiz Exp $ SHA1 (icewm-1.0.9-2.tar.bz2) = f42d64996cde40f790247eb5428fb56dc2bfdb2f Size (icewm-1.0.9-2.tar.bz2) = 484612 bytes SHA1 (patch-aa) = 8dc74038552f8c9783622229981a9a83b3464512 -SHA1 (patch-ab) = 725521ed1192a70764ee409e98e4512f25dcc883 +SHA1 (patch-ab) = bd8501ef2606efecb8f603578e1e2f978e586923 SHA1 (patch-ac) = 5275f5e9b5dae569d8d01a1209c00f40490edcbc SHA1 (patch-ae) = edc66c096499df9a8b76d43376b3e40c408c99d3 SHA1 (patch-af) = 61a5060c95f9110b536c3312c1afc8d722af5226 diff --git a/wm/icewm/patches/patch-ab b/wm/icewm/patches/patch-ab index 9d84d95c208..03a04b79c65 100644 --- a/wm/icewm/patches/patch-ab +++ b/wm/icewm/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.2 2002/02/26 09:41:40 martti Exp $ +$NetBSD: patch-ab,v 1.3 2002/05/03 10:56:39 wiz Exp $ --- src/aapm.cc.orig Tue Oct 9 16:54:03 2001 -+++ src/aapm.cc Tue Feb 26 09:02:17 2002 ++++ src/aapm.cc @@ -25,6 +25,12 @@ #ifdef CONFIG_APPLET_APM @@ -23,7 +23,7 @@ $NetBSD: patch-ab,v 1.2 2002/02/26 09:41:40 martti Exp $ char buf[45]; int len, i, fd = open("/proc/apm", O_RDONLY); char driver[16]; -@@ -102,6 +109,44 @@ +@@ -102,6 +109,46 @@ strcat(s,_(" - Charging")); else strcat(s,_("M")); @@ -35,8 +35,10 @@ $NetBSD: patch-ab,v 1.2 2002/02/26 09:41:40 martti Exp $ + return; + } + ++ memset(&aip, 0, sizeof(aip)); + if (ioctl(fd, APM_IOC_GETPOWER, &aip) == -1) { + fprintf(stderr, "ioctl failed on APMDEV"); ++ close(fd); + return; + } + -- cgit v1.2.3