[re: PATCH v2 00/15 - 11/11] dyndbg: id the bad word in parse-flags err msg

Jim Cromie posted 15 patches 2 years ago
Only 11 patches received!
There is a newer version of this series
[re: PATCH v2 00/15 - 11/11] dyndbg: id the bad word in parse-flags err msg
Posted by Jim Cromie 2 years ago
if ddebug_parse_flags() rejects user input, identify that input value
in the error message.
---
 lib/dynamic_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index b63429462d69..f4b1d3ef837d 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -937,7 +937,7 @@ static int ddebug_exec_query(char *query_string, const char *modname)
 
 	/* check flags 1st (last arg) so query is pairs of spec,val */
 	if (ddebug_parse_flags(words[nwords-1], &modifiers)) {
-		pr_err("flags parse failed\n");
+		pr_err("flags parse failed on word-%d: %s\n", nwords-1, words[nwords-1]);
 		return -EINVAL;
 	}
 
-- 
2.43.0