Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Stange <nstange@suse.de>2018-07-08 13:02:17 +0200
committerMiroslav Benes <mbenes@suse.cz>2018-07-10 13:52:12 +0200
commit98526616971665ee0eb13274384cfaa3d28b4378 (patch)
tree0f98da07fb9467ad08b68e7e2d3366c5b26e0bdb
parent643f04cceabcd4ba6c752e5a439a549fa8491a93 (diff)
scripts/register-patches.sh: allow spaces as patched_funcs.csv separators
Currently there's one single cut(1) usage which requires that (single) tabs are used as field separators for the patched_funcs.csv. As the rest of the code can deal with sequences of any whitespace already, this imposes an unnecessary restriction on the format. Substitute that cut(1) usage by a sed(1) invocation as appropriate. Signed-off-by: Nicolai Stange <nstange@suse.de> Signed-off-by: Miroslav Benes <mbenes@suse.cz>
-rwxr-xr-xscripts/register-patches.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/register-patches.sh b/scripts/register-patches.sh
index 79b3d19..6bb6be4 100755
--- a/scripts/register-patches.sh
+++ b/scripts/register-patches.sh
@@ -84,7 +84,8 @@ KLP_PATCHES_INCLUDES=$(
## Add the individual patches' replacement entries to struct livepatch.
objs=
if [ ${#patched_funcs[@]} -gt 0 ]; then
- objs=$(cut -f1 "${patched_funcs[@]}" | grep -v '^[[:blank:]]*$' | \
+ objs=$(sed 's/[[:blank:]].*//' "${patched_funcs[@]}" | \
+ grep -v '^$' | \
grep -v vmlinux | sort | uniq)
fi
objs="vmlinux $objs"