freebsd-dev/sbin
Ralf S. Engelschall ccdd2fce3a Fix the derivation of the GEOM name from the specified device name by
complementing the existing special case of a not existing /dev prefix
with the recognition of an already existing /dev prefix.

This implicitly solves the following two issues related to working on
GEOM devices /dev/foo/bar (which have the GEOM provider name "foo/bar")
with the expected commands like "bsdlabel /dev/foo/bar":

1. the error "Geom not found" when trying to write or edit the BSD
   label (because previously the incorrect GEOM name "bar" instead of
   "foo/bar" was derived from "/dev/foo/bar").

2. the multiple times reported "magically introduced" partition offset
   of 63 blocks and the resulting errors like "partition extends past
   end of unit" and "partition c doesn't start at 0!".

   This implicitly resulted because bsdlabel(8) determines the "MBR
   offset" via GEOM and (intentionally) silently falls back to an offset
   of 0 if it could not be queried (which is the case if the name was
   incorrectly derived).

   Usually (at least on PCs) the offset for the first slice is 63 blocks
   and bsdlabel(8) automatically subtracts them from the absolute
   offsets in the read on-disk BSD label, resulting in the display of an
   effective offset of 0. If the GEOM query fails, the assumed offset of
   0 is subtracted and an incorrect effective offset of 63 is displayed
   and tried to be worked upon.

Reviewed by: pjd
MFC after: 1 week
2005-01-07 12:19:57 +00:00
..
adjkerntz
atacontrol
atm
badsect The badsect(8) utility uses atol(), which doesn't allow very good error 2005-01-03 19:03:40 +00:00
bsdlabel Fix the derivation of the GEOM name from the specified device name by 2005-01-07 12:19:57 +00:00
camcontrol
ccdconfig
clri
comcontrol
conscontrol
devd
devfs
dhclient
dmesg
dump Clearer va-args usage. 2004-12-30 00:53:56 +00:00
dumpfs
dumpon
fdisk
fdisk_pc98
ffsinfo The ffsinfo utility uses atol() to parse numeric values out of optarg 2005-01-03 18:59:04 +00:00
fsck
fsck_ffs
fsck_msdosfs
fsdb
fsirand
gbde
geom Detect if class name is '-h' or 'help' and if it is, show general help 2004-12-28 17:07:18 +00:00
ggate
gpt
growfs Cross-reference ffsinfo(8). 2004-12-26 07:00:10 +00:00
gvinum
idmapd
ifconfig Fix special status reporting. Prior to the reorg there was 2004-12-31 19:46:27 +00:00
init
ip6fw
ipf Link a couple of missing manpages 2005-01-07 09:22:02 +00:00
ipfs
ipfstat
ipfw Write some bit mask limits in hex rather than decimal so they look less 2005-01-07 01:21:23 +00:00
ipmon
ipnat
kldconfig
kldload
kldstat
kldunload
ldconfig
mca
md5
mdconfig Rewrite piece of code which I committed some time ago that allows to 2004-12-27 17:20:06 +00:00
mdmfs
mknod
mksnap_ffs
mount Fix typo. 2004-12-26 18:06:05 +00:00
mount_autofs
mount_cd9660
mount_ext2fs
mount_hpfs
mount_msdosfs
mount_nfs
mount_nfs4
mount_ntfs
mount_nullfs
mount_std
mount_udf
mount_ufs
mount_umapfs
mount_unionfs
natd
newfs
newfs_msdos
nfsiod
nos-tun
pfctl
pflogd
ping
ping6
quotacheck
rcorder
reboot
recoverdisk
restore
route
routed
rtsol
savecore
sconfig Fix typos. 2004-12-30 01:48:12 +00:00
setkey
shutdown
slattach Remove cross reference to uustat(1), which is no longer in the base 2005-01-02 12:40:40 +00:00
spppcontrol
startslip
sunlabel
swapon
sysctl
tunefs
umount
Makefile
Makefile.inc