From owner-freebsd-current@FreeBSD.ORG Fri Jul 8 14:51:49 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A7FD106564A for ; Fri, 8 Jul 2011 14:51:49 +0000 (UTC) (envelope-from jwd@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 19D2B8FC0C for ; Fri, 8 Jul 2011 14:51:49 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p68EpmCo021696 for ; Fri, 8 Jul 2011 14:51:48 GMT (envelope-from jwd@freefall.freebsd.org) Received: (from jwd@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p68EpmEI021695 for freebsd-current@freebsd.org; Fri, 8 Jul 2011 14:51:48 GMT (envelope-from jwd) Date: Fri, 8 Jul 2011 14:51:48 +0000 From: John To: freebsd-current@freebsd.org Message-ID: <20110708145148.GA12548@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Fri, 08 Jul 2011 16:35:22 +0000 Subject: kenv values with ansi escapte sequences - ansi_caption X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 08 Jul 2011 14:51:49 -0000 Hi Folks, It seems the new pre-boot options selection process has some values defined within the kernel environment that contain ansi control sequences. For instance: # kenv LINES="24" ansi_caption[1]="Boot [ENTER]" ansi_caption[2]="Escape to loader prompt" ansi_caption[4]="ACPI Support: Disabled" ansi_caption[5]="Boot Safe Mode: NO" ansi_caption[6]="Boot Single User: NO" ansi_caption[7]="Boot Verbose: NO" bootfile="kernel" Using less, od -c, or other utility, we have: # kenv | less LINES="24" ansi_caption[1]="ESC[1mBESC[37moot ESC[1m[ENTER]ESC[37m" ansi_caption[2]="ESC[1mEscESC[37mape to loader prompt" ansi_caption[4]="ESC[1mAESC[37mCPI Support: ESC[34;1mDisabledESC[37m" ansi_caption[5]="Boot Safe ESC[1mMESC[37mode: ESC[34;1mNOESC[37m" ansi_caption[6]="Boot ESC[1mSESC[37mingle User: ESC[34;1mNOESC[37m" ansi_caption[7]="Boot ESC[1mVESC[37merbose: ESC[34;1mNOESC[37m" bootfile="kernel" This caused a few issues with a script that parses the output of kenv. Simple enough to fix, but thought I'd see what others think. Thoughts? Opinions? Thanks, John