浏览代码

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>
Jakub Kicinski 8 年之前
父节点
当前提交
21567eded9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tools/lib/bpf/Makefile

+ 2 - 2
tools/lib/bpf/Makefile

@@ -213,10 +213,10 @@ PHONY += force elfdep bpfdep
 force:
 force:
 
 
 elfdep:
 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:
 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
 # 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.
 # information in a variable so we can use it in if_changed and friends.