From patchwork Thu May 31 05:29:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rashmica Gupta X-Patchwork-Id: 923196 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 40xGHz69MQz9s01 for ; Thu, 31 May 2018 15:30:07 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BLH8A9mj"; 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 40xGHz3K5pzDr30 for ; Thu, 31 May 2018 15:30:07 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BLH8A9mj"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c00::22b; helo=mail-pf0-x22b.google.com; envelope-from=rashmica.g@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BLH8A9mj"; dkim-atps=neutral Received: from mail-pf0-x22b.google.com (mail-pf0-x22b.google.com [IPv6:2607:f8b0:400e:c00::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40xGHs2LW9zDrZD for ; Thu, 31 May 2018 15:30:01 +1000 (AEST) Received: by mail-pf0-x22b.google.com with SMTP id w129-v6so10188551pfd.3 for ; Wed, 30 May 2018 22:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cFBa7aO+lPn2IbNYuoXTXyZkGYpLBb+1FTfxFNIjaTc=; b=BLH8A9mjmZUGKUSb3ou7mfAH20h2dUgjpcfWRgrvRElZ4c690QF4ZAmJz4RgNjQEV7 EibBbNiK94JHj1CB/IzZP40+YGaurMLAl7CxFLxe8v+30HZuXi8kfB02Hmbov/980ebt iSQCdVBGunKtZ9OlNYZRGIS2jcWE+6l/h7ACE2ikIZjfzKQqyuuSqpO7nyGTVZD5NJYu XHLiQbOfF3vmnUYlCA0sa9FYWpXD88bGiEXoNOm3n5mDaYrVIG5AovuEz1eUIa97y4Te quul+T3hEUFaGExzqkCEQajj6PLavNntXhsEI8CeyuG2dHSd7iklVLFYAtHt/rHYPiIG c87A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cFBa7aO+lPn2IbNYuoXTXyZkGYpLBb+1FTfxFNIjaTc=; b=bxAwaqXvvN/gVWQUgFI2heBJbQZAnunDK2XXrLhM8ZwqT/NuanboMIRg2r+pfKQ9qV qBjzpn4U7sXF7Hif1mJd7nA/ib/bl/trUR2X3wpz81FcwfnA4vpMhTRAV5XeKAOFd8rc UKB4oJCS5Pzbgl22MV3LVmChQCHreB2YlGU6CRGvpUeeXYLOz8KPcYtsNKQ0M+ttx79K ymMcSvKXN06rSCSFV/1IYOzzaEEClxIXC/zP2npexW/scG6I1FVtZfC2zvTqCghsiLJc Z3IpHPPxO+Srh9SYIHQK+FGK+FIuW7CRIrNnEHGDoZqsgTgnTZWJo2rLx5i8zPRmo3NX +JWQ== X-Gm-Message-State: ALKqPwd2kP+gbjGSL3saD4Ai14VNmHnA6yUccKyPAzlDWsi6OSQnhYhx unWSDjKW6lXeq9KIzAJL0ZDqHg== X-Google-Smtp-Source: ADUXVKI1IDh4lEf/0Dyq6nxdFIU9+rNv8YbOC2ubCeIVXBBp0Yw6jHWJU5HiHUyVwkWDSUooNFOgPg== X-Received: by 2002:a63:7b51:: with SMTP id k17-v6mr4377913pgn.55.1527744599089; Wed, 30 May 2018 22:29:59 -0700 (PDT) Received: from rashmica.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id h10-v6sm4500515pgc.28.2018.05.30.22.29.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 22:29:58 -0700 (PDT) From: Rashmica Gupta To: pdbg@lists.ozlabs.org Date: Thu, 31 May 2018 15:29:15 +1000 Message-Id: <20180531052915.31171-10-rashmica.g@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180531052915.31171-1-rashmica.g@gmail.com> References: <20180531052915.31171-1-rashmica.g@gmail.com> Subject: [Pdbg] [PATCH 10/10] pdbg: Make return codes consistent for get/put registers 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: , MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" --- src/main.c | 2 +- src/reg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index e714377..3df9a4e 100644 --- a/src/main.c +++ b/src/main.c @@ -739,7 +739,7 @@ int main(int argc, char *argv[]) return 1; found_action: - if (rc <= 0) { + if (rc != 0) { printf("No valid targets found or specified. Try adding -p/-c/-t options to specify a target.\n"); printf("Alternatively run '%s -a probe' to get a list of all valid targets\n", basename(argv[0])); diff --git a/src/reg.c b/src/reg.c index 0a87006..e58275f 100644 --- a/src/reg.c +++ b/src/reg.c @@ -103,7 +103,7 @@ static int getprocreg(struct pdbg_target *target, uint32_t index, uint64_t *reg, print_proc_reg(target, *reg, value, rc); - return !rc; + return rc; } int handle_gpr(int optind, int argc, char *argv[])