From owner-freebsd-gnome Sun Jan 13 23:42:19 2002 Delivered-To: freebsd-gnome@freebsd.org Received: from alcatraz.iptelecom.net.ua (alcatraz.iptelecom.net.ua [212.9.224.15]) by hub.freebsd.org (Postfix) with ESMTP id 1688C37B405 for ; Sun, 13 Jan 2002 23:42:08 -0800 (PST) Received: from ipcard.iptcom.net (ipcard.iptcom.net [212.9.224.5]) by alcatraz.iptelecom.net.ua (8.9.3/8.9.3) with ESMTP id JAA60807; Mon, 14 Jan 2002 09:42:04 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Received: from h164.228.dialup.iptcom.net (h164.228.dialup.iptcom.net [212.9.228.164]) by ipcard.iptcom.net (8.9.3/8.9.3) with ESMTP id JAA11669; Mon, 14 Jan 2002 09:41:58 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Subject: Re: x11/gnomeapplets From: Maxim Sobolev To: Anders Andersson Cc: gnome@FreeBSD.org In-Reply-To: <20020106195552.GD32992@sushi.sanyusan.se> References: <20020103211310.GA320@sushi.sanyusan.se> <20020106195552.GD32992@sushi.sanyusan.se> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-DO9G+3810Dl5byy+iRQn" Message-Id: <1010994025.64927.16.camel@notebook> Mime-Version: 1.0 X-Mailer: Evolution/1.0.1 Date: 14 Jan 2002 09:41:26 +0200 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 --=-DO9G+3810Dl5byy+iRQn Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2002-01-06 at 21:55, Anders Andersson wrote: > 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.=20 > >=20 > > So I patched gnomeapplets battery_applet to do this at it seems to work > > fine on -CURRENT at least. > >=20 > > [root@sushi gnome-applets-1.4.0.4]# diff -u battery/read-battery.c.orig > > battery/read-battery.c =20 > > --- 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 =3D -1; > > *minutes_remaining =3D 1; > > =20 > > - fd =3D open(APMDEV, O_RDWR); > > + fd =3D open(APMDEV, O_RDONLY); > > if (fd =3D=3D -1) > > { > > g_error (_("Cannot open /dev/apm; can't get data.")); > >=20 > >=20 > > 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. >=20 > Well, replying myself... >=20 > >From what I can understand we want this in 4.5-RELEASE since it allows > user to use battery_applet without chmodding /dev/apm.=20 >=20 > Or am I out in the blue here? Sorry for the delay - I was a little busy lately. I'll test and if it's OK then commit your patch today. Thanks! -Maxim --=-DO9G+3810Dl5byy+iRQn Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQA8QotooNu5t4iCBa8RAoShAJ4xLhR/fyzdllxxS7NjX4scn6LtZwCdGwLQ e5dfw1zCNxLxgwBpSC1HAaA= =U5p4 -----END PGP SIGNATURE----- --=-DO9G+3810Dl5byy+iRQn-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-gnome" in the body of the message