diff options
author | dteske <dteske@FreeBSD.org> | 2013-10-09 08:12:26 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-10-09 08:12:26 +0000 |
commit | ee2fafc6a903bcdb2569fc1d6c3ffce0f14c3ebd (patch) | |
tree | 4b1792e416c982abbc7d554b2fb8ab80ba5afb91 /usr.sbin/bsdconfig/networking/share/media.subr | |
parent | 255d648aec920f8660ba18ef659a9a08f5ee0198 (diff) | |
download | FreeBSD-src-ee2fafc6a903bcdb2569fc1d6c3ffce0f14c3ebd.zip FreeBSD-src-ee2fafc6a903bcdb2569fc1d6c3ffce0f14c3ebd.tar.gz |
Introduce centralized [X]dialog(1) exit codes to `dialog.subr' and make-use
throughout the bsdconfig(8) code. While we're here, add an explicit argument
to lvalue-seeking invocations of "return" that previously had no argument.
Also, consolidate a single instance of double-newline and remove some
comments that are no longer required (given increased readability with new
exit codes).
Approved by: re (glebius)
Diffstat (limited to 'usr.sbin/bsdconfig/networking/share/media.subr')
-rw-r--r-- | usr.sbin/bsdconfig/networking/share/media.subr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bsdconfig/networking/share/media.subr b/usr.sbin/bsdconfig/networking/share/media.subr index c6efa57..d4283c1 100644 --- a/usr.sbin/bsdconfig/networking/share/media.subr +++ b/usr.sbin/bsdconfig/networking/share/media.subr @@ -118,7 +118,7 @@ f_dialog_input_options() local setting="$( printf "$msg_current_options" \ "$interface" "$options" )" f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" || - return $FAILURE + return $DIALOG_CANCEL fi local msg="$( printf "$msg_please_enter_mediaopts" "$interface" )" @@ -138,7 +138,7 @@ f_dialog_input_options() local retval=$? f_dialog_line_sanitize _options - [ $retval -eq $SUCCESS ] && options="$_options" + [ $retval -eq $DIALOG_OK ] && options="$_options" return $retval } @@ -165,7 +165,7 @@ f_dialog_menu_media_options() local setting="$( printf "$msg_current_options" \ "$interface" "$_options" )" f_noyes "$msg_nfs_mounts_may_cause_hang" "$setting" || - return $FAILURE + return $DIALOG_CANCEL fi # @@ -219,7 +219,7 @@ f_dialog_menu_media_options() local retval=$? f_dialog_data_sanitize tag - if [ $retval -eq $SUCCESS ]; then + if [ $retval -eq $DIALOG_OK ]; then options=$( eval f_dialog_menutag2item \"\$tag\" \ $supported_media ) case "$options" in |