From owner-freebsd-current@FreeBSD.ORG Wed Jun 30 19:56:52 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B768816A4CE for ; Wed, 30 Jun 2004 19:56:52 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A35543D46 for ; Wed, 30 Jun 2004 19:56:52 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 9C7335C821; Wed, 30 Jun 2004 12:56:49 -0700 (PDT) Date: Wed, 30 Jun 2004 21:56:49 +0200 From: Maxime Henrion To: Niki Denev Message-ID: <20040630195649.GB9228@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: current@freebsd.org Subject: Re: duplicated/bad output from apm(8) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2004 19:56:52 -0000 Niki Denev wrote: > It seems that one of the last few commits > to 'usr.sbin/apm/apm.c' introduced > an extra printf for the battery status output. > And the output is like this : > > Number of batteries: 1 > Battery 0: > Battery status: Battery Status: charging > ^^^^^^^^^^^^^^^^^^^^^^^ > This is extra > > here is the patch that i used to fix > the output for me and my precious X31 :) > > ---------------------------------------------------------------------------- > --- usr.sbin/apm/apm.c.orig Wed Jun 30 22:26:28 2004 > +++ usr.sbin/apm/apm.c Wed Jun 30 22:35:12 2004 > @@ -226,7 +226,6 @@ > if (ioctl(fd, APMIO_GETPWSTATUS, &aps) == -1) > continue; > printf("Battery %d:\n", i); > - printf("\tBattery status: "); > if (aps.ap_batt_flag <= 255 && > (aps.ap_batt_flag & > APM_BATT_NOT_PRESENT)) { > printf("not present\n"); Indeed. I just committed your patch, thanks! Cheers, Maxime