Skip to content

Commit e2e8210

Browse files
diandersDaniel Thompson
authored andcommitted
kdb: Use the passed prompt in kdb_position_cursor()
The function kdb_position_cursor() takes in a "prompt" parameter but never uses it. This doesn't _really_ matter since all current callers of the function pass the same value and it's a global variable, but it's a bit ugly. Let's clean it up. Found by code inspection. This patch is expected to functionally be a no-op. Fixes: 09b3598 ("kdb: Use format-strings rather than '\0' injection in kdb_read()") Signed-off-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/20240528071144.1.I0feb49839c6b6f4f2c4bf34764f5e95de3f55a66@changeid Signed-off-by: Daniel Thompson <[email protected]>
1 parent 70867ef commit e2e8210

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/debug/kdb/kdb_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ char kdb_getchar(void)
206206
*/
207207
static void kdb_position_cursor(char *prompt, char *buffer, char *cp)
208208
{
209-
kdb_printf("\r%s", kdb_prompt_str);
209+
kdb_printf("\r%s", prompt);
210210
if (cp > buffer)
211211
kdb_printf("%.*s", (int)(cp - buffer), buffer);
212212
}

0 commit comments

Comments
 (0)