Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/cmd.c

    r2f33fbc r593e023  
    4545#include <console/kconsole.h>
    4646#include <print.h>
     47#include <log.h>
    4748#include <panic.h>
    4849#include <typedefs.h>
     
    639640        for (i = 0; basic_commands[i]; i++) {
    640641                if (!cmd_register(basic_commands[i])) {
    641                         printf("Cannot register command %s\n",
     642                        log(LF_OTHER, LVL_ERROR,
     643                            "Cannot register command %s",
    642644                            basic_commands[i]->name);
    643645                }
     
    656658       
    657659        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) {
    662661                spinlock_lock(&hlp->lock);
    663662                if (str_length(hlp->name) > len)
     
    668667        unsigned int _len = (unsigned int) len;
    669668        if ((_len != len) || (((int) _len) < 0)) {
    670                 printf("Command length overflow\n");
     669                log(LF_OTHER, LVL_ERROR, "Command length overflow");
    671670                return 1;
    672671        }
    673672       
    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) {
    678674                spinlock_lock(&hlp->lock);
    679675                printf("%-*s %s\n", _len, hlp->name, hlp->description);
     
    912908        spinlock_lock(&cmd_lock);
    913909       
    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) {
    918911                spinlock_lock(&hlp->lock);
    919912               
     
    11561149int cmd_set4(cmd_arg_t *argv)
    11571150{
    1158         uintptr_t addr;
     1151        uintptr_t addr = 0; // Prevent -Werror=maybe-uninitialized
    11591152        uint32_t arg1 = argv[1].intval;
    11601153        bool pointer = false;
     
    13641357        printf("The kernel will now relinquish the console.\n");
    13651358        release_console();
    1366        
    1367         event_notify_0(EVENT_KCONSOLE, false);
    13681359        indev_pop_character(stdin);
    13691360       
Note: See TracChangeset for help on using the changeset viewer.