From patchwork Thu May 24 05:50:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz4x0W59z9s2L for ; Thu, 24 May 2018 15:50:41 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="l5OOl89L"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz4w3DKhzF1H5 for ; Thu, 24 May 2018 15:50:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="l5OOl89L"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4j5fd9zF1Dt for ; Thu, 24 May 2018 15:50:29 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="l5OOl89L"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4j17ZZz9s1w; Thu, 24 May 2018 15:50:29 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141029; bh=4G5t0j0C4mDr7gnDd6+VEGzFGj+WAuTUFXrTeY8GOTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l5OOl89LXPkmFCKqcvNLwPjXTKf7wT+ZJFIKxFew0rcrUti/DwppzqqWecYOtvxky dxC9utHUUO8HHmotUKAWxw7MWtSQdc9fdiAvQynFWnRZccewP7NperP8mIGc7y32xx VojOGLEy6ubTRhlI+VqriIqWFBAmhm1SkmWWalUx7F/t+4WGFjnz5XuRyxz6IerXlx 6G+xTy109pNOajU8WMFMO3rTKme2bfgvTxteSvVILVq0qgmbVEX1SU0M0r1lvNgTyE TX+iq3duoh3fiMyMe3+v/1W3yvhHxRTW+n2WK00xgLYrPP/KHjcZcKTHnjy/4XwPOG 156yHZw7NVAGg== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:07 +1000 Message-Id: <20180524055017.8801-2-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 01/11] main: Include string.h for memset X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- src/thread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/thread.c b/src/thread.c index 0e4627f..f32a437 100644 --- a/src/thread.c +++ b/src/thread.c @@ -17,6 +17,7 @@ #include #include #include +#include #include From patchwork Thu May 24 05:50:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919593 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz4s4jqdz9s16 for ; Thu, 24 May 2018 15:50:37 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="jZtQn07U"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz4r6z5TzF1HG for ; Thu, 24 May 2018 15:50:36 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="jZtQn07U"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4k0QxhzF1F0 for ; Thu, 24 May 2018 15:50:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="jZtQn07U"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4j4F32z9s2L; Thu, 24 May 2018 15:50:29 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141029; bh=hErX/rK6+wjrTIqXGM3WNkx6vaweGXTNlKLxN36Nuqc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jZtQn07Uu/ajff/eZ+giL6K+D07xGi2+6HKX38H2T5DVLPPO/MlF0DE9XkbUS3eup ojClpnrAxvkWd4znTWI+KWwdyIZJj2OTxrEYKLA25z3EHhGFsD7XYarnRUhE1+nSvh YrZPJfAYS6LmWJBdYlYATrZDW2sxI/hR5j+NNoFFJ3lbJdGcjM6SpOZWOxnLsZyG/M GpsOXLFcHnRuCwMVek3bwohif5nk7LRDT1vYpwPG09lzPcj+HzX2hDw+UsOSYnBJ+Z H2DgM+DU2QXZcMY3WH2C1Mq0Z9a8I6avsvkk9f2qq4Zr7V0Ik7YbwjZs+KkDydpnG+ JrEJUCscOvfng== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:08 +1000 Message-Id: <20180524055017.8801-3-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 02/11] main: Use pdbg logging api in pdbg X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- src/htm.c | 3 +++ src/main.c | 6 ++---- src/mem.c | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/htm.c b/src/htm.c index 1e65a04..a1a88d1 100644 --- a/src/htm.c +++ b/src/htm.c @@ -41,6 +41,9 @@ #define HTM_ENUM_TO_STRING(e) ((e == HTM_NEST) ? "nhtm" : "chtm") +#define PR_ERROR(x, args...) \ + pdbg_log(PDBG_ERROR, x, ##args) + enum htm_type { HTM_CORE, HTM_NEST, diff --git a/src/main.c b/src/main.c index 20f5319..eb5d64d 100644 --- a/src/main.c +++ b/src/main.c @@ -43,10 +43,8 @@ #include "htm.h" #include "options.h" -#undef PR_DEBUG -#define PR_DEBUG(...) -#define PR_ERROR(x, args...) \ - fprintf(stderr, "%s: " x, __FUNCTION__, ##args) +#define PR_ERROR(x, args...) \ + pdbg_log(PDBG_ERROR, x, ##args) #include "fake.dt.h" diff --git a/src/mem.c b/src/mem.c index ff22500..71e91d3 100644 --- a/src/mem.c +++ b/src/mem.c @@ -26,6 +26,9 @@ #include "main.h" #include "progress.h" +#define PR_ERROR(x, args...) \ + pdbg_log(PDBG_ERROR, x, ##args) + #define PUTMEM_BUF_SIZE 1024 static int getmem(uint64_t addr, uint64_t size, int ci) { From patchwork Thu May 24 05:50:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919596 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz544qn7z9s1w for ; Thu, 24 May 2018 15:50:48 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="jUVH0PEq"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz542Vb1zF1Hm for ; Thu, 24 May 2018 15:50:48 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="jUVH0PEq"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4k3xrKzF1Gj for ; Thu, 24 May 2018 15:50:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="jUVH0PEq"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4j74PLz9s2S; Thu, 24 May 2018 15:50:29 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141030; bh=eybqDWahAJ1KXmDheF5se8QLZBZZIOl30M+OwOc7cI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jUVH0PEqZjIZoLtSOL1jn2bLd1ffIHxamjwxehkou22S7ufyJ/AsNiW5gG3kg8BxV Ix9mpBvS1+H9gCuU3YgILSnW49w57+V9ZhZltkVaUY4XkgEBioBeOlLYFzPgtPTq+Q hLmWpgnpBlGJJPUrBF3vhOJ4OoXvhezoUDFu95tzjtCV/KftPVrsWNoBKZbD9PWfh5 Nf7LsT9QSnAhVT42o8bjZBGfBl70+ovWgnaplPitSVzajzHT5kv6BNUaYOEcdfDFph hNQIpR3wCBC7QYJ4b5NQ9XHTbCbcWr5gw1QYB4kn+/Go16gW6PXOXmxmRFMeLXYTBu vHhYA9tl4zdwg== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:09 +1000 Message-Id: <20180524055017.8801-4-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 03/11] main: Do not include libpdbg internal headers X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" There are few execptions: - src/thread.c, src/htm.c These require bitutils.h. The correct fix might be to include thread abstraction in libpdbg. - src/main.c This requires target.h. Signed-off-by: Amitay Isaacs --- src/cfam.c | 2 -- src/htm.c | 5 +++-- src/htm.h | 2 -- src/main.c | 2 +- src/main.h | 4 +++- src/mem.c | 4 ++-- src/reg.c | 3 +-- src/scom.c | 2 +- src/scom.h | 2 -- src/thread.c | 4 +--- src/thread.h | 2 -- 11 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/cfam.c b/src/cfam.c index 3ba8224..269123e 100644 --- a/src/cfam.c +++ b/src/cfam.c @@ -19,8 +19,6 @@ #include #include -#include - #include "main.h" static int getcfam(struct pdbg_target *target, uint32_t index, uint64_t *addr, uint64_t *unused) diff --git a/src/htm.c b/src/htm.c index a1a88d1..a45facf 100644 --- a/src/htm.c +++ b/src/htm.c @@ -29,11 +29,12 @@ #include #include #include +#include #include -#include -#include +#include +#include #include "main.h" diff --git a/src/htm.h b/src/htm.h index fef569e..f5ffa76 100644 --- a/src/htm.h +++ b/src/htm.h @@ -16,8 +16,6 @@ #include #include -#include - int run_htm_start(int optind, int argc, char *argv[]); int run_htm_stop(int optind, int argc, char *argv[]); int run_htm_status(int optind, int argc, char *argv[]); diff --git a/src/main.c b/src/main.c index eb5d64d..ee41a1d 100644 --- a/src/main.c +++ b/src/main.c @@ -31,9 +31,9 @@ #include #include +#include #include "main.h" -#include "bitutils.h" #include "cfam.h" #include "scom.h" #include "reg.h" diff --git a/src/main.h b/src/main.h index e060553..b1366d9 100644 --- a/src/main.h +++ b/src/main.h @@ -13,9 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include +#include -#include +#include enum backend { FSI, I2C, KERNEL, FAKE, HOST }; diff --git a/src/mem.c b/src/mem.c index 71e91d3..dfdcf01 100644 --- a/src/mem.c +++ b/src/mem.c @@ -19,9 +19,9 @@ #include #include #include +#include -#include -#include +#include #include "main.h" #include "progress.h" diff --git a/src/reg.c b/src/reg.c index d094fbe..002cfe9 100644 --- a/src/reg.c +++ b/src/reg.c @@ -19,8 +19,7 @@ #include #include -#include -#include +#include #include "main.h" diff --git a/src/scom.c b/src/scom.c index 4073d88..4c59e2a 100644 --- a/src/scom.c +++ b/src/scom.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include "main.h" diff --git a/src/scom.h b/src/scom.h index 890207f..d4325b5 100644 --- a/src/scom.h +++ b/src/scom.h @@ -15,6 +15,4 @@ */ #include -#include - int handle_scoms(int optind, int argc, char *argv[]); diff --git a/src/thread.c b/src/thread.c index f32a437..e4253f6 100644 --- a/src/thread.c +++ b/src/thread.c @@ -19,11 +19,9 @@ #include #include +#include #include -#include -#include - #include "main.h" #include "mem.h" diff --git a/src/thread.h b/src/thread.h index 5fc2a80..0c1caa2 100644 --- a/src/thread.h +++ b/src/thread.h @@ -15,8 +15,6 @@ */ #include -#include - int thread_start(int optind, int argc, char *argv[]); int thread_step(int optind, int argc, char *argv[]); int thread_stop(int optind, int argc, char *argv[]); From patchwork Thu May 24 05:50:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919597 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz583MCJz9s1w for ; Thu, 24 May 2018 15:50:52 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="vwD2c/VB"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz581d3KzF1Hj for ; Thu, 24 May 2018 15:50:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="vwD2c/VB"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4k6yfDzF1Dt for ; Thu, 24 May 2018 15:50:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="vwD2c/VB"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4k3YZNz9s16; Thu, 24 May 2018 15:50:30 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141030; bh=HY1BLiERJLNWxJDvEH8xShPCbbt1g0te+sAND0AEk7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vwD2c/VByM2ViPCeGRj3fMA+W6JgJ33lBB/m/66+kxh1bGZwgYWLcqi5EoDSuwuV1 2Fjtg6tRok1AMti8YrDQT5qEGZF1mxb5bIuwj+VVDf5Bj8Kbf4R+1nHH/MOBfZ3tPY QmvCnWCn+Ectg62Ea3j23wZcbZwP7g8X5Q6PK7JGP7fcUgMpJdbX5OXuyrF1Xt+bi1 XJsu8lkHPMlXhAskAjgog0RfEVxnLJ4w+Qask/X6cB/TQGOUwjBumSriT7A6ff/be7 eVto2Gmz2HpV4voDW4TP00s7IpIyKn560H1NSo/GpfgMiv8nWbxhIhY1rDyV32BoDp 55y9XwBg6vyGQ== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:10 +1000 Message-Id: <20180524055017.8801-5-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 04/11] dt: Add missing #address-cells, #size-cells and reg properties X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- p8-fsi.dts.m4 | 2 ++ p8-host.dts.m4 | 2 ++ p8-i2c.dts.m4 | 2 ++ p9-host.dts.m4 | 6 ++++++ p9-kernel.dts.m4 | 6 ++++++ p9-pib.dts.m4 | 4 ++-- 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 index 7b004ac..12751c5 100644 --- a/p8-fsi.dts.m4 +++ b/p8-fsi.dts.m4 @@ -31,6 +31,8 @@ }; hmfsi@100000 { + #address-cells = <0x2>; + #size-cells = <0x1>; compatible = "ibm,fsi-hmfsi"; reg = <0x0 0x100000 0x8000>; port = <0x1>; diff --git a/p8-host.dts.m4 b/p8-host.dts.m4 index 3197da7..ed88a55 100644 --- a/p8-host.dts.m4 +++ b/p8-host.dts.m4 @@ -9,6 +9,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; compatible = "ibm,host-pib"; + reg = <0x0>; chip-id = <0x0>; index = <0x0>; include(p8-pib.dts.m4)dnl @@ -18,6 +19,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; compatible = "ibm,host-pib"; + reg = <0x8>; chip-id = <0x8>; index = <0x1>; include(p8-pib.dts.m4)dnl diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 index 1e794bf..53f2ace 100644 --- a/p8-i2c.dts.m4 +++ b/p8-i2c.dts.m4 @@ -22,6 +22,8 @@ compatible = "ibm,power8-opb"; hmfsi@100000 { + #address-cells = <0x2>; + #size-cells = <0x1>; compatible = "ibm,power8-opb-hmfsi"; reg = <0x100000 0x80000>; port = <0x1>; diff --git a/p9-host.dts.m4 b/p9-host.dts.m4 index 5566acd..e1ec779 100644 --- a/p9-host.dts.m4 +++ b/p9-host.dts.m4 @@ -6,14 +6,20 @@ /* Host based debugfs access */ pib@0 { + #address-cells = <0x2>; + #size-cells = <0x1>; compatible = "ibm,host-pib"; + reg = <0x0>; chip-id = <0x0>; index = <0x0>; include(p9-pib.dts.m4)dnl }; pib@8 { + #address-cells = <0x2>; + #size-cells = <0x1>; compatible = "ibm,host-pib"; + reg = <0x8>; chip-id = <0x8>; index = <0x1>; include(p9-pib.dts.m4)dnl diff --git a/p9-kernel.dts.m4 b/p9-kernel.dts.m4 index e364214..195be59 100644 --- a/p9-kernel.dts.m4 +++ b/p9-kernel.dts.m4 @@ -14,6 +14,8 @@ status = "mustexist"; pib@1000 { + #address-cells = <0x2>; + #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; @@ -21,12 +23,16 @@ }; hmfsi@100000 { + #address-cells = <0x2>; + #size-cells = <0x1>; compatible = "ibm,fsi-hmfsi"; reg = <0x0 0x100000 0x8000>; port = <0x1>; index = <0x1>; pib@1000 { + #address-cells = <0x2>; + #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x1>; compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; diff --git a/p9-pib.dts.m4 b/p9-pib.dts.m4 index e0248d1..3e312e5 100644 --- a/p9-pib.dts.m4 +++ b/p9-pib.dts.m4 @@ -2,6 +2,8 @@ define(`CONCAT', `$1$2')dnl define(`HEX', `CONCAT(0x, $1)')dnl define(`CORE_BASE', `eval(0x20000000 + $1 * 0x1000000, 16)')dnl define(`CORE', `chiplet@CORE_BASE($1) { +#address-cells = <0x2>; +#size-cells = <0x1>; compatible = "ibm,power9-chiplet"; index = ; reg = <0x0 HEX(CORE_BASE($1)) 0xfffff>; @@ -33,8 +35,6 @@ index = ; reg = <0x0 HEX(CHIPLET_BASE($1)) 0xfffff>; }')dnl -#address-cells = <0x2>; -#size-cells = <0x1>; adu@90000 { compatible = "ibm,power9-adu"; From patchwork Thu May 24 05:50:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919598 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz5C1fFhz9s1w for ; Thu, 24 May 2018 15:50:55 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="OPt00kBQ"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz5B6m7nzF1Hp for ; Thu, 24 May 2018 15:50:54 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="OPt00kBQ"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4l3n0GzF1Cr for ; Thu, 24 May 2018 15:50:31 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="OPt00kBQ"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4k6gNCz9s1w; Thu, 24 May 2018 15:50:30 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141030; bh=QQBsCKt8+nHdihCxD4lxAV1a0EzGSnu3M8Kdc4wm1zU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OPt00kBQnFljvnuHKbWVmkOaAJEwWV/mNPzncjPBi3uujk+8Jdu04G7dZKMkZatTY jPFqxtsEneh/tJpXglE0O1wkGU3SnLf3iZ8uU+fRQbNF7rEdyLnl9pbWkLnRibEJ0D tJob/FBijW5oMm7k/Fr2gltun++849/6R6k0uAd5atFXte/mPaPFUfm5Tylg1eG4Uo pLdlsqaW6yOJ8Lp3RG9BxrQgT6FEgkhyQRsmzslupj1s82ftOk+CzjD95guEoigq9C 5/dbl09p5VsZ/3NJtW1VZYvSQMxvOQ0tuaI2x1ArmpCf+HqnwHIVlF5u+rL0IfMRzF fI707uL/YR1wQ== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:11 +1000 Message-Id: <20180524055017.8801-6-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 05/11] Makefile: Don't suppress warnings from DTC X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6253b03..8c753db 100644 --- a/Makefile.am +++ b/Makefile.am @@ -83,7 +83,7 @@ GEN_V_ = $(GEN_V_$(AM_DEFAULT_VERBOSITY)) GEN_V_0 = @echo " GEN " $@; %.dts: %.dts.m4 - $(M4_V)$(M4) -I$(dir $<) $< | $(DTC) -q -I dts -O dts > $@ + $(M4_V)$(M4) -I$(dir $<) $< | $(DTC) -I dts -O dts > $@ %.dtsi: %.dtsi.m4 $(M4_V)$(M4) -I$(dir $<) $< > $@ @@ -93,7 +93,7 @@ p9r-fsi.dts: p9r-fsi.dts.m4 p9-fsi.dtsi p9z-fsi.dts: p9z-fsi.dts.m4 p9-fsi.dtsi %.dtb: %.dts - $(DTC_V)$(DTC) -q -i$(dir $@) -I dts $< -O dtb > $@ + $(DTC_V)$(DTC) -i$(dir $@) -I dts $< -O dtb > $@ %.dt.h: %.dtb $(GEN_V)$(srcdir)/generate_dt_header.sh $< > $@ From patchwork Thu May 24 05:50:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919599 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz5H04M6z9s1w for ; Thu, 24 May 2018 15:50:59 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="iuD2w7Qj"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz5G5LWpzF1Hf for ; Thu, 24 May 2018 15:50:58 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="iuD2w7Qj"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4m0FfFzF1Dt for ; Thu, 24 May 2018 15:50:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="iuD2w7Qj"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4l3TXDz9s16; Thu, 24 May 2018 15:50:31 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141031; bh=hrjkvAGhtdjjv2YcpO0Oy/aBBoqrP1Q/6PM/7hF1/Nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iuD2w7QjrB6kU2LpfcPwfuWI0Z1YnIqVSzHrvR59BEvy1I8c82o/tXFJ4l1KF8Q4y b4RrDkvEoXNLqq7qOQrZ8vulY9anFYE8qeDhFIkH5jGUY4LbNz/Whu8i+8sa/03EOF +XihmNHIxDi3c9YXQhy4v+/YsanQHI8MNWuH922pNQqUNRk5ZFEEHAXdZmuchDaaen kyfPddOKf3YDXNvQaGxUljS78qQATH27p8/aLo7JPIJCxharBcOU0tEVwMt9RKspGu gMV7qRHi/u5GaNVsgi88BX7lwAvA0K42h1L9qaF+3rY6cOvpU2r6gxa+Wyi672FNDE xgKkXNkaj+CNg== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:12 +1000 Message-Id: <20180524055017.8801-7-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 06/11] main: Fix usage for expert option X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index ee41a1d..4e0ed16 100644 --- a/src/main.c +++ b/src/main.c @@ -152,7 +152,7 @@ static void print_usage(char *pname) printf("\t\tand defaults to 0x50 for I2C\n"); printf("\t-D, --debug=\n"); printf("\t\t0:error (default) 1:warning 2:notice 3:info 4:debug\n"); - printf("\t--expert\n"); + printf("\t-E, --expert\n"); printf("\t-V, --version\n"); printf("\t-h, --help\n"); printf("\n"); From patchwork Thu May 24 05:50:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919600 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz5L55Kvz9s1w for ; Thu, 24 May 2018 15:51:02 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="gWOh7UJq"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz5L38WbzF1Hj for ; Thu, 24 May 2018 15:51:02 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="gWOh7UJq"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4m3Lp2zF1Cr for ; Thu, 24 May 2018 15:50:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="gWOh7UJq"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4l73yDz9s1w; Thu, 24 May 2018 15:50:31 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141032; bh=FbsT0mdWbsIVCFwAygbCYvawE0D8IDjpTQ9Cn86xeXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gWOh7UJqDrZ6lx7SXk9FKtlaDGlxGp68fQDagXZk0l9rNqKzmxLKOU4ucPvvC8xzE 7j6eWdXjvNmyNwN7qxYGXBBujx0xLirnq+/jAuwxZ0iFbbsB6nFMao1zP3i+3EbmuY AyfmRJZVpf5MnBvFu3ZJ9hWnxHZ0Bn2+eHGPBj3gUh1ftkdAeFRdKtsQymeNI3uwxO O1/km0fCvIsqqUyqn+Wx8R7EGZ6mcOfTmz++SWb5JR5vrvo1KsM5OJiVtgZ95F7iEW KnLxfE1pTCKwKPJ+GhLxaE5D/veYLfQ4xVXCEYXmjmWKfNO1g8TW8auvbfRF3aNut+ D8kgmJZlGGZ/w== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:13 +1000 Message-Id: <20180524055017.8801-8-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 07/11] libpdbg/device: Add new targets in the order of traversal X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" This automatically sorts targets in increasing index order. Signed-off-by: Amitay Isaacs --- libpdbg/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/device.c b/libpdbg/device.c index 7ee4884..e5b78f4 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -96,7 +96,7 @@ static struct pdbg_target *new_node(const char *name, const void *fdt, int node_ * above DECLARE_HW_UNIT). */ memcpy(node, hw_info->hw_unit, size); target_class = get_target_class(node->class); - list_add(&target_class->targets, &node->class_link); + list_add_tail(&target_class->targets, &node->class_link); } node->dn_name = take_name(name); From patchwork Thu May 24 05:50:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919601 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz5P3vGYz9s1w for ; Thu, 24 May 2018 15:51:05 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="Qe9ry+Hu"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz5P2HBdzF1Cr for ; Thu, 24 May 2018 15:51:05 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="Qe9ry+Hu"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4m74cWzF1Dt for ; Thu, 24 May 2018 15:50:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="Qe9ry+Hu"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4m304Xz9s16; Thu, 24 May 2018 15:50:32 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141032; bh=GAGo1hQIp2ZqlE1AfpazIACAR0fIcaSw1MUUrhCbe9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qe9ry+HuwJ4u+tM/w1VY6GrHxNjy8NU+M1EXHjDxvN4YWhBfoBw2YNSFVTfJgyn4Q DW4MYXv2JLeAaMkuHv+LWosbnzgbj3+/GFjW4/eE2QHKl8S5esYamWYBbEn742NtQK OSlnHaQvy4UjCPooWGFAkt+QxE5Ivh6XYyHh6Y+FhRmt+G6XymVn7ZUDkoG46E+Kap NGCg2GFMRqwBVGTA21fcoynuY+iE9lFc8/BZwgxHfI8GeE9KrCwEIp5LjVFyICGp1c YHiqeUnLv+UYsmXay1kKlienhwzZgxmL+f2dCc/Wvmr8b02P4Im1awl6x3fp922jpr WoeDqotVUSKPw== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:14 +1000 Message-Id: <20180524055017.8801-9-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 08/11] main: Return false on failure X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" If a boolean function returns true on error, it's just recipe for all sorts of programming errors. Signed-off-by: Amitay Isaacs --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 4e0ed16..7540b9b 100644 --- a/src/main.c +++ b/src/main.c @@ -295,7 +295,7 @@ static bool parse_options(int argc, char *argv[]) if (opt_error) print_usage(argv[0]); - return opt_error; + return !opt_error; } void target_select(struct pdbg_target *target) @@ -594,7 +594,7 @@ int main(int argc, char *argv[]) backend = default_backend(); device_node = default_target(backend); - if (parse_options(argc, argv)) + if (!parse_options(argc, argv)) return 1; if (!backend_is_possible(backend)) { From patchwork Thu May 24 05:50:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919602 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz5T0MmMz9s1w for ; Thu, 24 May 2018 15:51:09 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="cN0j84mn"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz5S5qfzzF1Dt for ; Thu, 24 May 2018 15:51:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="cN0j84mn"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4n2ljxzF1Cr for ; Thu, 24 May 2018 15:50:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="cN0j84mn"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4m6p32z9s1w; Thu, 24 May 2018 15:50:32 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141033; bh=OWDxN+7c/F8gZ70BHLd0EVNNZ7EUjjF55XRAg3AZYvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cN0j84mnrBkFh5Oc3fjw+s0T1CKQurWrdROfx7fOj7W6b1EHdiNg+TFffZ7/RlV43 jFRUiWIaeI4vX5ttAKDXnkdREcVHO+NBoXI5TdQbCwWgwJtWPvGR00R33Tf7UjJ9fY ht2PbBECGhDH9Vb2+zZKqTZdfpO2nhfdtkyYAnNAHvx2s8nIByUnVFhFfufJrFlfL2 qw5yydEIUoMozBYTqwnjFljeAyoRn/qblfh2lZGmv99qhZ2/kSF+crmB32/t6sZ3rY 369jupWCpPSz7olOV1Uq5b7Fhdm3oi04fSPSHkcxQf6y7V5sf+FpEwHs+ITDOue7HD M1seB4ylNYbRA== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:15 +1000 Message-Id: <20180524055017.8801-10-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 09/11] main: Overhaul target selection X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Support explicit multiple target selection using ranges and lists. For options -p/-c/-t, support the following valid arguments: 3 0-7 1,2,3 0-5,7,9-11,17,19 For loss of sanity, make sense of the following valid arguments: 3,3,3,3,3,3 1-6,2-5 1,2,3,0-7 Conjunction of -p/-c/-t with -a also works and it's insensitive to order of options specified. -a -c 1,2 processors 0-max; chips 1-2; threads 0-max -p 0 -c 0 -a processors 0; chips 0; threads 0-max -a -c 1 -t 1 processors 0-max; chips 1; threads 1 Signed-off-by: Amitay Isaacs --- src/main.c | 181 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 141 insertions(+), 40 deletions(-) diff --git a/src/main.c b/src/main.c index 7540b9b..1a01bf1 100644 --- a/src/main.c +++ b/src/main.c @@ -131,9 +131,9 @@ static void print_usage(char *pname) printf("Usage: %s [options] command ...\n\n", pname); printf(" Options:\n"); - printf("\t-p, --processor=processor-id\n"); - printf("\t-c, --chip=core-id\n"); - printf("\t-t, --thread=thread\n"); + printf("\t-p, --processor=<0-%d>||\n", MAX_PROCESSORS); + printf("\t-c, --chip=<0-%d>||\n", MAX_CHIPS); + printf("\t-t, --thread=<0-%d>||\n", MAX_THREADS); printf("\t-a, --all\n"); printf("\t\tRun command on all possible processors/chips/threads (default)\n"); printf("\t-b, --backend=backend\n"); @@ -166,11 +166,90 @@ static void print_usage(char *pname) } } +static int int_cmp(const void *a, const void *b) +{ + int a_int = *(const int *)a; + int b_int = *(const int *)b; + + if (a_int < b_int) + return -1; + else if (a_int > b_int) + return 1; + else + return 0; +} + +/* Parse argument of the form 0-5,7,9-11,15,17 */ +static bool parse_list(const char *arg, int max, int *list, int *count) +{ + char str[strlen(arg)+1]; + char *tok, *tmp, *saveptr = NULL; + int n = 0, i, j; + + strcpy(str, arg); + + tmp = str; + while ((tok = strtok_r(tmp, ",", &saveptr)) != NULL) { + char *a, *b, *saveptr2 = NULL; + int from, to; + + a = strtok_r(tok, "-", &saveptr2); + if (a == NULL) { + return false; + } else { + from = atoi(a); + if (from >= max) { + return false; + } + } + + b = strtok_r(NULL, "-", &saveptr2); + if (b == NULL) { + to = from; + } else { + to = atoi(b); + if (to >= max) { + return false; + } + } + + if (from > to) { + return false; + } + + for (i=from; i<=to; i++) { + list[n] = i; + n++; + } + + tmp = NULL; + }; + + if (n > 0) { + qsort(list, n, sizeof(int), int_cmp); + j = 0; + for (i=1; i= MAX_PROCESSORS) - opt_error = true; - else - processorsel[current_processor] = &chipsel[current_processor][0]; - } + if (!parse_list(optarg, MAX_PROCESSORS, p_list, &p_count)) + fprintf(stderr, "Failed to parse '-p %s'\n", optarg); + else + opt_error = false; break; case 'c': - errno = 0; - current_chip = strtoul(optarg, &endptr, 0); - opt_error = (errno || *endptr != '\0'); - if (!opt_error) { - if (current_chip >= MAX_CHIPS) - opt_error = true; - else - chipsel[current_processor][current_chip] = &threadsel[current_processor][current_chip][0]; - } + if (!parse_list(optarg, MAX_CHIPS, c_list, &c_count)) + fprintf(stderr, "Failed to parse '-c %s'\n", optarg); + else + opt_error = false; break; case 't': - errno = 0; - current_thread = strtoul(optarg, &endptr, 0); - opt_error = (errno || *endptr != '\0'); - if (!opt_error) { - if (current_thread >= MAX_THREADS) - opt_error = true; - else - threadsel[current_processor][current_chip][current_thread] = 1; - } + if (!parse_list(optarg, MAX_THREADS, t_list, &t_count)) + fprintf(stderr, "Failed to parse '-t %s'\n", optarg); + else + opt_error = false; break; case 'b': @@ -292,10 +366,37 @@ static bool parse_options(int argc, char *argv[]) } } while (c != EOF && !opt_error); - if (opt_error) + if (opt_error) { print_usage(argv[0]); + return false; + } + + if ((c_count > 0 || t_count > 0) && p_count == 0) { + fprintf(stderr, "No processor(s) selected\n"); + fprintf(stderr, "Use -p or -a to select processor(s)\n"); + return false; + } + + if (t_count > 0 && c_count == 0) { + fprintf(stderr, "No chip(s) selected\n"); + fprintf(stderr, "Use -c or -a to select chip(s)\n"); + return false; + } + + for (i=0; i X-Patchwork-Id: 919603 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz5W5hBWz9s1w for ; Thu, 24 May 2018 15:51:11 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="rCNk8KAp"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz5W3jndzF1Hp for ; Thu, 24 May 2018 15:51:11 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="rCNk8KAp"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4n5s49zF1Dt for ; Thu, 24 May 2018 15:50:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="rCNk8KAp"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4n2jPWz9s2L; Thu, 24 May 2018 15:50:33 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141033; bh=uCDv+AgfLQCZo9Q1WumSKyWEJE00vuvXrmO1oXawp/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rCNk8KAp7w2B3juJKYqlLHXktC9IiVLYal7CleCwvp6yLXhKyEVfYv4AdMeqqeZAQ pR4wu1ltpnOGPzCYpWWhGyKMCmCdObaOiNcFee/A02ajX6JXn5brk0fKqIsf8fNS0Y NDK1VLtfl8tn0xxhcqo3/Pheqvuq8Oyy5YQWqvEO2exxhLuN8TobI06hYKuYPxP8o/ QuRL+huXOrtQC9qzLIqoOteCVoXc/fvKVqJA4/whlTUqPCgcGzp3WGT/vIqTNRCLPy MSG2lY5FLaKQ9oW+Yx/6ViOHINigVPAVp7Dv338FGdG5+PelpCp/jcjhrbo/EFOpJ2 zu3NEfkZmoqYA== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:16 +1000 Message-Id: <20180524055017.8801-11-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 10/11] main: Print specific errors for invalid arguments X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" This avoids the large usage message obscuring the actual errors from parsing options. Print usage only if an option is invalid. Signed-off-by: Amitay Isaacs --- src/main.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/main.c b/src/main.c index 1a01bf1..0bc6c88 100644 --- a/src/main.c +++ b/src/main.c @@ -243,7 +243,7 @@ static bool parse_list(const char *arg, int max, int *list, int *count) static bool parse_options(int argc, char *argv[]) { int c; - bool opt_error = true; + bool opt_error = false; int p_list[MAX_PROCESSORS]; int c_list[MAX_CHIPS]; int t_list[MAX_THREADS]; @@ -273,8 +273,6 @@ static bool parse_options(int argc, char *argv[]) switch(c) { case 'a': - opt_error = false; - if (p_count == 0) { p_count = MAX_PROCESSORS; for (i=0; i X-Patchwork-Id: 919604 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz5Z5DnCz9s1w for ; Thu, 24 May 2018 15:51:14 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="LV7F0J5D"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz5Z3R5QzF1Hj for ; Thu, 24 May 2018 15:51:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="LV7F0J5D"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4p25ljzF1Cr for ; Thu, 24 May 2018 15:50:34 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="LV7F0J5D"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4n5YX7z9s16; Thu, 24 May 2018 15:50:33 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141033; bh=ISsNsp39Q1jIfM5XGRuLA8pysybDbNN3DDMjcEKo1EU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LV7F0J5Dyet0BpknIOJwTUtivVMcOzKvE6lPBZf3/SPVYp/InbK/btAiUqmZi4ano 9KBsfccT4UHosofAtl4WD31D06SVTAQWlhJRUxolrWllR2ZPhjW6WCBgj80/GEqe4b 2Xg66OurlSPIR+jrUoUsF30J0JvXaJ0U3Sdv9xNzuarrrN4CT/pMdCIpm2WjmPbCTY CUTI4dGfNExD0Kh7aH0br5c8XN15w9yO0V/bzUMkt7XvYNfX4OVkHFThgLOy1XmCG9 ivTeEdVJIEEibfcsSl8J8EU5EgEu0e5E4NyrcFLFjdKIzLA+oiYjYC+g9P8ZF1a5c+ T+XyBN7mq+JDA== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:17 +1000 Message-Id: <20180524055017.8801-12-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 11/11] main: Print specific errors for invalid commands X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" This avoids large usage message obscuring the actual error message. Signed-off-by: Amitay Isaacs --- src/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.c b/src/main.c index 0bc6c88..eccabd5 100644 --- a/src/main.c +++ b/src/main.c @@ -738,7 +738,6 @@ int main(int argc, char *argv[]) } PR_ERROR("Unsupported command: %s\n", argv[optind]); - print_usage(argv[0]); return 1; found_action: