summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@redhat.com>2020-01-20 14:06:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-14 16:32:13 -0500
commitf536b55474f1396151faf086e250cdcdb2dd5752 (patch)
treebc1df79109335bbc037e87a93b60369f0282d990
parente78ca4d34768bc7c18cfce47c84b6a46bc40b855 (diff)
downloadlinux-stable-f536b55474f1396151faf086e250cdcdb2dd5752.tar.gz
linux-stable-f536b55474f1396151faf086e250cdcdb2dd5752.tar.bz2
linux-stable-f536b55474f1396151faf086e250cdcdb2dd5752.zip
samples/bpf: Don't try to remove user's homedir on clean
commit b2e5e93ae8af6a34bca536cdc4b453ab1e707b8b upstream. The 'clean' rule in the samples/bpf Makefile tries to remove backup files (ending in ~). However, if no such files exist, it will instead try to remove the user's home directory. While the attempt is mostly harmless, it does lead to a somewhat scary warning like this: rm: cannot remove '~': Is a directory Fix this by using find instead of shell expansion to locate any actual backup files that need to be removed. Fixes: b62a796c109c ("samples/bpf: allow make to be run from samples/bpf/ directory") Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Link: https://lore.kernel.org/bpf/157952560126.1683545.7273054725976032511.stgit@toke.dk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--samples/bpf/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index c1dc632d4ea4..3460036621e4 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -184,7 +184,7 @@ all: $(LIBBPF)
clean:
$(MAKE) -C ../../ M=$(CURDIR) clean
- @rm -f *~
+ @find $(CURDIR) -type f -name '*~' -delete
$(LIBBPF): FORCE
$(MAKE) -C $(dir $@) $(notdir $@)