pkgsrc/sysutils/asapm/patches/patch-ac
kivinen 47e70bc2f4 Implemented support for envsys to get battery etc information
from acpi. Only tested on one laptop, I do not know whether
	the envsys names for the acpi devices are stable enough to be
	used, but I didn't find any other way to distinguish different
	things. As this laptop does not support apm, I hope it still
	works after these modifications.
2004-06-09 21:00:05 +00:00

31 lines
1.2 KiB
Text

$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)) {