From owner-freebsd-gnome Sun Jan 6 11:57:22 2002 Delivered-To: freebsd-gnome@freebsd.org Received: from sushi.sanyusan.se (h12n2fls34o835.telia.com [213.67.31.12]) by hub.freebsd.org (Postfix) with ESMTP id 577D737B419 for ; Sun, 6 Jan 2002 11:57:19 -0800 (PST) Received: (from anders@localhost) by sushi.sanyusan.se (8.11.6/8.11.6) id g06Jtqu91586 for gnome@FreeBSD.ORG; Sun, 6 Jan 2002 20:55:52 +0100 (CET) (envelope-from anders) Date: Sun, 6 Jan 2002 20:55:52 +0100 From: Anders Andersson To: gnome@FreeBSD.ORG Subject: Re: x11/gnomeapplets Message-ID: <20020106195552.GD32992@sushi.sanyusan.se> References: <20020103211310.GA320@sushi.sanyusan.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020103211310.GA320@sushi.sanyusan.se> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-gnome@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jan 03, 2002 at 10:13:10PM +0100, Anders Andersson wrote: > I got inspired bye Alfreds patch to sysutils/xbattbar which changed > xbattbar to use a readonly /dev/apm. > > So I patched gnomeapplets battery_applet to do this at it seems to work > fine on -CURRENT at least. > > [root@sushi gnome-applets-1.4.0.4]# diff -u battery/read-battery.c.orig > battery/read-battery.c > --- battery/read-battery.c.orig Thu Jan 3 22:05:06 2002 > +++ battery/read-battery.c Thu Jan 3 21:42:30 2002 > @@ -170,7 +170,7 @@ > *hours_remaining = -1; > *minutes_remaining = 1; > > - fd = open(APMDEV, O_RDWR); > + fd = open(APMDEV, O_RDONLY); > if (fd == -1) > { > g_error (_("Cannot open /dev/apm; can't get data.")); > > > Do any of you know why it was O_RDWR in the first place? I didnt find > any explanation on the gnome cvs commit logs. Well, replying myself... From what I can understand we want this in 4.5-RELEASE since it allows user to use battery_applet without chmodding /dev/apm. Or am I out in the blue here? -- Anders Andersson UNIX, Networking and Security consultant (+46) 705 87 53 35 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-gnome" in the body of the message