From owner-freebsd-current@FreeBSD.ORG Thu Jan 29 05:51:18 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 38C2416A4CE; Thu, 29 Jan 2004 05:51:18 -0800 (PST) Received: from phantom.cris.net (phantom.cris.net [212.110.130.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF12B43D2F; Thu, 29 Jan 2004 05:51:07 -0800 (PST) (envelope-from ru@FreeBSD.org.ua) Received: from phantom.cris.net (ru@localhost [127.0.0.1]) by phantom.cris.net (8.12.10/8.12.10) with ESMTP id i0TDphem020655; Thu, 29 Jan 2004 15:51:43 +0200 (EET) (envelope-from ru@FreeBSD.org.ua) Received: (from ru@localhost) by phantom.cris.net (8.12.10/8.12.10/Submit) id i0TDpg59020650; Thu, 29 Jan 2004 15:51:42 +0200 (EET) (envelope-from ru) Date: Thu, 29 Jan 2004 15:51:41 +0200 From: Ruslan Ermilov To: Nate Lawson Message-ID: <20040129135141.GD19899@FreeBSD.org.ua> References: <20040126213228.D31623@root.org> <200401271328.29574.jhb@FreeBSD.org> <20040127222750.P77555@root.org> <200401281245.12012.jhb@FreeBSD.org> <20040128104443.W82288@root.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q8BnQc91gJZX4vDc" Content-Disposition: inline In-Reply-To: <20040128104443.W82288@root.org> User-Agent: Mutt/1.5.5.1i cc: current@freebsd.org Subject: Re: getenv_string broken? 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: Thu, 29 Jan 2004 13:51:18 -0000 --Q8BnQc91gJZX4vDc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 28, 2004 at 10:47:00AM -0800, Nate Lawson wrote: > On Wed, 28 Jan 2004, John Baldwin wrote: > > On Wednesday 28 January 2004 01:28 am, Nate Lawson wrote: > > > On Tue, 27 Jan 2004, John Baldwin wrote: > > > > On Tuesday 27 January 2004 12:42 am, Nate Lawson wrote: > > > > > I have a getenv_string() that is never being evaluated. I declar= ed it > > > > > as follows: > > > > > > > > > > static char acpi_os_name[128]; > > > > > TUNABLE_STR("hw.acpi.os_name", acpi_os_name, sizeof(acpi_os_name)= ); > > > > > > > > > > The contents of acpi_os_name are never filled in from the variabl= e I > > > > > declared in /boot/loader.conf. Just to be sure, I made a loop that > > > > > prints out the contents of kenvp. It does not have hw.acpi.os_na= me. > > > > > > > > > > Here is a snippet of the kenvp array, right where my tunable shou= ld be > > > > > (os2 is from a test below): > > > > > > > > > > name: hint.vt.0.disabled=3D1 > > > > > name: hw.acpi.os2=3D8 > > > > > name: hw.acpi.reset_video=3D0 > > > > > name: hw.acpi.verbose=3D1 > > > > > name: hw.cbb.start_memory=3D0xc0203000 > > > > How did you dump this? If os_name isn't in the list, then that is goin= g to be > > a problem of course. :) That would indicate that a bug in the loader t= hough > > and not in getenv_string(). >=20 > I added a loop that prints out the entire kenv each time getenv_string is > called. This is possibly a loader bug although I'm very curious how > surrounding variables make it into the list but not hw.acpi.os_name. It's > possible they're all ints while mine is a string. The only other string > is module_path, so perhaps I should try overloading that in loader.conf > and see if it also fails. >=20 What's wrong with just using kenv(1)? Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --Q8BnQc91gJZX4vDc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAGQ/tUkv4P6juNwoRAjieAJ99OxYfKRYxwQcvXJ4c7MU2dNN3pACdEyA8 0reLYzk5p7+0FoTJ2f3B/iI= =rcj2 -----END PGP SIGNATURE----- --Q8BnQc91gJZX4vDc--