diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-12-15 19:19:30 -0500 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-17 14:40:29 -0500 |
commit | 21567eded9805acbf69807671eb94d3536f797d0 (patch) | |
tree | 618699b17b25df3fbd9006d3a78ef92b78223748 /tools/lib | |
parent | ef9fde06a259f5da660ada63214addf8cd86a7b9 (diff) |
libbpf: fix Makefile exit code if libelf not found
/bin/sh's exit does not recognize -1 as a number, leading to
the following error message:
/bin/sh: 1: exit: Illegal number: -1
Use 1 as the exit code.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/bpf/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index 4555304dc18e..8ed43ae9db9b 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile | |||
@@ -213,10 +213,10 @@ PHONY += force elfdep bpfdep | |||
213 | force: | 213 | force: |
214 | 214 | ||
215 | elfdep: | 215 | elfdep: |
216 | @if [ "$(feature-libelf)" != "1" ]; then echo "No libelf found"; exit -1 ; fi | 216 | @if [ "$(feature-libelf)" != "1" ]; then echo "No libelf found"; exit 1 ; fi |
217 | 217 | ||
218 | bpfdep: | 218 | bpfdep: |
219 | @if [ "$(feature-bpf)" != "1" ]; then echo "BPF API too old"; exit -1 ; fi | 219 | @if [ "$(feature-bpf)" != "1" ]; then echo "BPF API too old"; exit 1 ; fi |
220 | 220 | ||
221 | # Declare the contents of the .PHONY variable as phony. We keep that | 221 | # Declare the contents of the .PHONY variable as phony. We keep that |
222 | # information in a variable so we can use it in if_changed and friends. | 222 | # information in a variable so we can use it in if_changed and friends. |