lkml.org 
[lkml]   [2021]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] dyndbg: no vpr-info on empty queries
Date
when `echo $cmd > control` contains multiple queries, extra query
separators (;\n) can parse as empty statements. This is normal, and a
vpr-info on an empty command is just noise.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
lib/dynamic_debug.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index bc1ac55ac328..7744c787e256 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -540,8 +540,10 @@ static int ddebug_exec_queries(char *query, const char *modname)
}
i++;
}
- vpr_info("processed %d queries, with %d matches, %d errs\n",
- i, nfound, errs);
+
+ if (i)
+ vpr_info("processed %d queries, with %d matches, %d errs\n",
+ i, nfound, errs);

if (exitcode)
return exitcode;
--
2.31.1
\
 
 \ /
  Last update: 2021-10-14 00:09    [W:0.049 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site