Changeset 79305e1 in mainline


Ignore:
Timestamp:
2005-12-06T13:02:20Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
34722ee
Parents:
59b6a70
Message:

kconsole halt command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/console/kconsole.c

    r59b6a70 r79305e1  
    8686};
    8787
     88/** Data and methods for 'halt' command. */
     89static int cmd_halt(cmd_arg_t *argv);
     90static cmd_info_t halt_info;
     91
    8892/** Initialize kconsole data structures. */
    8993void kconsole_init(void)
     
    118122        if (!cmd_register(&desc_info))
    119123                panic("could not register command %s\n", desc_info.name);
     124       
     125       
     126        halt_info.name = "halt";
     127        halt_info.description = "Halt the kernel.";
     128        halt_info.func = cmd_halt;
     129        halt_info.help = NULL;
     130        halt_info.argc = 0;
     131        halt_info.argv = NULL;
     132
     133        spinlock_initialize(&halt_info.lock);
     134        link_initialize(&halt_info.link);
     135
     136        if (!cmd_register(&halt_info))
     137                panic("could not register command %s\n", halt_info.name);
    120138}
    121139
     
    408426}
    409427
     428/** Halt the kernel.
     429 *
     430 * @param argv Argument vector.
     431 *
     432 * @return 0 on failure, 1 on success.
     433 */
     434int cmd_halt(cmd_arg_t *argv)
     435{
     436        halt();
     437        return 1;
     438}
     439
    410440/** Print detailed description of 'describe' command. */
    411441void desc_help(void)
Note: See TracChangeset for help on using the changeset viewer.