Subversion Repositories HelenOS-historic

Rev

Rev 548 | Rev 579 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 548 Rev 552
Line 90... Line 90...
90
static cmd_info_t halt_info;
90
static cmd_info_t halt_info;
91
 
91
 
92
/** Initialize kconsole data structures. */
92
/** Initialize kconsole data structures. */
93
void kconsole_init(void)
93
void kconsole_init(void)
94
{
94
{
95
    spinlock_initialize(&cmd_lock);
95
    spinlock_initialize(&cmd_lock, "kconsole_cmd");
96
    list_initialize(&cmd_head);
96
    list_initialize(&cmd_head);
97
   
97
   
98
    help_info.name = "help";
98
    help_info.name = "help";
99
    help_info.description = "List supported commands.";
99
    help_info.description = "List supported commands.";
100
    help_info.func = cmd_help;
100
    help_info.func = cmd_help;
101
    help_info.help = NULL;
101
    help_info.help = NULL;
102
    help_info.argc = 0;
102
    help_info.argc = 0;
103
    help_info.argv = NULL;
103
    help_info.argv = NULL;
104
 
104
 
105
    spinlock_initialize(&help_info.lock);
105
    spinlock_initialize(&help_info.lock, "kconsole_help");
106
    link_initialize(&help_info.link);
106
    link_initialize(&help_info.link);
107
 
107
 
108
    if (!cmd_register(&help_info))
108
    if (!cmd_register(&help_info))
109
        panic("could not register command %s\n", help_info.name);
109
        panic("could not register command %s\n", help_info.name);
110
 
110
 
Line 114... Line 114...
114
    desc_info.help = desc_help;
114
    desc_info.help = desc_help;
115
    desc_info.func = cmd_desc;
115
    desc_info.func = cmd_desc;
116
    desc_info.argc = 1;
116
    desc_info.argc = 1;
117
    desc_info.argv = &desc_argv;
117
    desc_info.argv = &desc_argv;
118
   
118
   
119
    spinlock_initialize(&desc_info.lock);
119
    spinlock_initialize(&desc_info.lock, "kconsole_desc");
120
    link_initialize(&desc_info.link);
120
    link_initialize(&desc_info.link);
121
   
121
   
122
    if (!cmd_register(&desc_info))
122
    if (!cmd_register(&desc_info))
123
        panic("could not register command %s\n", desc_info.name);
123
        panic("could not register command %s\n", desc_info.name);
124
   
124
   
Line 128... Line 128...
128
    halt_info.func = cmd_halt;
128
    halt_info.func = cmd_halt;
129
    halt_info.help = NULL;
129
    halt_info.help = NULL;
130
    halt_info.argc = 0;
130
    halt_info.argc = 0;
131
    halt_info.argv = NULL;
131
    halt_info.argv = NULL;
132
 
132
 
133
    spinlock_initialize(&halt_info.lock);
133
    spinlock_initialize(&halt_info.lock, "kconsole_halt");
134
    link_initialize(&halt_info.link);
134
    link_initialize(&halt_info.link);
135
 
135
 
136
    if (!cmd_register(&halt_info))
136
    if (!cmd_register(&halt_info))
137
        panic("could not register command %s\n", halt_info.name);
137
        panic("could not register command %s\n", halt_info.name);
138
}
138
}