[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240617173426.1.I0535f656e94cc475de6b04652aef4f9e9fb45f49@changeid>
Date: Mon, 17 Jun 2024 17:34:35 -0700
From: Douglas Anderson <dianders@...omium.org>
To: Daniel Thompson <daniel.thompson@...aro.org>
Cc: kgdb-bugreport@...ts.sourceforge.net,
Douglas Anderson <dianders@...omium.org>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Jason Wessel <jason.wessel@...driver.com>,
Thorsten Blum <thorsten.blum@...lux.com>,
Yuran Pereira <yuran.pereira@...mail.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 01/13] kdb: Get rid of "minlen" for the "md" command
The "minlen" field should allow us to abbreviate the "md" command as
just "m". However, the kdb_md() function does a lot of checking of
argv[0] and the logic there simply doesn't handle if argv[0] is just
"m". While this could be fixed, "m" isn't really unique (it could be
the prefix for "mm" also) and it's only saving one letter. Remove the
setting of "minlen" to 1 for "md".
Signed-off-by: Douglas Anderson <dianders@...omium.org>
---
While digging into this, I found that "minlen" doesn't seem to mean
what's documented in the structure (AKA "Minimum legal # cmd chars
required"). If it worked as documented then you could abbreviate
"summary" with "summ", "summa", and "summar". In fact due to the
parameters passed to strncmp() only "summ" works as an
abbreviation. Fixing that could happen in a future patch if someone
were so inclined, but they'd have to decide whether to change the
behavior of kdb or whether to change the comment and keep the
behavior.
kernel/debug/kdb/kdb_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index 664bae55f2c9..cbeb203785b4 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -2679,7 +2679,6 @@ static kdbtab_t maintab[] = {
.func = kdb_md,
.usage = "<vaddr>",
.help = "Display Memory Contents, also mdWcN, e.g. md8c1",
- .minlen = 1,
.flags = KDB_ENABLE_MEM_READ | KDB_REPEAT_NO_ARGS,
},
{ .name = "mdr",
--
2.45.2.627.g7a2c4fd464-goog
Powered by blists - more mailing lists