From owner-freebsd-current@FreeBSD.ORG Tue Jan 27 22:28:36 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 BC7A816A4CF for ; Tue, 27 Jan 2004 22:28:36 -0800 (PST) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 07F5143D58 for ; Tue, 27 Jan 2004 22:28:35 -0800 (PST) (envelope-from nate@root.org) Received: (qmail 77578 invoked by uid 1000); 28 Jan 2004 06:28:37 -0000 Date: Tue, 27 Jan 2004 22:28:37 -0800 (PST) From: Nate Lawson To: John Baldwin In-Reply-To: <200401271328.29574.jhb@FreeBSD.org> Message-ID: <20040127222750.P77555@root.org> References: <20040126213228.D31623@root.org> <200401271328.29574.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: Wed, 28 Jan 2004 06:28:36 -0000 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 declared 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 variable 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_name. > > > > Here is a snippet of the kenvp array, right where my tunable should be > > (os2 is from a test below): > > > > name: hint.vt.0.disabled=1 > > name: hw.acpi.os2=8 > > name: hw.acpi.reset_video=0 > > name: hw.acpi.verbose=1 > > name: hw.cbb.start_memory=0xc0203000 > > > > For another test, I declared a tunable int right below the string, in the > > same source file. It gets evaluated and assigned. > > > > static int acpi_os2 = 2; > > TUNABLE_INT("hw.acpi.os2", &acpi_os2); > > What is in your /boot/loader.conf? Note that os2 works correctly (see the "name printf above). But the one right before it, os_name, is not present. hw.acpi.verbose=1 hw.cbb.start_memory=0xc0203000 # hw.acpi.os_name="Windows" hw.acpi.os2="8" acpi_dsdt_load="YES" acpi_dsdt_name="/boot/DSDT.aml" debug.acpi.layer="ACPI_PROCESSOR" debug.acpi.level="ACPI_LV_VERBOSE ACPI_LV_INFO" #debug.acpi.layer="ACPI_ALL_DRIVERS ACPI_ALL_COMPONENTS" #debug.acpi.level="ACPI_LV_ERROR" hw.acpi.reset_video=0 # beastie_disable=YES # #if_an_load=YES #if_fxp_load=YES ipfw_load=YES #uhci_load=YES #usb_load=YES #umass_load=YES ext2fs_load=YES #snd_ich_load=YES