]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: Don't try to remove user's homedir on clean
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 20 Jan 2020 13:06:41 +0000 (14:06 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 21 Jan 2020 00:37:45 +0000 (16:37 -0800)
commit112a898d71494876d187229ee619a000bf6e11b7
tree16c28b8b1cd34c52fce69fa4de8574e224fcbc7b
parent7c4ad022ed3b53affad7e34617710b359914b2d5
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: 52031cf8b010 ("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
samples/bpf/Makefile