PR/40020 -- provide laptop_portable::has_software_suspend(). This stops

the crash in kcontrol and allows battery monitor to work.
This commit is contained in:
shattered 2012-03-08 09:07:28 +00:00
parent 9ef3769b36
commit e558556d3e
3 changed files with 19 additions and 13 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.82 2012/03/03 00:13:36 wiz Exp $
# $NetBSD: Makefile,v 1.83 2012/03/08 09:07:28 shattered Exp $
DISTNAME= kdeutils-${_KDE_VERSION}
PKGREVISION= 16
PKGREVISION= 17
COMMENT= Utilities for the KDE integrated X11 desktop
PKG_DESTDIR_SUPPORT= user-destdir

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.50 2008/08/27 12:13:55 markd Exp $
$NetBSD: distinfo,v 1.51 2012/03/08 09:07:28 shattered Exp $
SHA1 (kdeutils-3.5.10.tar.bz2) = dfa440253fd9802d1a9665d339c20d903ea676af
RMD160 (kdeutils-3.5.10.tar.bz2) = 98edf87a92c6baf2a3dcd119659cead1110d5789
@ -6,6 +6,6 @@ Size (kdeutils-3.5.10.tar.bz2) = 3062038 bytes
SHA1 (patch-ac) = 9b31039b0e3cc05dc4fb288ee8f66ebf3e440f6e
SHA1 (patch-ae) = 7e46d3a6f2b148b7e85314ed998689fb59b98561
SHA1 (patch-ai) = 6a4b3d3d77ba2756a7ee71d923d8bfe78c735bce
SHA1 (patch-an) = e13957a9fa0d23aebbe149ecaca7b9dacde5c9fb
SHA1 (patch-an) = be425dd332ec5293fe472bba48496c10ec84c7ad
SHA1 (patch-ao) = ef89fd10177e3164a1b3c0dcaccd104f1079ec6a
SHA1 (patch-aq) = a76ff5042c3dec821026f512f6e83f5a3eaa3d91

View file

@ -1,8 +1,8 @@
$NetBSD: patch-an,v 1.4 2004/02/04 20:38:00 markd Exp $
$NetBSD: patch-an,v 1.5 2012/03/08 09:07:28 shattered Exp $
--- klaptopdaemon/portable.cpp.orig 2003-11-30 22:50:47.000000000 +1300
--- klaptopdaemon/portable.cpp.orig 2008-02-13 09:38:14.000000000 +0000
+++ klaptopdaemon/portable.cpp
@@ -2414,10 +2414,14 @@ laptop_portable::software_suspend_set_ma
@@ -2438,10 +2438,14 @@ laptop_portable::software_suspend_set_ma
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <machine/apmvar.h>
@ -19,7 +19,7 @@ $NetBSD: patch-an,v 1.4 2004/02/04 20:38:00 markd Exp $
// Scott Presnell, srp@zgi.com, srp@tworoads.net
// Fri Jun 29 17:21:25 PDT 2001
// Tested on Dell I4K running NetBSD 1.5R
@@ -2439,6 +2443,7 @@ laptop_portable::has_power_management()
@@ -2463,6 +2467,7 @@ laptop_portable::has_power_management()
}
struct apm_power_info info;
@ -27,7 +27,7 @@ $NetBSD: patch-an,v 1.4 2004/02/04 20:38:00 markd Exp $
ret=ioctl(fd, APM_IOC_GETPOWER, &info);
::close(fd);
@@ -2466,6 +2471,7 @@ int laptop_portable::has_battery_time()
@@ -2490,6 +2495,7 @@ int laptop_portable::has_battery_time()
return 0;
struct apm_power_info info;
@ -35,7 +35,7 @@ $NetBSD: patch-an,v 1.4 2004/02/04 20:38:00 markd Exp $
ret=ioctl(fd, APM_IOC_GETPOWER, &info);
::close(fd);
@@ -2639,6 +2645,15 @@ laptop_portable::apm_set_mask(bool , boo
@@ -2661,6 +2667,15 @@ laptop_portable::apm_set_mask(bool , boo
//
@ -51,7 +51,7 @@ $NetBSD: patch-an,v 1.4 2004/02/04 20:38:00 markd Exp $
// return current battery state
//
struct power_result laptop_portable::poll_battery_state()
@@ -2652,6 +2667,7 @@ struct power_result laptop_portable::pol
@@ -2674,6 +2689,7 @@ struct power_result laptop_portable::pol
goto bad;
struct apm_power_info info;
@ -59,7 +59,7 @@ $NetBSD: patch-an,v 1.4 2004/02/04 20:38:00 markd Exp $
ret=ioctl(fd, APM_IOC_GETPOWER, &info);
::close(fd);
@@ -2714,7 +2730,16 @@ laptop_portable::get_brightness()
@@ -2736,7 +2752,16 @@ laptop_portable::get_brightness()
}
bool
@ -77,10 +77,16 @@ $NetBSD: patch-an,v 1.4 2004/02/04 20:38:00 markd Exp $
{
// INSERT HERE
current = 0;
@@ -2772,6 +2797,12 @@ laptop_portable::get_battery_status(int
@@ -2794,6 +2819,18 @@ laptop_portable::get_battery_status(int
values.append(s);
}
+bool
+laptop_portable::has_software_suspend(int /*type*/)
+{
+ return false; // (::has_software_suspend(type));
+}
+
+void
+laptop_portable::software_suspend_set_mask(bool hibernate)
+{