Skip to content

Commit b2e5e93

Browse files
tohojoAlexei Starovoitov
authored andcommitted
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: b62a796 ("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
1 parent f1c3656 commit b2e5e93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎samples/bpf/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ all:
254254

255255
clean:
256256
$(MAKE) -C ../../ M=$(CURDIR) clean
257-
@rm -f *~
257+
@find $(CURDIR) -type f -name '*~' -delete
258258

259259
$(LIBBPF): FORCE
260260
# Fix up variables inherited from Kbuild that tools/ build system won't like

0 commit comments

Comments
 (0)