Skip to contentSkip to conversation

tools/intel_gpu_top: restore original terminal attributes upon quit or SIGINT.

PATCH New K. Eugene Carlson 1 participant 1 message Feb 17, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 tools/intel_gpu_top: restore original terminal attributes upon quit or SIGINT.

---
 tools/intel_gpu_top.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
tools/intel_gpu_top.c +1 -4
index 1b2a82b9..36a2787d 100644
@@ -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");
 }
 
Signature · 1 line
2.35.1