Changes in kernel/generic/src/console/cmd.c [2f33fbc:b2fa1204] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
r2f33fbc rb2fa1204 45 45 #include <console/kconsole.h> 46 46 #include <print.h> 47 #include <log.h> 47 48 #include <panic.h> 48 49 #include <typedefs.h> … … 639 640 for (i = 0; basic_commands[i]; i++) { 640 641 if (!cmd_register(basic_commands[i])) { 641 printf("Cannot register command %s\n", 642 log(LF_OTHER, LVL_ERROR, 643 "Cannot register command %s", 642 644 basic_commands[i]->name); 643 645 } … … 656 658 657 659 size_t len = 0; 658 list_foreach(cmd_list, cur) { 659 cmd_info_t *hlp; 660 hlp = list_get_instance(cur, cmd_info_t, link); 661 660 list_foreach(cmd_list, link, cmd_info_t, hlp) { 662 661 spinlock_lock(&hlp->lock); 663 662 if (str_length(hlp->name) > len) … … 668 667 unsigned int _len = (unsigned int) len; 669 668 if ((_len != len) || (((int) _len) < 0)) { 670 printf("Command length overflow\n");669 log(LF_OTHER, LVL_ERROR, "Command length overflow"); 671 670 return 1; 672 671 } 673 672 674 list_foreach(cmd_list, cur) { 675 cmd_info_t *hlp; 676 hlp = list_get_instance(cur, cmd_info_t, link); 677 673 list_foreach(cmd_list, link, cmd_info_t, hlp) { 678 674 spinlock_lock(&hlp->lock); 679 675 printf("%-*s %s\n", _len, hlp->name, hlp->description); … … 912 908 spinlock_lock(&cmd_lock); 913 909 914 list_foreach(cmd_list, cur) { 915 cmd_info_t *hlp; 916 917 hlp = list_get_instance(cur, cmd_info_t, link); 910 list_foreach(cmd_list, link, cmd_info_t, hlp) { 918 911 spinlock_lock(&hlp->lock); 919 912
Note:
See TracChangeset
for help on using the changeset viewer.