freebsd-dev/sys/i386
Luigi Rizzo 60cf2c1254 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
2002-03-10 20:08:44 +00:00
..
acpica Fix typo in function name. 2002-01-10 03:26:46 +00:00
apm Add generalized power profile code. 2002-03-04 18:46:13 +00:00
bios Add generalized power profile code. 2002-03-04 18:46:13 +00:00
compile Don't need the .keep_me files. Obrien and I committed past each other. 2001-07-01 23:35:44 +00:00
conf Enable DEVICE_POLLING in LINT now that it is safe to compile it there. 2002-03-09 08:04:58 +00:00
i386 Export a (machine dependent) kernel variable bootdev as 2002-03-10 20:08:44 +00:00
ibcs2 Fix warnings (prototype for nonexisting static function) 2002-02-28 03:12:00 +00:00
include o Don't require long long support in bswap64() functions. 2002-03-09 21:02:16 +00:00
isa make pcvt compile again without "options XSERVER". 2002-03-08 19:06:46 +00:00
linux Fix format warning. 2002-02-27 23:21:46 +00:00
pci The Libretto L series has no $PIR table, but does have a _PIR table. 2002-01-20 03:28:29 +00:00
svr4 Clear the single-step flag for signal handlers. This fixes bogus trace 2002-01-10 11:49:55 +00:00
Makefile Update pathnames for creation of tags file. 2001-12-05 01:23:21 +00:00