[igt-dev] [PATCH i-g-t 2/2] tools/intel_gpu_top: restore original terminal attributes upon quit or SIGINT.

K. Eugene Carlson kvngncrlsn at gmail.com
Thu Feb 17 11:43:42 UTC 2022


Signed-off-by: K. Eugene Carlson <kvngncrlsn at gmail.com>
---
 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



More information about the igt-dev mailing list