diff options
Diffstat (limited to 'kernel/debug')
| -rw-r--r-- | kernel/debug/kdb/kdb_main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index d72b32c66f7d..82a3b32a7cfc 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c | |||
| @@ -658,7 +658,7 @@ static void kdb_cmderror(int diag) | |||
| 658 | */ | 658 | */ |
| 659 | struct defcmd_set { | 659 | struct defcmd_set { |
| 660 | int count; | 660 | int count; |
| 661 | int usable; | 661 | bool usable; |
| 662 | char *name; | 662 | char *name; |
| 663 | char *usage; | 663 | char *usage; |
| 664 | char *help; | 664 | char *help; |
| @@ -666,7 +666,7 @@ struct defcmd_set { | |||
| 666 | }; | 666 | }; |
| 667 | static struct defcmd_set *defcmd_set; | 667 | static struct defcmd_set *defcmd_set; |
| 668 | static int defcmd_set_count; | 668 | static int defcmd_set_count; |
| 669 | static int defcmd_in_progress; | 669 | static bool defcmd_in_progress; |
| 670 | 670 | ||
| 671 | /* Forward references */ | 671 | /* Forward references */ |
| 672 | static int kdb_exec_defcmd(int argc, const char **argv); | 672 | static int kdb_exec_defcmd(int argc, const char **argv); |
| @@ -676,9 +676,9 @@ static int kdb_defcmd2(const char *cmdstr, const char *argv0) | |||
| 676 | struct defcmd_set *s = defcmd_set + defcmd_set_count - 1; | 676 | struct defcmd_set *s = defcmd_set + defcmd_set_count - 1; |
| 677 | char **save_command = s->command; | 677 | char **save_command = s->command; |
| 678 | if (strcmp(argv0, "endefcmd") == 0) { | 678 | if (strcmp(argv0, "endefcmd") == 0) { |
| 679 | defcmd_in_progress = 0; | 679 | defcmd_in_progress = false; |
| 680 | if (!s->count) | 680 | if (!s->count) |
| 681 | s->usable = 0; | 681 | s->usable = false; |
| 682 | if (s->usable) | 682 | if (s->usable) |
| 683 | /* macros are always safe because when executed each | 683 | /* macros are always safe because when executed each |
| 684 | * internal command re-enters kdb_parse() and is | 684 | * internal command re-enters kdb_parse() and is |
| @@ -695,7 +695,7 @@ static int kdb_defcmd2(const char *cmdstr, const char *argv0) | |||
| 695 | if (!s->command) { | 695 | if (!s->command) { |
| 696 | kdb_printf("Could not allocate new kdb_defcmd table for %s\n", | 696 | kdb_printf("Could not allocate new kdb_defcmd table for %s\n", |
| 697 | cmdstr); | 697 | cmdstr); |
| 698 | s->usable = 0; | 698 | s->usable = false; |
| 699 | return KDB_NOTIMP; | 699 | return KDB_NOTIMP; |
| 700 | } | 700 | } |
| 701 | memcpy(s->command, save_command, s->count * sizeof(*(s->command))); | 701 | memcpy(s->command, save_command, s->count * sizeof(*(s->command))); |
| @@ -737,7 +737,7 @@ static int kdb_defcmd(int argc, const char **argv) | |||
| 737 | defcmd_set_count * sizeof(*defcmd_set)); | 737 | defcmd_set_count * sizeof(*defcmd_set)); |
| 738 | s = defcmd_set + defcmd_set_count; | 738 | s = defcmd_set + defcmd_set_count; |
| 739 | memset(s, 0, sizeof(*s)); | 739 | memset(s, 0, sizeof(*s)); |
| 740 | s->usable = 1; | 740 | s->usable = true; |
| 741 | s->name = kdb_strdup(argv[1], GFP_KDB); | 741 | s->name = kdb_strdup(argv[1], GFP_KDB); |
| 742 | if (!s->name) | 742 | if (!s->name) |
| 743 | goto fail_name; | 743 | goto fail_name; |
| @@ -756,7 +756,7 @@ static int kdb_defcmd(int argc, const char **argv) | |||
| 756 | s->help[strlen(s->help)-1] = '\0'; | 756 | s->help[strlen(s->help)-1] = '\0'; |
| 757 | } | 757 | } |
| 758 | ++defcmd_set_count; | 758 | ++defcmd_set_count; |
| 759 | defcmd_in_progress = 1; | 759 | defcmd_in_progress = true; |
| 760 | kfree(save_defcmd_set); | 760 | kfree(save_defcmd_set); |
| 761 | return 0; | 761 | return 0; |
| 762 | fail_help: | 762 | fail_help: |
