diff options
author | dteske <dteske@FreeBSD.org> | 2013-04-26 21:28:24 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-04-26 21:28:24 +0000 |
commit | d1ece6874f4d51ba0887b2b4e0cb556dfe555466 (patch) | |
tree | c1a99b440cea5e7746da4e64e13eb1291209ef3f /usr.sbin/bsdconfig/share/device.subr | |
parent | 8d0cd52a5477c92307c1917458163701401f6c3a (diff) | |
download | FreeBSD-src-d1ece6874f4d51ba0887b2b4e0cb556dfe555466.zip FreeBSD-src-d1ece6874f4d51ba0887b2b4e0cb556dfe555466.tar.gz |
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!).
Diffstat (limited to 'usr.sbin/bsdconfig/share/device.subr')
-rw-r--r-- | usr.sbin/bsdconfig/share/device.subr | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/bsdconfig/share/device.subr b/usr.sbin/bsdconfig/share/device.subr index ad6c64c..c1a7b16 100644 --- a/usr.sbin/bsdconfig/share/device.subr +++ b/usr.sbin/bsdconfig/share/device.subr @@ -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 } |