summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/autoconf.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-03-10 20:08:44 +0000
committerluigi <luigi@FreeBSD.org>2002-03-10 20:08:44 +0000
commitad77debfc5dfa5b73a27c6a6b4f1f7657090fb38 (patch)
tree41722859cb6c9c6a67510a8addd4bbedc3dd3082 /sys/amd64/amd64/autoconf.c
parentc497ba78d2ef58a2c3bddbb3da9c12b9de6556c5 (diff)
downloadFreeBSD-src-ad77debfc5dfa5b73a27c6a6b4f1f7657090fb38.zip
FreeBSD-src-ad77debfc5dfa5b73a27c6a6b4f1f7657090fb38.tar.gz
Export a (machine dependent) kernel variable bootdev as
machdep.guessed_bootdev, and add code to sysctl to parse its value and give a (not necessarily correct) name to the device we booted from (the main motivation for this code is to use the info in the PicoBSD boot scripts, and the impact on the kernel is minimal). NOTE: the information available in bootdev is not always reliable, so you should not trust it too much. The parsing code is the same as in boot2.c, and cannot cover all cases -- as it is, it seems to work fine with floppies and IDE disks recognised by the BIOS. It _should_ work as well with SCSI disks recognised by the BIOS. Booting from a CDROM in floppy emulation will return /dev/fd0 (because this is what the BIOS tells us). Booting off the network (e.g. with etherboot) leaves bootdev unset so the value will be printed as "invalid (0xffffffff)". Finally, this feature might go away at some point, hopefully when we have a more reliable way to get the same information. MFC-after: 5 days
Diffstat (limited to 'sys/amd64/amd64/autoconf.c')
-rw-r--r--sys/amd64/amd64/autoconf.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c
index 618b2c6..af2cb5f 100644
--- a/sys/amd64/amd64/autoconf.c
+++ b/sys/amd64/amd64/autoconf.c
@@ -238,8 +238,6 @@ cpu_rootconf()
}
SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL)
-u_long bootdev = 0; /* not a dev_t - encoding is different */
-
#if defined(NFSCLIENT) && defined(NFS_ROOT) && !defined(BOOTP_NFSROOT)
static int
OpenPOWER on IntegriCloud