From patchwork Tue Jul 9 15:56:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 11037183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5A9A14C0 for ; Tue, 9 Jul 2019 15:57:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6A3B2870C for ; Tue, 9 Jul 2019 15:57:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB26528714; Tue, 9 Jul 2019 15:57:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5ACFF2870C for ; Tue, 9 Jul 2019 15:57:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726251AbfGIP52 (ORCPT ); Tue, 9 Jul 2019 11:57:28 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54287 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfGIP52 (ORCPT ); Tue, 9 Jul 2019 11:57:28 -0400 Received: by mail-wm1-f65.google.com with SMTP id p74so3628208wme.4 for ; Tue, 09 Jul 2019 08:57:26 -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 :mime-version:content-transfer-encoding; bh=AHunqJETTE6J5yl+agrAXzmMG4fvntDz6Z8j37hRPyg=; b=rNtIw7+QdfafExM+vAYWdUlPlM56B5ixZU9c2oGZEXb+w5bHlleRGmkVMt50+U4aGn Ni6wlZK1UaZGVTGQ5cWEkCUa6K/PSSbcK+enIiV04Imn7lOVr1xGF8iy1D71OI30TnE1 wOuVHA2ijU1RD93AkzCnOTrA6MU2SB+gcRsP/+CkaydFo9F4Gw3W9QBc7Y1/nPHiYh8I PqQgirsWw27tQuo8lilJWLB8OtNoxAWBd5MtXnWt3IP8H3MyvHKVLQYd7N/H42CRO0uV ShmzTkgxzuA8oGsSFSYWF8EDvS7ck14/Jqifh1KUTY0Q7lREG9K0ukXXy/NbaogWfvF2 Xiig== 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:mime-version:content-transfer-encoding; bh=AHunqJETTE6J5yl+agrAXzmMG4fvntDz6Z8j37hRPyg=; b=GvGtZRutxm+OYcvEAEETKWWUD/wpsKVEL5XksA37rhvLGOCjNFO1ZvAU1XPDo95LPI wYCRZlMVc3rPuHKsCvesfulsM441B4hU03o1wU0xbecOVUqONDtPM93WtTeKe1xIwqgC hpw6SP8f+bSjCeZsacBl9S29RtoSlwTrD7rxvDomJzi+ozS0VTdM9CqVITopobLgXvxY AmvDDgihcsFQEaUWoK/8UR8EWDXgtAYbNdSUguEIpXydmqdvY/Xd5kiGsoKMDlrt61h8 aj/tdyi+8gJTvkm4uKs51e1OMdyij5ZG5JZuCTE6NiSZpOsLoXbA4aF/xmpnM+9wQxNO 8Q6A== X-Gm-Message-State: APjAAAUuNtRY2VuUSd949tIvigud8q/joU0nzj/5WHY0SkmXd+N3US7O QUXKGeYQlvT1C/6Luwnt5qa4tH33rSs= X-Google-Smtp-Source: APXvYqwu5wepZkWkFmaC1Qh+XRcPkI/YfBV+m87IknWKlzpXKGepcV5zVdExsicqHo1nZ607O3hOcw== X-Received: by 2002:a05:600c:284:: with SMTP id 4mr624121wmk.12.1562687846123; Tue, 09 Jul 2019 08:57:26 -0700 (PDT) Received: from mamba.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id v5sm24313746wre.50.2019.07.09.08.57.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 09 Jul 2019 08:57:25 -0700 (PDT) From: "Yordan Karadzhov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, "Yordan Karadzhov (VMware)" Subject: [PATCH 5/8] kernel-shark: Remove a duplicate error message Date: Tue, 9 Jul 2019 18:56:47 +0300 Message-Id: <20190709155650.2345-6-y.karadz@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190709155650.2345-1-y.karadz@gmail.com> References: <20190709155650.2345-1-y.karadz@gmail.com> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the capture process finishes with an error the _captureError() slot will print an error message. We do not need to print identical message in _captureFinished(). Signed-off-by: Yordan Karadzhov (VMware) --- kernel-shark/src/KsMainWindow.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp index 1e03632..752a17a 100644 --- a/kernel-shark/src/KsMainWindow.cpp +++ b/kernel-shark/src/KsMainWindow.cpp @@ -1143,35 +1143,9 @@ void KsMainWindow::_captureStarted() _captureLocalServer.listen("KSCapture"); } -/** - * If the authorization could not be obtained because the user dismissed - * the authentication dialog (clicked Cancel), pkexec exits with a return - * value of 126. - */ -#define PKEXEC_DISMISS_RET 126 - void KsMainWindow::_captureFinished(int ret, QProcess::ExitStatus st) { - QProcess *capture = (QProcess *)sender(); - _captureLocalServer.close(); - - if (ret == PKEXEC_DISMISS_RET) { - /* - * Authorization could not be obtained because the user - * dismissed the authentication dialog. - */ - return; - } - - if (ret != 0 || st != QProcess::NormalExit) { - QString message = "Capture process failed:
"; - - message += capture->errorString(); - message += "
Try doing:
sudo make install"; - - _error(message, "captureFinishedErr", false, false); - } } void KsMainWindow::_captureError(QProcess::ProcessError error)