Lines Matching +full:button +full:- +full:191
3 # Copyright (c) 2012-2016 Devin Teske
124 # $var_to_set is non-NULL, upon success holds the name of the struct created.
126 # `DEVICE' structure-type to be assigned (defined above).
144 if f_device_find -1 "$__name" "$__type" __device; then
174 while [ $n -le $NDEVICES ]; do
178 # XXX This potentially leaks $dev->private if it's being
197 while [ $n -le $NDEVICES ]; do
216 while [ $i -lt $NDEVICES ]; do
222 NDEVICES=$(( $NDEVICES - 1 ))
261 for devname in $( ifconfig -l ); do
273 f_media_init_network "" f_media_shutdown_network "" -1
277 eval "$( ifconfig $devname 2> /dev/null | awk -v var=flags '
298 # Rescan all devices, after closing previous set - convenience function.
309 # Rescan all network devices, after closing previous set - for convenience.
320 # register it using f_device_register() with known type-specific arguments.
384 if [ "${p_geom:-$geom}" != "$geom" ]; then
398 $DEVICE_TYPE_ANY "${p_devname:-$devname}" catalog_struct
401 # Use device catalog entry for potential re-classification(s)
457 [ -r "/dev/$devname" ] &&
458 magic=$( file -bs "/dev/$devname" 2> /dev/null )
491 [ $retval -eq $SUCCESS ] &&
494 # Potentially re-classify as USB device
495 if [ "$device_type" = "$DEVICE_TYPE_UFS" -a \
522 "$devname" "${desc:-GEOM RAID device}" \
536 "$devname" "${desc:-GEOM ZFS::ZVOL device}" \
612 # Use device catalog entry for potential re-classification(s)
670 # is a known partition type that we can handle. If $var_to_set is non-NULL,
678 local __capacity="${4:--1}" __magic="$5"
695 [ -r "/dev/$__devname" -a ! "$__magic" ] &&
696 __magic=$( file -bs "/dev/$__devname" 2> /dev/null )
709 freebsd-ufs)
718 apple-*|linux-*|ms-*|netbsd-*|ntfs|vmware-*)
721 bios-*|ebr|efi|mbr|freebsd-boot|freebsd-swap)
724 freebsd-nandfs|freebsd-vinum|freebsd-zfs)
734 # Given a device name, taste it and register the device if it is a so-called
736 # Tasting is done using file(1) (specifically `file -bs') but if $magic is
737 # present and non-NULL it is used instead. If $var_to_set is non-NULL, upon
744 local __var_to_set="$1" __devname="$2" __capacity="${3:--1}"
747 [ -r "/dev/${__devname#/dev/}" -a ! "$__magic" ] &&
748 __magic=$( file -bs "/dev/$__devname" 2> /dev/null )
790 # for capturing in a sub-shell (which is less-recommended because of
805 # Attempt to create an alternate-form of $__name that contains the
809 local __left="${__name%%[0-9]*}" __right="${__name#*[0-9]}"
811 # Chop leading digits from right 'til we hit first non-digit
814 [0-9]*) __right="${__right#[0-9]}" ;;
825 [ "$__dev_name" = "$__name" -o "$__dev_name" = "$__dname" ] ||
828 [ "${__type:-$__dev_type}" = "$__dev_type" ] || continue
843 # Store a description (desc) in-association with device $type and $name.
883 # standard out for capturing in a sub-shell (which is less-recommended because
901 __devname="${__name%%[0-9]*}"
903 __devunit="${__devunit%%[!0-9]*}"
906 sysctl -n "dev.$__devname.$__devunit.%desc" \
913 sysctl -n "dev.$__devname.$__devunit.%desc" \
925 # Sensible fall-backs for specific types
963 [ $(( ${flags:-0} & $IF_ETHERNET )) -eq $IF_ETHERNET ]
984 [ $(( ${flags:-0} & $IF_WIRELESS )) -eq $IF_WIRELESS ]
1004 [ $(( ${flags:-0} & $IF_ACTIVE )) -eq $IF_ACTIVE ]
1011 # f_device_find [-1] $name [$type [$var_to_set]]
1013 # Find one or more registered devices by name, type, or both. Returns a space-
1016 # If `-1' option flag is given, only the first matching device is returned.
1019 # out for capturing in a sub-shell (which is less-recommended because of
1030 shift $(( $OPTIND - 1 ))
1032 local __name="$1" __type="${2:-$DEVICE_TYPE_ANY}" __var_to_set="$3"
1034 while [ $__n -le $NDEVICES ]; do
1037 if [ "$__name" = "$__devname" -o ! "$__name" ] &&
1038 [ "$__type" = "$DEVICE_TYPE_ANY" -o \
1065 ${init_func:-:} "$device"
1079 ${get_func:-:} "$device" "$file" ${3+"$probe"}
1092 ${shutdown_func:-:} "$device"
1100 # (newline to be specific) unless $var_to_set is present and non-NULL.
1102 # This function is a two-parter. Below is the awk(1) portion of the function,
1107 # -v prop="property"
1115 dest[k+1] = dest[k]; k--
1135 local __property="${1:-name}" __var_to_get="$2" __var_to_set="$3"
1145 setvar "${__var_to_set:-__cp}" "$(
1147 awk -v prop="$__property" "$f_device_sort_by_awk"
1175 '$name' '$desc'" # END-QUOTE
1188 case $- in *e*) errexit=1; esac
1194 --title \"\$title\" \
1195 --backtitle \"\$btitle\" \
1196 --hline \"\$hline\" \
1197 --ok-label \"\$msg_ok\" \
1198 --cancel-label \"\$msg_cancel\" \
1200 --help-button \
1201 --help-label \"\$msg_help\" \
1202 ${USE_XDIALOG:+--help \"\"} \
1204 --menu \"\$prompt\" \
1211 [ $retval -ne $DIALOG_HELP ] && break
1212 # Otherwise, the Help button was pressed
1218 [ "$errexit" ] && set -e
1220 if [ $retval -eq $DIALOG_OK ]; then
1227 device=$( set -- $devs; eval echo \${$index} )
1236 # Short-hand
1246 # The below classifications allow us to re-group the GEOM devices from the
1247 # `DEV' GEOM class appropriately while providing fall-back descriptions both
1257 f_cdrom "scd%d" "Sony CDROM drive - CDU31/33A type"
1283 f_network "bm%d" "Apple BMAC Built-in Ethernet"
1290 f_network "de%d" "DEC DE435 PCI NIC or other DC21040-AA based card"
1292 f_network "ed%d" "Novell NE1000/2000; 3C503; NE2000-compatible PCMCIA"
1316 f_network "lnc%d" "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) Ethernet"
1317 f_network "lo%d" "Loop-back (local) network interface"
1334 f_network "sf%d" "Adaptec AIC-6915 PCI Ethernet card"
1335 f_network "sge%d" "Silicon Integrated Systems SiS190/191 Ethernet"