2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 Desc: ShutdownA() - Shut down the operating system.
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
, ...)
18 void *RTASBase
= OpenResource("rtas.resource");
21 va_start(args
, output
);
22 retval
= RTASCall(method
, nargs
, nret
, output
, args
);
29 AROS_LH1(ULONG
, ShutdownA
,
30 AROS_LHA(ULONG
, action
, D0
),
31 struct ExecBase
*, SysBase
, 173, Exec
)
35 void *RTASBase
= OpenResource("rtas.resource");
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);