summaryrefslogtreecommitdiff
path: root/misc/kdeutils3/patches/patch-an
blob: 61e0b592246846415086ede2ebdaaa5728df0448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$NetBSD: patch-an,v 1.3 2003/03/11 13:22:32 markd Exp $

--- klaptopdaemon/portable.cpp.orig	Fri Jan  3 18:07:53 2003
+++ klaptopdaemon/portable.cpp
@@ -1130,6 +1130,7 @@ laptop_portable::has_power_management()
        }
 
        struct apm_power_info info;
+       memset(&info, 0, sizeof(info));
        ret=ioctl(fd, APM_IOC_GETPOWER, &info);
        ::close(fd);
 
@@ -1151,6 +1152,7 @@ int laptop_portable::has_battery_time()
          return 0;
 
        struct apm_power_info info;
+       memset(&info, 0, sizeof(info));
        ret=ioctl(fd, APM_IOC_GETPOWER, &info);
        ::close(fd);
 
@@ -1288,6 +1290,15 @@ void laptop_portable::invoke_hibernation
 
 
 //
+//      adds extra widgets to the battery panel
+//
+void
+laptop_portable::extra_config(QWidget *parent, KConfig *config, QVBoxLayout *layout)
+{
+}
+
+
+//
 //     return current battery state
 //
 struct power_result laptop_portable::poll_battery_state()
@@ -1301,6 +1312,7 @@ struct power_result laptop_portable::pol
                goto bad;
 
                struct apm_power_info info;
+               memset(&info, 0, sizeof(info));
                ret=ioctl(fd, APM_IOC_GETPOWER, &info);
                ::close(fd);