diff options
author | hubertf <hubertf@pkgsrc.org> | 2008-03-06 17:24:23 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 2008-03-06 17:24:23 +0000 |
commit | 35041f8b1fbdf5081070db91f9514d12abb59980 (patch) | |
tree | 54064cd3fb7db04fd9240156065419479c77227c /sysutils | |
parent | d10fc61853e4a8bb70726834903581f5cb9b6852 (diff) | |
download | pkgsrc-35041f8b1fbdf5081070db91f9514d12abb59980.tar.gz |
Keep xbattbar from dumping core when the battery reports
>100% full. Patch submitted by kre@munnari.OZ.AU in PR 38148.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/xbatt/Makefile | 4 | ||||
-rw-r--r-- | sysutils/xbatt/distinfo | 4 | ||||
-rw-r--r-- | sysutils/xbatt/patches/patch-ab | 17 |
3 files changed, 17 insertions, 8 deletions
diff --git a/sysutils/xbatt/Makefile b/sysutils/xbatt/Makefile index 84854953a23..a7260b88007 100644 --- a/sysutils/xbatt/Makefile +++ b/sysutils/xbatt/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.23 2008/02/09 23:52:00 tnn Exp $ +# $NetBSD: Makefile,v 1.24 2008/03/06 17:24:23 hubertf Exp $ # DISTNAME= xbatt-1.3pr1 PKGNAME= xbatt-1.3.1 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= sysutils x11 MASTER_SITES= http://www2.clave.gr.jp/~eto/xbatt/ diff --git a/sysutils/xbatt/distinfo b/sysutils/xbatt/distinfo index 99f3f7df5c4..77924db2258 100644 --- a/sysutils/xbatt/distinfo +++ b/sysutils/xbatt/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.4 2005/02/24 13:40:59 agc Exp $ +$NetBSD: distinfo,v 1.5 2008/03/06 17:24:23 hubertf Exp $ SHA1 (xbatt-1.3pr1.tar.gz) = dc6a8624c134d9e4262ea87640d3eda028973bcf RMD160 (xbatt-1.3pr1.tar.gz) = 1757aeee7cb25f3500a2bde62939e0ac6a714752 Size (xbatt-1.3pr1.tar.gz) = 14412 bytes SHA1 (patch-aa) = b822b75668a3494a72b496d820b67720b732add4 -SHA1 (patch-ab) = 3f643fa06ce7e0bb2eeb9c3339a1640b94f13001 +SHA1 (patch-ab) = b34c33af521ad384b383fd7e8fb94a1f0be5b547 diff --git a/sysutils/xbatt/patches/patch-ab b/sysutils/xbatt/patches/patch-ab index e20831e5729..c837634aaca 100644 --- a/sysutils/xbatt/patches/patch-ab +++ b/sysutils/xbatt/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.2 2001/11/26 20:02:36 wiz Exp $ +$NetBSD: patch-ab,v 1.3 2008/03/06 17:24:23 hubertf Exp $ ---- xbatt.c.orig Fri Sep 18 14:03:05 1998 +--- xbatt.c.orig 1998-09-18 14:03:05.000000000 +0200 +++ xbatt.c -@@ -219,6 +219,7 @@ +@@ -219,6 +219,7 @@ struct Digits digits[] = { String fallback_resouces[] = { "*width: 39", "*height: 39", @@ -10,7 +10,7 @@ $NetBSD: patch-ab,v 1.2 2001/11/26 20:02:36 wiz Exp $ }; main( -@@ -494,6 +495,7 @@ +@@ -494,6 +495,7 @@ struct status getBatteryStatus() #ifdef __NetBSD__ struct apm_power_info info; @@ -18,3 +18,12 @@ $NetBSD: patch-ab,v 1.2 2001/11/26 20:02:36 wiz Exp $ if( ioctl(apmfd, APM_IOC_GETPOWER, &info) == -1 ) { fprintf(stderr, "xbatt: ioctl APM_IOC_GETPOWER failed\n"); exit(1); +@@ -686,7 +688,7 @@ void updateWindow(struct status s) + 5, 5, 11, 7); + } + +- if (s.remain == 100) { ++ if (s.remain >= 100) { + bm = XCreatePixmapFromBitmapData(XtDisplay(toplevel), + XtWindow(toplevel), + full_bits, full_width, |