From owner-freebsd-hackers Mon Apr 1 10:10:58 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (dhcp45-24.dis.org [216.240.45.24]) by hub.freebsd.org (Postfix) with ESMTP id 7993A37B405 for ; Mon, 1 Apr 2002 10:10:52 -0800 (PST) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.6) with ESMTP id g31I9Yg01184; Mon, 1 Apr 2002 10:09:35 -0800 (PST) (envelope-from msmith@mass.dis.org) Message-Id: <200204011809.g31I9Yg01184@mass.dis.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Dmitry Konyshev Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: finding out boot device In-reply-to: Your message of "Mon, 01 Apr 2002 20:34:42 +0400." <84434325847.20020401203442@agava.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 01 Apr 2002 10:09:34 -0800 From: Michael Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Could anyone please tell me if there's any way to find out which > device the system booted from in a user application. The loader > sets loaddev and currdev vars, but I see no way to transfer them to > the user environment. kenv(8) allows you to read the kernel/loader environment. However, you can't reliably determine the boot device. -- To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public. - Theodore Roosevelt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message