From 13efea4df5d1659e38de790a20944b254973fea8 Mon Sep 17 00:00:00 2001 From: Liao Penghui Date: Mon, 13 Mar 2017 15:37:35 +0800 Subject: [PATCH] Suppress the ouput when using quiet option if we use -q/--quiet option with a normal file as the timing file. The command output will still show. The patch suppressed all output when quiet option is enabled --- helpers/auditshell_script.patch | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/helpers/auditshell_script.patch b/helpers/auditshell_script.patch index ad6e08c..e993ad2 100644 --- a/helpers/auditshell_script.patch +++ b/helpers/auditshell_script.patch @@ -95,10 +95,12 @@ index 242b815..778fbbe 100644 getmaster(); - if (!qflg) + -+ if ((!qflg) && (dflg == 1)){ -+ printf(_("Script started, file descriptor number is %s\n"), fname); -+ }else{ ++ if (!qflg) { ++ if (dflg == 1){ ++ printf(_("Script started, file descriptor number is %s\n"), fname); ++ }else{ printf(_("Script started, file is %s\n"), fname); ++ } + } + fixtty(); @@ -110,10 +112,12 @@ index 242b815..778fbbe 100644 tcsetattr(STDIN_FILENO, TCSADRAIN, &tt); - if (!qflg) + -+ if ((!qflg) && (dflg == 1)){ -+ printf(_("Script done, file descriptor number is %s\n"), fname); -+ }else{ ++ if (!qflg) { ++ if (dflg == 1){ ++ printf(_("Script done, file descriptor number is %s\n"), fname); ++ }else{ printf(_("Script done, file is %s\n"), fname); ++ } + } + +