From owner-freebsd-arch Fri Mar 8 2: 9:23 2002 Delivered-To: freebsd-arch@freebsd.org Received: from falcon.prod.itd.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id 6139837B405 for ; Fri, 8 Mar 2002 02:09:21 -0800 (PST) Received: from pool0067.cvx21-bradley.dialup.earthlink.net ([209.179.192.67] helo=mindspring.com) by falcon.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16jHJQ-0001mZ-00; Fri, 08 Mar 2002 02:09:20 -0800 Message-ID: <3C888DB6.8DF80EE7@mindspring.com> Date: Fri, 08 Mar 2002 02:08:54 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Luigi Rizzo Cc: arch@FreeBSD.ORG Subject: Re: Proposed patch: kern.bootdev* sysctl variables References: <20020308020009.A6535@iguana.icir.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Luigi Rizzo wrote: > Any objection to the following patch to i386/i386/autoconf.c > to let userland apps know [an approximation of] the name > of the device the kernel was booted from ? > > The main use would be for startup scripts, such as > /etc/rc, which could this way differentiate their > behaviour based on the returned result. > > (I know it can be perfected by not assuming that > any hard disk is /dev/ad, but you get the idea...) If you grabbed the actual boot information from the tunables in the loader environment (using TUNABLE macros), you could get the actual thing. To see what's available, do a "set" at the loader prompt. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message