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.wor...@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"
 }
 
 #
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to