From owner-freebsd-current@FreeBSD.ORG Fri Jul 8 16:47:23 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 842C3106566B for ; Fri, 8 Jul 2011 16:47:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id D8F678FC1C for ; Fri, 8 Jul 2011 16:47:22 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p68GlIu0002362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jul 2011 19:47:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p68GlIZF058792; Fri, 8 Jul 2011 19:47:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p68GlILB058791; Fri, 8 Jul 2011 19:47:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 8 Jul 2011 19:47:18 +0300 From: Kostik Belousov To: John Message-ID: <20110708164718.GY48734@deviant.kiev.zoral.com.ua> References: <20110708145148.GA12548@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/kVOxs45Texhr2Rq" Content-Disposition: inline In-Reply-To: <20110708145148.GA12548@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org Subject: Re: 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 16:47:23 -0000 --/kVOxs45Texhr2Rq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 08, 2011 at 02:51:48PM +0000, John wrote: > Hi Folks, >=20 > It seems the new pre-boot options selection process has > some values defined within the kernel environment that contain > ansi control sequences. For instance: >=20 > # kenv > LINES=3D"24" > ansi_caption[1]=3D"Boot [ENTER]" > ansi_caption[2]=3D"Escape to loader prompt" > ansi_caption[4]=3D"ACPI Support: Disabled" > ansi_caption[5]=3D"Boot Safe Mode: NO" > ansi_caption[6]=3D"Boot Single User: NO" > ansi_caption[7]=3D"Boot Verbose: NO" > bootfile=3D"kernel" >=20 > Using less, od -c, or other utility, we have: >=20 > # kenv | less > LINES=3D"24" > ansi_caption[1]=3D"ESC[1mBESC[37moot ESC[1m[ENTER]ESC[37m" > ansi_caption[2]=3D"ESC[1mEscESC[37mape to loader prompt" > ansi_caption[4]=3D"ESC[1mAESC[37mCPI Support: ESC[34;1mDisabledESC[37m" > ansi_caption[5]=3D"Boot Safe ESC[1mMESC[37mode: ESC[34;1mNOESC[37m" > ansi_caption[6]=3D"Boot ESC[1mSESC[37mingle User: ESC[34;1mNOESC[37m" > ansi_caption[7]=3D"Boot ESC[1mVESC[37merbose: ESC[34;1mNOESC[37m" > bootfile=3D"kernel" >=20 > 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. >=20 > Thoughts? Opinions? I think the right question there is why the variables are leaked into the kenv at all. They should be removed. --/kVOxs45Texhr2Rq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk4XNJUACgkQC3+MBN1Mb4hYCgCcCht/ZoX8+lnaLosx/BNb0MCz JnkAoLfOFr/7gXWDZ+SQCPKIIHfCe7Mg =CKDg -----END PGP SIGNATURE----- --/kVOxs45Texhr2Rq--