From owner-freebsd-arch Fri Mar 8 2:10:59 2002 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 7376937B416 for ; Fri, 8 Mar 2002 02:10:57 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.2/8.12.2) with ESMTP id g28AAbnK015270; Fri, 8 Mar 2002 11:10:37 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Terry Lambert Cc: Luigi Rizzo , arch@FreeBSD.ORG Subject: Re: Proposed patch: kern.bootdev* sysctl variables In-Reply-To: Your message of "Fri, 08 Mar 2002 02:08:54 PST." <3C888DB6.8DF80EE7@mindspring.com> Date: Fri, 08 Mar 2002 11:10:37 +0100 Message-ID: <15269.1015582237@critter.freebsd.dk> From: Poul-Henning Kamp 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 In message <3C888DB6.8DF80EE7@mindspring.com>, Terry Lambert writes: >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. But that might not be the real thing. The kernel will ask for a root if it's initial instruction is wrong, so you cannot return the hint from the bootloader unless you know for sure that you actually ended up using that. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message