From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH net 0/6] tools: bpftool: fix a minor issues with JSON and Makefiles Date: Tue, 28 Nov 2017 17:44:27 -0800 Message-ID: <20171129014434.31694-1-jakub.kicinski@netronome.com> Cc: oss-drivers@netronome.com, Jakub Kicinski To: netdev@vger.kernel.org Return-path: Received: from mail-pl0-f43.google.com ([209.85.160.43]:36430 "EHLO mail-pl0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752892AbdK2Bpf (ORCPT ); Tue, 28 Nov 2017 20:45:35 -0500 Received: by mail-pl0-f43.google.com with SMTP id b12so1113216plm.3 for ; Tue, 28 Nov 2017 17:45:35 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: Quentin says: First commit in this series fixes a crash that occurs when incorrect arguments are passed to bpftool after the `--json` option. It comes from the usage() function trying to use the JSON writer, although the latter has not been created yet at that point. Other patches add destruction of the writer in case the program exits in usage(), fix error messages handling when an unrecognized option is encountered, remove a spurious new-line character in an error message. Last patches are related to the Makefiles. They fix the installation directory prefix and .PHONY targets. Quentin Monnet (6): tools: bpftool: fix crash on bad parameters with JSON tools: bpftool: clean up the JSON writer before exiting in usage() tools: bpftool: make error message from getopt_long() JSON-friendly tools: bpftool: remove spurious line break from error message tools: bpftool: change installation directory tools: bpftool: declare phony targets as such tools/bpf/bpftool/Documentation/Makefile | 2 +- tools/bpf/bpftool/Makefile | 7 ++++--- tools/bpf/bpftool/main.c | 36 +++++++++++++++++++++----------- tools/bpf/bpftool/main.h | 5 +++-- 4 files changed, 32 insertions(+), 18 deletions(-) -- 2.14.1