From owner-svn-src-all@FreeBSD.ORG Fri Apr 26 21:28:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AB67DD40; Fri, 26 Apr 2013 21:28:25 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9421EDA; Fri, 26 Apr 2013 21:28:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3QLSPq0058314; Fri, 26 Apr 2013 21:28:25 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3QLSPaI058312; Fri, 26 Apr 2013 21:28:25 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201304262128.r3QLSPaI058312@svn.freebsd.org> From: Devin Teske Date: Fri, 26 Apr 2013 21:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249955 - in head/usr.sbin/bsdconfig/share: . media X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2013 21:28:25 -0000 Author: dteske Date: Fri Apr 26 21:28:24 2013 New Revision: 249955 URL: http://svnweb.freebsd.org/changeset/base/249955 Log: Properly sanitize --menu results (guards against Gtk library warnings from X11 side of things from bleeding into Xdialog(1) stderr output). It should be duely noted that such errors are not a by-product of anything in the Xdialog(1) utility or API, but optional libraries that it can link against (such as Gtk1 versus Gtk2; if you compile xdialog from ports against Gtk2 AND misconfigure your fonts or generally make Gtk2 unhappy, these warning messages can bleed into the captured stderr -- that is we we sanitize!). Modified: head/usr.sbin/bsdconfig/share/device.subr head/usr.sbin/bsdconfig/share/media/tcpip.subr Modified: head/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/device.subr Fri Apr 26 21:19:05 2013 (r249954) +++ head/usr.sbin/bsdconfig/share/device.subr Fri Apr 26 21:28:24 2013 (r249955) @@ -645,7 +645,12 @@ f_device_menu() [ "$errexit" ] && set -e - [ $retval -eq 0 ] && echo "$mtag" >&2 + if [ $retval -eq 0 ]; then + # Clean up the output of [X]dialog(1) and return it + setvar DIALOG_MENU_$$ "$mtag" + mtag=$( f_dialog_menutag ) + echo "$mtag" >&2 + fi return $retval } Modified: head/usr.sbin/bsdconfig/share/media/tcpip.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/tcpip.subr Fri Apr 26 21:19:05 2013 (r249954) +++ head/usr.sbin/bsdconfig/share/media/tcpip.subr Fri Apr 26 21:28:24 2013 (r249955) @@ -1399,6 +1399,8 @@ f_device_dialog_tcp() 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) local retval=$? + setvar DIALOG_MENU_$$ "$cp" + cp=$( f_dialog_menutag ) f_dprintf "retval=%u mtag=[%s]" $retval "$cp" if [ $retval -eq 2 ]; then