summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/networking
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2014-04-23 22:04:04 +0000
committerdteske <dteske@FreeBSD.org>2014-04-23 22:04:04 +0000
commit70eef882b375ccbab79ba026423e85d58e9beefa (patch)
tree9ad2385061c262108b35673a6f484e11aacdd324 /usr.sbin/bsdconfig/networking
parent17495be0b718b94d234d4b4ab299a63ba15f0adf (diff)
downloadFreeBSD-src-70eef882b375ccbab79ba026423e85d58e9beefa.zip
FreeBSD-src-70eef882b375ccbab79ba026423e85d58e9beefa.tar.gz
Implement GEOM based media device classification. You'll notice a few
different things from this commit: + More devices. Devices that were previously ignored are now present. + Faster device scanning. "There is no try, only Do" -- f_device_try() is no longer the basis of device scanning as GEOM provides [nearly] all devices (doesn't provide network devices). + More information available as non-root. Usually you have to be root to do things like taste filesystems, and that limits the amount of information available to non-root users; with GEOM, we see all even running unprivileged as the brunt of information (except for so- called ``dangerously dedicated'' file systems) is represented by the `kern.geom.confxml' sysctl(8) MIB. NB: Only really useful for external scripts that use the API and run as non-root; where this code is used in bsdconfig(8) and bsdinstall(8) you are running as root so can detect even ``dangerously dedicated'' file systems that are not present in GEOM; e.g., no PART class for a DOS filesystem written directly to disk without partition table). + No more use of legacy tools such as diskinfo(8) to get disk capacity or fdisk(8) to see partitions. MFC after: 1 week
Diffstat (limited to 'usr.sbin/bsdconfig/networking')
-rw-r--r--usr.sbin/bsdconfig/networking/share/device.subr5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bsdconfig/networking/share/device.subr b/usr.sbin/bsdconfig/networking/share/device.subr
index 2d72045..42010ab 100644
--- a/usr.sbin/bsdconfig/networking/share/device.subr
+++ b/usr.sbin/bsdconfig/networking/share/device.subr
@@ -75,10 +75,11 @@ f_dialog_menu_netdev()
#
# Get list of usable network interfaces
#
- local devs if iflist= # Calculated below
+ local dev devs if iflist= # Calculated below
f_device_rescan_network
f_device_find "" $DEVICE_TYPE_NETWORK devs
- for if in $devs; do
+ for dev in $devs; do
+ f_struct "$dev" get name if || continue
# Skip unsavory interfaces
case "$if" in
lo[0-9]*|ppp[0-9]*|sl[0-9]*|faith[0-9]*) continue ;;
OpenPOWER on IntegriCloud