]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
libbpf: fix Makefile exit code if libelf not found
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 16 Dec 2017 00:19:30 +0000 (16:19 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Sun, 17 Dec 2017 19:40:29 +0000 (20:40 +0100)
/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>
tools/lib/bpf/Makefile

index 4555304dc18e6ab84137b43ae27ab4753d1e52a9..8ed43ae9db9b1873554f128c4b71e100dba3b637 100644 (file)
@@ -213,10 +213,10 @@ PHONY += force elfdep bpfdep
 force:
 
 elfdep:
-       @if [ "$(feature-libelf)" != "1" ]; then echo "No libelf found"; exit -1 ; fi
+       @if [ "$(feature-libelf)" != "1" ]; then echo "No libelf found"; exit 1 ; fi
 
 bpfdep:
-       @if [ "$(feature-bpf)" != "1" ]; then echo "BPF API too old"; exit -1 ; fi
+       @if [ "$(feature-bpf)" != "1" ]; then echo "BPF API too old"; exit 1 ; fi
 
 # Declare the contents of the .PHONY variable as phony.  We keep that
 # information in a variable so we can use it in if_changed and friends.