Removed autodocs of arch specific variants of ROM modules.
[AROS.git] / arch / ppc-chrp / exec / shutdowna.c
blob43523b0c7357dacbc4a0d068ef21624d4f433551
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: ShutdownA() - Shut down the operating system.
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include <proto/exec.h>
11 #include <proto/rtas.h>
13 /* See rom/kernel/issuper.c for documentation */
15 static int rtas_call(struct ExecBase *SysBase, const char *method, int nargs, int nret, void *output, ...)
17 va_list args;
18 void *RTASBase = OpenResource("rtas.resource");
19 int retval;
21 va_start(args, output);
22 retval = RTASCall(method, nargs, nret, output, args);
23 va_end(args);
25 return retval;
29 AROS_LH1(ULONG, ShutdownA,
30 AROS_LHA(ULONG, action, D0),
31 struct ExecBase *, SysBase, 173, Exec)
33 AROS_LIBFUNC_INIT
35 void *RTASBase = OpenResource("rtas.resource");
37 if (RTASBase)
39 if (action == SD_ACTION_COLDREBOOT)
40 rtas_call(SysBase, "system-reboot", 0, 1, NULL);
41 else if (action ==SD_ACTION_POWEROFF)
42 rtas_call(SysBase, "power-off", 2, 1, NULL, -1, -1);
45 return 0;
47 AROS_LIBFUNC_EXIT