aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Vorontsov <anton.vorontsov@linaro.org>2014-11-06 09:36:41 -0500
committerJason Wessel <jason.wessel@windriver.com>2014-11-11 10:31:51 -0500
commit15a42a9bc9ffcff4315a7154313db08c6bf9ef11 (patch)
tree9ac766d8d3ef79e04ba7378abf6e648c2acb5db7
parenta2e5d188aad31f7177cbd6d9ddaf8cc9aa4affe0 (diff)
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: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
-rw-r--r--include/linux/kdb.h6
-rw-r--r--kernel/debug/kdb/kdb_main.c6
-rw-r--r--kernel/debug/kdb/kdb_private.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/kdb.h b/include/linux/kdb.h
index 290db1269c4c..e650f79aa414 100644
--- a/include/linux/kdb.h
+++ b/include/linux/kdb.h
@@ -17,7 +17,7 @@ typedef enum {
17 KDB_REPEAT_NONE = 0, /* Do not repeat this command */ 17 KDB_REPEAT_NONE = 0, /* Do not repeat this command */
18 KDB_REPEAT_NO_ARGS, /* Repeat the command without arguments */ 18 KDB_REPEAT_NO_ARGS, /* Repeat the command without arguments */
19 KDB_REPEAT_WITH_ARGS, /* Repeat the command including its arguments */ 19 KDB_REPEAT_WITH_ARGS, /* Repeat the command including its arguments */
20} kdb_repeat_t; 20} kdb_cmdflags_t;
21 21
22typedef int (*kdb_func_t)(int, const char **); 22typedef int (*kdb_func_t)(int, const char **);
23 23
@@ -147,7 +147,7 @@ static inline const char *kdb_walk_kallsyms(loff_t *pos)
147/* Dynamic kdb shell command registration */ 147/* Dynamic kdb shell command registration */
148extern int kdb_register(char *, kdb_func_t, char *, char *, short); 148extern int kdb_register(char *, kdb_func_t, char *, char *, short);
149extern int kdb_register_repeat(char *, kdb_func_t, char *, char *, 149extern int kdb_register_repeat(char *, kdb_func_t, char *, char *,
150 short, kdb_repeat_t); 150 short, kdb_cmdflags_t);
151extern int kdb_unregister(char *); 151extern int kdb_unregister(char *);
152#else /* ! CONFIG_KGDB_KDB */ 152#else /* ! CONFIG_KGDB_KDB */
153static inline __printf(1, 2) int kdb_printf(const char *fmt, ...) { return 0; } 153static 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 char *help, short minlen) { return 0; } 156 char *help, short minlen) { return 0; }
157static inline int kdb_register_repeat(char *cmd, kdb_func_t func, char *usage, 157static inline int kdb_register_repeat(char *cmd, kdb_func_t func, char *usage,
158 char *help, short minlen, 158 char *help, short minlen,
159 kdb_repeat_t repeat) { return 0; } 159 kdb_cmdflags_t flags) { return 0; }
160static inline int kdb_unregister(char *cmd) { return 0; } 160static inline int kdb_unregister(char *cmd) { return 0; }
161#endif /* CONFIG_KGDB_KDB */ 161#endif /* CONFIG_KGDB_KDB */
162enum { 162enum {
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index cc02aa205668..41966b5f86b7 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -1008,7 +1008,7 @@ int kdb_parse(const char *cmdstr)
1008 if (result && ignore_errors && result > KDB_CMD_GO) 1008 if (result && ignore_errors && result > KDB_CMD_GO)
1009 result = 0; 1009 result = 0;
1010 KDB_STATE_CLEAR(CMD); 1010 KDB_STATE_CLEAR(CMD);
1011 switch (tp->cmd_repeat) { 1011 switch (tp->cmd_flags) {
1012 case KDB_REPEAT_NONE: 1012 case KDB_REPEAT_NONE:
1013 argc = 0; 1013 argc = 0;
1014 if (argv[0]) 1014 if (argv[0])
@@ -2646,7 +2646,7 @@ int kdb_register_repeat(char *cmd,
2646 char *usage, 2646 char *usage,
2647 char *help, 2647 char *help,
2648 short minlen, 2648 short minlen,
2649 kdb_repeat_t repeat) 2649 kdb_cmdflags_t flags)
2650{ 2650{
2651 int i; 2651 int i;
2652 kdbtab_t *kp; 2652 kdbtab_t *kp;
@@ -2695,7 +2695,7 @@ int kdb_register_repeat(char *cmd,
2695 kp->cmd_usage = usage; 2695 kp->cmd_usage = usage;
2696 kp->cmd_help = help; 2696 kp->cmd_help = help;
2697 kp->cmd_minlen = minlen; 2697 kp->cmd_minlen = minlen;
2698 kp->cmd_repeat = repeat; 2698 kp->cmd_flags = flags;
2699 2699
2700 return 0; 2700 return 0;
2701} 2701}
diff --git a/kernel/debug/kdb/kdb_private.h b/kernel/debug/kdb/kdb_private.h
index c4c46c7b26fd..eaacd1693954 100644
--- a/kernel/debug/kdb/kdb_private.h
+++ b/kernel/debug/kdb/kdb_private.h
@@ -174,7 +174,7 @@ typedef struct _kdbtab {
174 char *cmd_help; /* Help message for this command */ 174 char *cmd_help; /* Help message for this command */
175 short cmd_minlen; /* Minimum legal # command 175 short cmd_minlen; /* Minimum legal # command
176 * chars required */ 176 * chars required */
177 kdb_repeat_t cmd_repeat; /* Does command auto repeat on enter? */ 177 kdb_cmdflags_t cmd_flags; /* Command behaviour flags */
178} kdbtab_t; 178} kdbtab_t;
179 179
180extern int kdb_bt(int, const char **); /* KDB display back trace */ 180extern int kdb_bt(int, const char **); /* KDB display back trace */