From: Toke Høiland-Jørgensen Date: Mon, 20 Jan 2020 13:06:41 +0000 (+0100) Subject: samples/bpf: Don't try to remove user's homedir on clean X-Git-Tag: v5.6-rc1~151^2~46^2~8^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2e5e93ae8af6a34bca536cdc4b453ab1e707b8b;p=thirdparty%2Fkernel%2Flinux.git samples/bpf: Don't try to remove user's homedir on clean 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 Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/157952560126.1683545.7273054725976032511.stgit@toke.dk --- diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 5b89c0370f332..f86d713a17a5b 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -254,7 +254,7 @@ all: clean: $(MAKE) -C ../../ M=$(CURDIR) clean - @rm -f *~ + @find $(CURDIR) -type f -name '*~' -delete $(LIBBPF): FORCE # Fix up variables inherited from Kbuild that tools/ build system won't like