diff options
author | 2017-08-14 20:09:17 +0000 | |
---|---|---|
committer | 2017-08-14 20:09:17 +0000 | |
commit | 8d1546d23ccdfa490ef0f9f26fb535fc917d3abe (patch) | |
tree | 78ace24e769885a9196d82e24caff7fe03dd61f3 | |
parent | db_ctf_pprintf() doesn't actually support formatting, so s/f$// (diff) | |
download | wireguard-openbsd-8d1546d23ccdfa490ef0f9f26fb535fc917d3abe.tar.xz wireguard-openbsd-8d1546d23ccdfa490ef0f9f26fb535fc917d3abe.zip |
simplify LABEL extraction; from tb@
-rwxr-xr-x | usr.bin/ctfconv/ctfstrip | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ctfconv/ctfstrip b/usr.bin/ctfconv/ctfstrip index 4393d05fc04..ea1c18bc4a5 100755 --- a/usr.bin/ctfconv/ctfstrip +++ b/usr.bin/ctfconv/ctfstrip @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: ctfstrip,v 1.6 2017/08/13 15:28:51 visa Exp $ +# $OpenBSD: ctfstrip,v 1.7 2017/08/14 20:09:17 jasper Exp $ # # Copyright (c) 2017 Martin Pieuchot # @@ -53,7 +53,7 @@ TMPFILE=$(mktemp /tmp/.ctf.XXXXXXXXXX) # Extract kernel version if [ -z "${INFILE##bsd*}" ]; then - LABEL=`what $INFILE |tr -d '\n'|awk -F"${INFILE} " '{ print $2 '\n' }'` + LABEL=`what $INFILE | sed -n '$s/^ //p'` fi # If ctfstrip was passed a file that lacks useful debug sections, ctfconv will fail. |