Deleted Added
full compact
device.subr (249955) device.subr (251190)
1if [ ! "$_DEVICE_SUBR" ]; then _DEVICE_SUBR=1
2#
3# Copyright (c) 2012-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
1if [ ! "$_DEVICE_SUBR" ]; then _DEVICE_SUBR=1
2#
3# Copyright (c) 2012-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/usr.sbin/bsdconfig/share/device.subr 249955 2013-04-26 21:28:24Z dteske $
27# $FreeBSD: head/usr.sbin/bsdconfig/share/device.subr 251190 2013-05-31 19:07:17Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." device.subr
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/strings.subr

--- 566 unchanged lines hidden (view full) ---

602
603 local desc menu_list=
604 for dev in $devs; do
605 device_$dev get desc desc
606 desc=$( echo "$desc" | awk "$sanitize_awk" )
607 menu_list="$menu_list '$dev' '$desc'"
608 done
609
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." device.subr
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/strings.subr

--- 566 unchanged lines hidden (view full) ---

602
603 local desc menu_list=
604 for dev in $devs; do
605 device_$dev get desc desc
606 desc=$( echo "$desc" | awk "$sanitize_awk" )
607 menu_list="$menu_list '$dev' '$desc'"
608 done
609
610 local size mtag
611 size=$( eval f_dialog_menu_size \
612 \"\$title\" \
613 \"\$btitle\" \
614 \"\$prompt\" \
615 \"\$hline\" \
616 $menu_list )
610 local height width rows
611 eval f_dialog_menu_size height width rows \
612 \"\$title\" \
613 \"\$btitle\" \
614 \"\$prompt\" \
615 \"\$hline\" \
616 $menu_list
617
618 local errexit=
619 case $- in *e*) errexit=1; esac
620 set +e
621
622 while :; do
623 mtag=$( eval $DIALOG \
624 --title \"\$title\" \
625 --backtitle \"\$btitle\" \
626 --ok-label \"\$msg_ok\" \
627 --cancel-label \"\$msg_cancel\" \
628 ${helpfile:+ \
629 --help-button \
630 --help-label \"\$msg_help\" \
631 ${USE_XDIALOG:+--help \"\"} \
632 } \
617
618 local errexit=
619 case $- in *e*) errexit=1; esac
620 set +e
621
622 while :; do
623 mtag=$( eval $DIALOG \
624 --title \"\$title\" \
625 --backtitle \"\$btitle\" \
626 --ok-label \"\$msg_ok\" \
627 --cancel-label \"\$msg_cancel\" \
628 ${helpfile:+ \
629 --help-button \
630 --help-label \"\$msg_help\" \
631 ${USE_XDIALOG:+--help \"\"} \
632 } \
633 --menu \"\$prompt\" $size \
633 --menu \"\$prompt\" \
634 $height $width $rows \
634 $menu_list \
635 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
636 )
637 local retval=$?
638
639 [ $retval -ne 2 ] && break
640 # Otherwise, the Help button was pressed
641 f_show_help "$helpfile"

--- 159 unchanged lines hidden ---
635 $menu_list \
636 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
637 )
638 local retval=$?
639
640 [ $retval -ne 2 ] && break
641 # Otherwise, the Help button was pressed
642 f_show_help "$helpfile"

--- 159 unchanged lines hidden ---