mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
063a15ce9b
Change from `void reboot(void)` to `int reboot(int mode)`. Move reboot definition to core, rename architecture implementations from reboot to reboot_arch. Declare reboot mode(s) in kernel.h, reboot_arch in kernel_internal.h Currently only one reboot mode is handled, its use is enforced. Rationale: A reboot function is already defined in <unistd.h> on BSD systems. (See: http://www.openbsd.org/cgi-bin/man.cgi?query=reboot&sektion=2) This patch not only allows native to build sensibly on these systems but also streamlines RIOTs compatability with existing software.
27 lines
572 B
C
27 lines
572 B
C
/**
|
|
* Shell commands for system calls
|
|
*
|
|
* Copyright (C) 2014 Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
|
* Public License. See the file LICENSE in the top level directory for more
|
|
* details.
|
|
*
|
|
* @ingroup shell_commands
|
|
* @{
|
|
* @file
|
|
* @brief shell commands for system calls
|
|
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
|
* @}
|
|
*/
|
|
|
|
#include "kernel.h"
|
|
|
|
void _reboot_handler(int argc, char **argv)
|
|
{
|
|
(void) argc;
|
|
(void) argv;
|
|
|
|
(void) reboot(RB_AUTOBOOT);
|
|
}
|