summaryrefslogtreecommitdiff
path: root/sysutils/xbattbar
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2001-12-31 09:47:58 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2001-12-31 09:47:58 +0000
commitb67226884f97937979a6a1c300a9918daa1e3c94 (patch)
tree04d4c63a4e7a2ec4b3fa527ef5681e0908af2ebc /sysutils/xbattbar
parentAdd knobs to enable "euc-jp" and "shift_jis" encodings. (diff)
Open the apm device readonly, this means a user doesn't need to
be in any special groups to run xbattbar.
Notes
Notes: svn path=/head/; revision=52441
Diffstat (limited to 'sysutils/xbattbar')
-rw-r--r--sysutils/xbattbar/files/patch-ab13
1 files changed, 13 insertions, 0 deletions
diff --git a/sysutils/xbattbar/files/patch-ab b/sysutils/xbattbar/files/patch-ab
new file mode 100644
index 000000000000..a911d7528037
--- /dev/null
+++ b/sysutils/xbattbar/files/patch-ab
@@ -0,0 +1,13 @@
+--- xbattbar.c.old Mon Dec 31 03:32:04 2001
++++ xbattbar.c Mon Dec 31 03:32:08 2001
+@@ -522,8 +522,8 @@
+ int fd, r, p;
+ struct apm_info info;
+
+- if ((fd = open(APMDEV21, O_RDWR)) == -1 &&
+- (fd = open(APMDEV22, O_RDWR)) == -1) {
++ if ((fd = open(APMDEV21, O_RDONLY)) == -1 &&
++ (fd = open(APMDEV22, O_RDONLY)) == -1) {
+ fprintf(stderr, "xbattbar: cannot open apm device\n");
+ exit(1);
+ }