summaryrefslogtreecommitdiff
path: root/sysutils/asapm/patches/patch-ac
blob: bdac6c1472ac515e6d98af119988453474b5901f (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
$NetBSD: patch-ac,v 1.3 2004/06/09 21:00:05 kivinen Exp $

--- asapm.c.orig	2001-11-23 23:14:24.000000000 +0200
+++ asapm.c
@@ -22,6 +22,7 @@
 struct apm_state state;
 
 char	apm_device_file[256];
+char	sysmon_device_file[256];
 
 char    statuscolor[50],
         greencolor[50],
@@ -52,6 +53,7 @@ char    mainGeometry[50];
 void defaults()
 {
 	safecopy(apm_device_file, APM_PROC, 256);
+	safecopy(sysmon_device_file, SYSMON_DEV, 256);
 
         /* I use RoyalBlue personally, but the author might not like me */
         /* arbitrary aesthetic changes to his progam.  ;)  --Dagmar */
@@ -178,6 +180,10 @@ void    parsecmdline(int argc, char *arg
                                 if (++i >= argc)
                                         usage();
                                 safecopy(apm_device_file, argv[i], 256);
+                        } else if (!strncmp(argument,"-sysmondev",4)) {
+                                if (++i >= argc)
+                                        usage();
+                                safecopy(sysmon_device_file, argv[i], 256);
                         } else if (!strncmp(argument,"-fail",5)) {
                                 state.fail=1;
                         } else if (!strncmp(argument,"-u",2)) {