Date: Thu, 21 Nov 2013 19:43:45 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258439 - in head/usr.sbin/bsdconfig: dot includes Message-ID: <201311211943.rALJhjmS030153@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Thu Nov 21 19:43:45 2013 New Revision: 258439 URL: http://svnweb.freebsd.org/changeset/base/258439 Log: f_die() (see `bsdconfig includes -dF die') uses a dialog box (and has been documented as such; I just forgot). These utilities are command-line only and as such should stick to either using f_die without arguments or printf) Modified: head/usr.sbin/bsdconfig/dot/dot head/usr.sbin/bsdconfig/includes/includes Modified: head/usr.sbin/bsdconfig/dot/dot ============================================================================== --- head/usr.sbin/bsdconfig/dot/dot Thu Nov 21 19:31:57 2013 (r258438) +++ head/usr.sbin/bsdconfig/dot/dot Thu Nov 21 19:43:45 2013 (r258439) @@ -163,7 +163,7 @@ while getopts cdhi flag; do done shift $(( $OPTIND - 1 )) -cd $BSDCFG_LIBE || f_die 1 "$msg_directory_not_found" "$BSDCFG_LIB" +cd $BSDCFG_LIBE || f_die # Pedantic # # Get a list of menu programs Modified: head/usr.sbin/bsdconfig/includes/includes ============================================================================== --- head/usr.sbin/bsdconfig/includes/includes Thu Nov 21 19:31:57 2013 (r258438) +++ head/usr.sbin/bsdconfig/includes/includes Thu Nov 21 19:43:45 2013 (r258439) @@ -137,7 +137,7 @@ done shift $(( $OPTIND - 1 )) # cd(1) to `share' dir so relative paths work for find and positional args -cd $BSDCFG_SHARE || f_die 1 "$msg_directory_not_found" "$BSDCFG_SHARE" +cd $BSDCFG_SHARE || f_die # Pedantic # # If given an argument, operate on it specifically (implied `-f') and exit @@ -147,9 +147,11 @@ for include in "$@"; do # See if they've just omitted the `*.subr' suffix [ -f "$include.subr" -a ! -f "$include" ] && include="$include.subr" if [ ! -f "$include" ]; then - f_die 1 "$msg_no_such_file_or_directory" "$0" "$include" + printf "$msg_no_such_file_or_directory" "$0" "$include" + exit $FAILURE elif [ ! -r "$include" ]; then - f_die 1 "$msg_permission_denied" "$0" "$include" + printf "$msg_permission_denied" "$0" "$include" + exit $FAILURE fi show_include "$include" || f_die done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311211943.rALJhjmS030153>