From 7a06199bbdebf40230c3c1a0ba3ffdeb4fa6b7cf Mon Sep 17 00:00:00 2001 From: Anoushk Kharangate Date: Tue, 7 Jan 2025 11:54:22 +0000 Subject: [PATCH] remove helper function --- src/app/fdctl/monitor/helper.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/app/fdctl/monitor/helper.c b/src/app/fdctl/monitor/helper.c index 5111321ca6..2fb6fc60ef 100644 --- a/src/app/fdctl/monitor/helper.c +++ b/src/app/fdctl/monitor/helper.c @@ -1,6 +1,5 @@ #include "helper.h" -#include -#include + #include #define PRINT( ... ) do { \ @@ -175,29 +174,3 @@ printf_pct( char ** buf, if( pct<=999.999 ) { PRINT( " %7.3f", pct ); return; } /**/ PRINT( ">999.999" ); } - - -int -fd_getch() -{ - struct termios oldt, newt; - int ch; - int oldf; - /* Disables character echo and canonical mode since we want the input to be processes immediately. - * Terminal also set to non blocking in case the user doesn't send any input. - * */ - tcgetattr(STDIN_FILENO, &oldt); - newt = oldt; - newt.c_lflag &= (tcflag_t)~(ICANON | ECHO); - tcsetattr(STDIN_FILENO, TCSANOW, &newt); - oldf = fcntl(STDIN_FILENO, F_GETFL, 0); - fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK); - - ch = getchar(); - - /*Restore the terminal back to it's original configuration*/ - tcsetattr(STDIN_FILENO, TCSANOW, &oldt); - fcntl(STDIN_FILENO, F_SETFL, oldf); - - return ch; -}