Return-path: Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2CD4110E89B for ; Thu, 17 Feb 2022 11:45:37 +0000 (UTC) Received: by mail-pl1-x62a.google.com with SMTP id l9so4463143plg.0 for ; Thu, 17 Feb 2022 03:45:37 -0800 (PST) From: "K. Eugene Carlson" To: igt-dev@lists.freedesktop.org Date: Thu, 17 Feb 2022 20:43:42 +0900 Message-Id: <20220217114341.29345-2-kvngncrlsn@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t 2/2] tools/intel_gpu_top: restore original terminal attributes upon quit or SIGINT. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvngncrlsn@gmail.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Signed-off-by: K. Eugene Carlson --- tools/intel_gpu_top.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c index 1b2a82b9..36a2787d 100644 --- a/tools/intel_gpu_top.c +++ b/tools/intel_gpu_top.c @@ -1503,10 +1503,7 @@ print_engines(struct engines *engines, double t, int lines, int w, int h) static void restore_term(void) { - int ret; - - ret = tcsetattr(STDIN_FILENO, TCSANOW, &termios_orig); - assert(ret == 0); + tcsetattr(STDIN_FILENO, TCSANOW, &termios_orig); printf("\n"); } -- 2.35.1