Commit 15a42a9b authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Jason Wessel

kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags

We're about to add more options for command behaviour, so let's expand
the meaning of kdb_repeat_t.

So far we just do various renames, there should be no functional changes.
Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Cc: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
parent a2e5d188
...@@ -17,7 +17,7 @@ typedef enum { ...@@ -17,7 +17,7 @@ typedef enum {
KDB_REPEAT_NONE = 0, /* Do not repeat this command */ KDB_REPEAT_NONE = 0, /* Do not repeat this command */
KDB_REPEAT_NO_ARGS, /* Repeat the command without arguments */ KDB_REPEAT_NO_ARGS, /* Repeat the command without arguments */
KDB_REPEAT_WITH_ARGS, /* Repeat the command including its arguments */ KDB_REPEAT_WITH_ARGS, /* Repeat the command including its arguments */
} kdb_repeat_t; } kdb_cmdflags_t;
typedef int (*kdb_func_t)(int, const char **); typedef int (*kdb_func_t)(int, const char **);
...@@ -147,7 +147,7 @@ static inline const char *kdb_walk_kallsyms(loff_t *pos) ...@@ -147,7 +147,7 @@ static inline const char *kdb_walk_kallsyms(loff_t *pos)
/* Dynamic kdb shell command registration */ /* Dynamic kdb shell command registration */
extern int kdb_register(char *, kdb_func_t, char *, char *, short); extern int kdb_register(char *, kdb_func_t, char *, char *, short);
extern int kdb_register_repeat(char *, kdb_func_t, char *, char *, extern int kdb_register_repeat(char *, kdb_func_t, char *, char *,
short, kdb_repeat_t); short, kdb_cmdflags_t);
extern int kdb_unregister(char *); extern int kdb_unregister(char *);
#else /* ! CONFIG_KGDB_KDB */ #else /* ! CONFIG_KGDB_KDB */
static inline __printf(1, 2) int kdb_printf(const char *fmt, ...) { return 0; } static inline __printf(1, 2) int kdb_printf(const char *fmt, ...) { return 0; }
...@@ -156,7 +156,7 @@ static inline int kdb_register(char *cmd, kdb_func_t func, char *usage, ...@@ -156,7 +156,7 @@ static inline int kdb_register(char *cmd, kdb_func_t func, char *usage,
char *help, short minlen) { return 0; } char *help, short minlen) { return 0; }
static inline int kdb_register_repeat(char *cmd, kdb_func_t func, char *usage, static inline int kdb_register_repeat(char *cmd, kdb_func_t func, char *usage,
char *help, short minlen, char *help, short minlen,
kdb_repeat_t repeat) { return 0; } kdb_cmdflags_t flags) { return 0; }
static inline int kdb_unregister(char *cmd) { return 0; } static inline int kdb_unregister(char *cmd) { return 0; }
#endif /* CONFIG_KGDB_KDB */ #endif /* CONFIG_KGDB_KDB */
enum { enum {
......
...@@ -1008,7 +1008,7 @@ int kdb_parse(const char *cmdstr) ...@@ -1008,7 +1008,7 @@ int kdb_parse(const char *cmdstr)
if (result && ignore_errors && result > KDB_CMD_GO) if (result && ignore_errors && result > KDB_CMD_GO)
result = 0; result = 0;
KDB_STATE_CLEAR(CMD); KDB_STATE_CLEAR(CMD);
switch (tp->cmd_repeat) { switch (tp->cmd_flags) {
case KDB_REPEAT_NONE: case KDB_REPEAT_NONE:
argc = 0; argc = 0;
if (argv[0]) if (argv[0])
...@@ -2646,7 +2646,7 @@ int kdb_register_repeat(char *cmd, ...@@ -2646,7 +2646,7 @@ int kdb_register_repeat(char *cmd,
char *usage, char *usage,
char *help, char *help,
short minlen, short minlen,
kdb_repeat_t repeat) kdb_cmdflags_t flags)
{ {
int i; int i;
kdbtab_t *kp; kdbtab_t *kp;
...@@ -2695,7 +2695,7 @@ int kdb_register_repeat(char *cmd, ...@@ -2695,7 +2695,7 @@ int kdb_register_repeat(char *cmd,
kp->cmd_usage = usage; kp->cmd_usage = usage;
kp->cmd_help = help; kp->cmd_help = help;
kp->cmd_minlen = minlen; kp->cmd_minlen = minlen;
kp->cmd_repeat = repeat; kp->cmd_flags = flags;
return 0; return 0;
} }
......
...@@ -174,7 +174,7 @@ typedef struct _kdbtab { ...@@ -174,7 +174,7 @@ typedef struct _kdbtab {
char *cmd_help; /* Help message for this command */ char *cmd_help; /* Help message for this command */
short cmd_minlen; /* Minimum legal # command short cmd_minlen; /* Minimum legal # command
* chars required */ * chars required */
kdb_repeat_t cmd_repeat; /* Does command auto repeat on enter? */ kdb_cmdflags_t cmd_flags; /* Command behaviour flags */
} kdbtab_t; } kdbtab_t;
extern int kdb_bt(int, const char **); /* KDB display back trace */ extern int kdb_bt(int, const char **); /* KDB display back trace */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment