Rev 623 | Rev 625 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 623 | Rev 624 | ||
|---|---|---|---|
| Line 64... | Line 64... | ||
| 64 | * When locking two cmd info structures, structure with |
64 | * When locking two cmd info structures, structure with |
| 65 | * lower address must be locked first. |
65 | * lower address must be locked first. |
| 66 | */ |
66 | */ |
| 67 | 67 | ||
| 68 | SPINLOCK_INITIALIZE(cmd_lock); /**< Lock protecting command list. */ |
68 | SPINLOCK_INITIALIZE(cmd_lock); /**< Lock protecting command list. */ |
| 69 | link_t cmd_head; /**< Command list. */ |
69 | LIST_INITIALIZE(cmd_head); /**< Command list. */ |
| 70 | 70 | ||
| 71 | static cmd_info_t *parse_cmdline(char *cmdline, size_t len); |
71 | static cmd_info_t *parse_cmdline(char *cmdline, size_t len); |
| 72 | static bool parse_argument(char *cmdline, size_t len, index_t *start, index_t *end); |
72 | static bool parse_argument(char *cmdline, size_t len, index_t *start, index_t *end); |
| 73 | static char history[KCONSOLE_HISTORY][MAX_CMDLINE] = {}; |
73 | static char history[KCONSOLE_HISTORY][MAX_CMDLINE] = {}; |
| 74 | 74 | ||
| 75 | /** Initialize kconsole data structures. */ |
75 | /** Initialize kconsole data structures. */ |
| 76 | void kconsole_init(void) |
76 | void kconsole_init(void) |
| 77 | { |
77 | { |
| 78 | int i; |
78 | int i; |
| 79 | 79 | ||
| 80 | list_initialize(&cmd_head); |
- | |
| 81 | - | ||
| 82 | cmd_init(); |
80 | cmd_init(); |
| 83 | for (i=0; i<KCONSOLE_HISTORY; i++) |
81 | for (i=0; i<KCONSOLE_HISTORY; i++) |
| 84 | history[i][0] = '\0'; |
82 | history[i][0] = '\0'; |
| 85 | } |
83 | } |
| 86 | 84 | ||