2 Copyright © 1995-2011, 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>
12 #include "exec_intern.h"
14 /*****************************************************************************
18 AROS_LH1(ULONG
, ShutdownA
,
21 AROS_LHA(ULONG
, action
, D0
),
24 struct ExecBase
*, SysBase
, 173, Exec
)
27 This function will shut down the operating system.
31 * SD_ACTION_POWEROFF - power off the machine.
32 * SD_ACTION_COLDREBOOT - cold reboot the machine (not only AROS).
35 This function does not return in case of success. Otherwise is returns
39 It can be quite harmful to call this function. It may be possible that
40 you will lose data from other tasks not having saved, or disk buffers
41 not being flushed. Plus you could annoy the (other) users.
50 ******************************************************************************/
58 case SD_ACTION_POWEROFF
:
62 case SD_ACTION_COLDREBOOT
:
63 exitcode
= 0x81; /* Magic value for our bootstrap */
67 return 0; /* Unknown action code */
70 PD(SysBase
).SysIFace
->exit(exitcode
);
73 /* Just shut up the compiler, we won't return */