Date: Sat, 10 Dec 2016 20:20:33 +0000 (UTC) From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309828 - stable/11/bin/freebsd-version Message-ID: <201612102020.uBAKKXHB031870@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Sat Dec 10 20:20:33 2016 New Revision: 309828 URL: https://svnweb.freebsd.org/changeset/base/309828 Log: MFH (r308297): use what(1) instead of strings(1). PR: 213665 Submitted by: Pawel Worach <pawel.worach@gmail.com> Modified: stable/11/bin/freebsd-version/freebsd-version.sh.in Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/freebsd-version/freebsd-version.sh.in ============================================================================== --- stable/11/bin/freebsd-version/freebsd-version.sh.in Sat Dec 10 20:19:57 2016 (r309827) +++ stable/11/bin/freebsd-version/freebsd-version.sh.in Sat Dec 10 20:20:33 2016 (r309828) @@ -36,7 +36,7 @@ USERLAND_VERSION="@@REVISION@@-@@BRANCH@ : ${LOADER_CONF_FILES:=$LOADER_DIR/defaults/loader.conf $LOADER_DIR/loader.conf $LOADER_DIR/loader.conf.local} LOADER_RE1='^\([A-Z_a-z][0-9A-Z_a-z]*=[-./0-9A-Z_a-z]\{1,\}\).*$' LOADER_RE2='^\([A-Z_a-z][0-9A-Z_a-z]*="[-./0-9A-Z_a-z]\{1,\}"\).*$' -KERNEL_RE='^@(#)@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$' +KERNEL_RE='^@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$' progname=$(basename $0) @@ -67,7 +67,7 @@ kernel_version() { if [ ! -f "$kernfile" -o ! -r "$kernfile" ] ; then error "unable to locate kernel" fi - strings "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p" + what -qs "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p" } #
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612102020.uBAKKXHB031870>