lkml.org 
[lkml]   [2024]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 24/39] dyndbg: report err in ddebug_parse_flags when read_args fails
Date
From: Jim Cromie <jim.cromie@gmail.com>

read_args() fails on '_' (the last opt-char), and returns null.
report this against the opt-char.

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

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 089765afc972..3d0c6b5faa31 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -903,8 +903,11 @@ static int ddebug_parse_flags(const char *str, struct flag_settings *modifiers)
read_args = opt_array[i].read_args;
if (read_args) {
str = read_args(str, modifiers);
- if (!str)
+ if (!str) {
+ pr_err("err on '%c'\n",
+ opt_array[i].opt_char);
return -EINVAL;
+ }
}
break;
}
--
2.43.0.687.g38aa6559b0-goog

\
 
 \ /
  Last update: 2024-05-27 14:57    [W:0.144 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site