freebsd-dev/sbin
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
..
adjkerntz
atacontrol Check the <channel> arg a bit more. 2002-03-10 13:59:00 +00:00
atm
badsect
bsdlabel Remove inappropriate .Op calls in examples. 2002-03-10 09:10:06 +00:00
camcontrol Correct an out of date device node name. We do not have /dev/rsd0.ctl 2002-02-11 14:35:28 +00:00
ccdconfig
clri
comcontrol
conscontrol
cxconfig
dhclient Fix "make release.4" breakage. 2002-02-28 16:17:18 +00:00
disklabel Remove inappropriate .Op calls in examples. 2002-03-10 09:10:06 +00:00
dmesg
dump Add a new "-S" flag to dump to allow it just print out dump estimate 2002-03-01 20:54:23 +00:00
dumpfs
dumpon CG hard sentence breaks. 2002-01-23 09:35:55 +00:00
fdisk Add some more partition types. 2002-02-18 19:32:38 +00:00
fdisk_pc98
ffsinfo
fsck
fsck_ffs
fsck_ifs
fsck_msdosfs
fsdb Something i always wanted to see: add a function to print the list of 2002-01-26 15:53:23 +00:00
fsirand
growfs Typo fix: Usally -> Usually. 2002-02-14 01:21:07 +00:00
ifconfig Some style(9) whitespace fixes and a correction to the copyright. 2002-02-28 01:03:27 +00:00
init
ip6fw I've been meaning to do this for a while. Add an underscore to the 2002-01-19 23:20:02 +00:00
ipf
ipfs
ipfstat
ipfw I've been meaning to do this for a while. Add an underscore to the 2002-01-19 23:20:02 +00:00
ipmon
ipnat
kget
kldconfig
kldload
kldstat
kldunload
ldconfig
md5
mdconfig
mdmfs
mknod Minor English fixes. 2002-03-10 08:50:53 +00:00
mount
mount_cd9660 o Move NTOHL() and associated macros into <sys/param.h>. These are 2002-02-18 20:35:27 +00:00
mount_ext2fs
mount_hpfs
mount_ifs
mount_msdosfs
mount_nfs
mount_ntfs
mount_nullfs
mount_nwfs
mount_portalfs
mount_smbfs
mount_std
mount_umapfs
mount_unionfs
mountd Introduce a version field to `struct xucred' in place of one of the 2002-02-27 04:45:37 +00:00
natd Back out part of the revision 1.2 changes -- sendto(2) can 2002-01-15 17:07:56 +00:00
newfs
newfs_msdos
nextboot
nfsd
nfsiod
nologin
nos-tun from select(2): 2002-01-20 12:13:28 +00:00
ping Use network byte order for the ICMP sequence number. This is only 2002-02-27 22:37:22 +00:00
ping6 Show standard deviation. 2002-03-01 09:49:48 +00:00
quotacheck Fix some function prototypes. 2002-01-25 20:45:30 +00:00
rcorder
reboot
restore Use a more robust scheme for determining how many blocks to skip 2002-02-18 02:29:47 +00:00
route Introduce an interface announcement message for the routing 2002-01-18 14:33:04 +00:00
routed o Move NTOHL() and associated macros into <sys/param.h>. These are 2002-02-18 20:35:27 +00:00
rtsol
savecore
setkey
shutdown
slattach
spppcontrol mdoc(7) police: tidy up the markup. 2002-01-10 16:02:23 +00:00
startslip
swapon
sysctl Export a (machine dependent) kernel variable bootdev as 2002-03-10 20:08:44 +00:00
tunefs
umount
vinum
Makefile
Makefile.inc