freebsd-nq/sys
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
..
alpha o Don't require long long support in bswap64() functions. 2002-03-09 21:02:16 +00:00
amd64 Export a (machine dependent) kernel variable bootdev as 2002-03-10 20:08:44 +00:00
arm We need machine/{signal,ucontext}.h to build a cross GCC compiler. 2001-12-09 19:39:49 +00:00
boot Change every occurrence of "bootblock" into "boot1" after 2002-03-05 16:39:36 +00:00
cam Simple p_ucred -> td_ucred changes to start using the per-thread ucred 2002-02-27 18:32:23 +00:00
coda Simple p_ucred -> td_ucred changes to start using the per-thread ucred 2002-02-27 18:32:23 +00:00
compat Simple p_ucred -> td_ucred changes to start using the per-thread ucred 2002-02-27 18:32:23 +00:00
conf Add a driver for the mem and kmem devices, based off the i386 version. 2002-03-09 22:33:16 +00:00
contrib Change two occurrences of HTONS() to use htons(). 2002-02-28 09:56:31 +00:00
crypto - Speedup 3DES by using assembly code for i386. 2002-03-05 09:19:02 +00:00
ddb Allow '.' in identifiers - some ia64 register names contain '.'. 2002-03-10 17:08:24 +00:00
dev Do not call a synthesizer with a sequencer lock held. 2002-03-10 16:56:38 +00:00
fs If in strategy we find that we have no devsw on the device anymore we 2002-03-05 13:25:57 +00:00
geom Simple p_ucred -> td_ucred changes to start using the per-thread ucred 2002-02-27 18:32:23 +00:00
gnu Deverbosified previous 2 commits (removed the rotted list of reasons why 2002-03-02 11:14:13 +00:00
i4b remove BSD/OS specific ppp-interface file since the FreeBSD-BSD/OS merger 2002-03-09 13:18:24 +00:00
i386 Export a (machine dependent) kernel variable bootdev as 2002-03-10 20:08:44 +00:00
ia64 Use the right value for the region length in parse_spill_mask. 2002-03-10 17:03:45 +00:00
isa Add SONY VAIO psm controller ISA-PnP ID. 2002-03-10 12:22:17 +00:00
isofs/cd9660 Simple p_ucred -> td_ucred changes to start using the per-thread ucred 2002-02-27 18:32:23 +00:00
kern Fix a breakage introduced in rev.1.75 (supposedly style cleanup), which results 2002-03-10 19:20:01 +00:00
libkern DBA update: used the wrong of several NAI DBAs. 2002-03-07 17:52:03 +00:00
modules Add generalized power profile code. 2002-03-04 18:46:13 +00:00
net Use revoke_and_destroy_dev() instead of destroy_dev() when removing /dev/net 2002-03-05 17:50:35 +00:00
netatalk Make `options NETATALK' compile after the -fno-common changes. 2002-01-16 11:26:50 +00:00
netatm Unbreak fore adapters from POV of warnings. 2002-02-27 21:12:44 +00:00
netgraph Official timeout routines for netgraph nodes that know how to 2002-03-05 20:26:20 +00:00
netinet o Add INET_ADDRSTRLEN and INET6_ADDRSTRLEN defines to <arpa/inet.h> 2002-03-10 06:42:27 +00:00
netinet6 o Add INET_ADDRSTRLEN and INET6_ADDRSTRLEN defines to <arpa/inet.h> 2002-03-10 06:42:27 +00:00
netipx Pre-KSE/M3 commit. 2002-02-07 20:58:47 +00:00
netkey missing splx 2002-03-01 13:13:17 +00:00
netnatm Fix warnings 2002-02-28 03:02:20 +00:00
netncp Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
netns Initialise the intrq_present fields at runtime, not link time. This allows 2002-01-08 10:34:03 +00:00
netsmb Simple p_ucred -> td_ucred changes to start using the per-thread ucred 2002-02-27 18:32:23 +00:00
nfs When the old nfsm_adv() macro was moved to nfsm_adv_xx(), a '>=' 2001-12-31 06:56:31 +00:00
nfsclient vhold() our vnode while checking the remote side. 2002-03-08 13:43:43 +00:00
nfsserver Simple p_ucred -> td_ucred changes to start using the per-thread ucred 2002-02-27 18:32:23 +00:00
pc98 Free allocated buffer at siodetach(). 2002-03-10 07:22:42 +00:00
pccard Get the generic name right 2002-03-03 01:04:39 +00:00
pci Fix warning; amdsmb_abort() is not used. 2002-02-26 01:04:58 +00:00
posix4 In a threaded world, differnt priorirites become properties of 2002-02-11 20:37:54 +00:00
powerpc o Don't require long long support in bswap64() functions. 2002-03-09 21:02:16 +00:00
rpc
security/lomac Simple p_ucred -> td_ucred changes to start using the per-thread ucred 2002-02-27 18:32:23 +00:00
sparc64 Increase VM_KMEM_SIZE to 16 megs from 12. Define VM_KMEM_SIZE_SCALE so that 2002-03-09 23:35:50 +00:00
svr4
sys Make the proposed name arg to dev_stdclone() const. 2002-03-10 10:50:05 +00:00
tools Return vnode_if back to its AWK roots. 2002-03-01 01:20:23 +00:00
ufs Update DBA for NAI. We have several. We used the wrong one. :-) 2002-03-07 17:49:06 +00:00
vm Revert change in revision 1.53 and add a small comment to protect 2002-03-09 16:24:27 +00:00
Makefile