freebsd-nq/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 Default to WARNS=2. 2001-12-04 02:19:58 +00:00
atacontrol Check the <channel> arg a bit more. 2002-03-10 13:59:00 +00:00
atm Default to WARNS=2. 2001-12-04 02:19:58 +00:00
badsect Default to WARNS=2. 2001-12-04 02:19:58 +00:00
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 Default to WARNS=2. 2001-12-04 02:19:58 +00:00
clri Default to WARNS=2. 2001-12-04 02:19:58 +00:00
comcontrol Default to WARNS=2. 2001-12-04 02:19:58 +00:00
conscontrol Default to WARNS=2. 2001-12-04 02:19:58 +00:00
cxconfig Default to WARNS=2. 2001-12-04 02:19:58 +00:00
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 Default to WARNS=2. 2001-12-04 02:19:58 +00:00
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 Default to WARNS=2. 2001-12-04 02:19:58 +00:00
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 Default to WARNS=2. 2001-12-04 02:19:58 +00:00
ffsinfo Default to WARNS=2. 2001-12-04 02:19:58 +00:00
fsck Default to WARNS=2. 2001-12-04 02:19:58 +00:00
fsck_ffs declare locally used globals as static. 2001-12-22 12:35:03 +00:00
fsck_ifs Spelling 2001-12-11 18:24:59 +00:00
fsck_msdosfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
fsdb Something i always wanted to see: add a function to print the list of 2002-01-26 15:53:23 +00:00
fsirand Default to WARNS=2. 2001-12-04 02:19:58 +00:00
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 Default to WARNS=2. 2001-12-04 02:19:58 +00:00
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 Default to WARNS=2. 2001-12-04 02:19:58 +00:00
ipfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
ipfstat Default to WARNS=2. 2001-12-04 02:19:58 +00:00
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 Default to WARNS=2. 2001-12-04 02:19:58 +00:00
ipnat Default to WARNS=2. 2001-12-04 02:19:58 +00:00
kget Default to WARNS=2. 2001-12-04 02:19:58 +00:00
kldconfig Default to WARNS=2. 2001-12-04 02:19:58 +00:00
kldload mdoc(7) police: tidy up previous delta. 2002-01-09 15:22:30 +00:00
kldstat Default to WARNS=2. 2001-12-04 02:19:58 +00:00
kldunload Default to WARNS=2. 2001-12-04 02:19:58 +00:00
ldconfig Default to WARNS=2. 2001-12-04 02:19:58 +00:00
md5 Fix 2001-12-19 21:19:43 +00:00
mdconfig Actually make use of the md_version field of 'struct mdio'. In order 2001-12-20 06:38:21 +00:00
mdmfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mknod Minor English fixes. 2002-03-10 08:50:53 +00:00
mount Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_cd9660 o Move NTOHL() and associated macros into <sys/param.h>. These are 2002-02-18 20:35:27 +00:00
mount_ext2fs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_hpfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_ifs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_msdosfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_nfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_ntfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_nullfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_nwfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_portalfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_smbfs Add bmake glue for src/contrib/smbfs and connect userland smbfs 2001-12-14 11:41:22 +00:00
mount_std Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_umapfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
mount_unionfs Default to WARNS=2. 2001-12-04 02:19:58 +00:00
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 Update the default newfs block and fragment sizes from 8192/1024 to 2001-12-11 16:21:40 +00:00
newfs_msdos Default to WARNS=2. 2001-12-04 02:19:58 +00:00
nextboot Default to WARNS=2. 2001-12-04 02:19:58 +00:00
nfsd Default to WARNS=2. 2001-12-04 02:19:58 +00:00
nfsiod Default to WARNS=2. 2001-12-04 02:19:58 +00:00
nologin Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
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 Import the NetBSD 1.5 RC system. 2001-06-16 07:16:14 +00:00
reboot mdoc(7) police: add -p to the synopsis line as well. 2001-12-14 15:03:32 +00:00
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 Default to WARNS=2. 2001-12-04 02:19:58 +00:00
savecore Default to WARNS=2. 2001-12-04 02:19:58 +00:00
setkey mdoc(7) police: protect trailing full stops of abbreviations 2001-08-10 13:45:36 +00:00
shutdown Default to WARNS=2. 2001-12-04 02:19:58 +00:00
slattach Default to WARNS=2. 2001-12-04 02:19:58 +00:00
spppcontrol mdoc(7) police: tidy up the markup. 2002-01-10 16:02:23 +00:00
startslip Default to WARNS=2. 2001-12-04 02:19:58 +00:00
swapon Default to WARNS=2. 2001-12-04 02:19:58 +00:00
sysctl Export a (machine dependent) kernel variable bootdev as 2002-03-10 20:08:44 +00:00
tunefs tunefs no longer outputs a warning if one tries to set soft-updates on 2002-01-07 07:01:52 +00:00
umount Default to WARNS=2. 2001-12-04 02:19:58 +00:00
vinum Default to WARNS=2. 2001-12-04 02:19:58 +00:00
Makefile Kernel support for smbfs is only built on the i386 at the moment, so 2001-12-14 23:11:45 +00:00
Makefile.inc Default to WARNS=2. 2001-12-04 02:19:58 +00:00