Subversion Repositories HelenOS

Rev

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

Rev 2224 Rev 2227
Line 46... Line 46...
46
#include <print.h>
46
#include <print.h>
47
#include <panic.h>
47
#include <panic.h>
48
#include <arch/types.h>
48
#include <arch/types.h>
49
#include <adt/list.h>
49
#include <adt/list.h>
50
#include <arch.h>
50
#include <arch.h>
-
 
51
#include <config.h>
51
#include <func.h>
52
#include <func.h>
52
#include <macros.h>
53
#include <macros.h>
53
#include <debug.h>
54
#include <debug.h>
54
#include <symtab.h>
55
#include <symtab.h>
55
#include <cpu.h>
56
#include <cpu.h>
Line 77... Line 78...
77
    .argc = 0
78
    .argc = 0
78
};
79
};
79
 
80
 
80
static cmd_info_t exit_info = {
81
static cmd_info_t exit_info = {
81
    .name = "exit",
82
    .name = "exit",
82
    .description = "Exit kconsole",
83
    .description = "Exit kconsole.",
-
 
84
    .argc = 0
-
 
85
};
-
 
86
 
-
 
87
static int cmd_reboot(cmd_arg_t *argv);
-
 
88
static cmd_info_t reboot_info = {
-
 
89
    .name = "reboot",
-
 
90
    .description = "Reboot.",
-
 
91
    .func = cmd_reboot,
83
    .argc = 0
92
    .argc = 0
84
};
93
};
85
 
94
 
86
static int cmd_continue(cmd_arg_t *argv);
95
static int cmd_continue(cmd_arg_t *argv);
87
static cmd_info_t continue_info = {
96
static cmd_info_t continue_info = {
Line 427... Line 436...
427
    &call3_info,
436
    &call3_info,
428
    &continue_info,
437
    &continue_info,
429
    &cpus_info,
438
    &cpus_info,
430
    &desc_info,
439
    &desc_info,
431
    &exit_info,
440
    &exit_info,
-
 
441
    &reboot_info,
432
    &halt_info,
442
    &halt_info,
433
    &help_info,
443
    &help_info,
434
    &ipc_task_info,
444
    &ipc_task_info,
435
    &set4_info,
445
    &set4_info,
436
    &slabs_info,
446
    &slabs_info,
Line 502... Line 512...
502
    spinlock_unlock(&cmd_lock);
512
    spinlock_unlock(&cmd_lock);
503
 
513
 
504
    return 1;
514
    return 1;
505
}
515
}
506
 
516
 
-
 
517
 
-
 
518
/** Reboot the system.
-
 
519
 *
-
 
520
 * @param argv Argument vector.
-
 
521
 *
-
 
522
 * @return 0 on failure, 1 on success.
-
 
523
 */
-
 
524
int cmd_reboot(cmd_arg_t *argv)
-
 
525
{
-
 
526
    reboot();
-
 
527
   
-
 
528
    /* Not reached */
-
 
529
    return 1;
-
 
530
}
-
 
531
 
507
/** Describe specified command.
532
/** Describe specified command.
508
 *
533
 *
509
 * @param argv Argument vector.
534
 * @param argv Argument vector.
510
 *
535
 *
511
 * @return 0 on failure, 1 on success.
536
 * @return 0 on failure, 1 on success.