LONG Shutdown(mode)
WORD mode;
Shutdown() kills all processes, syncs filesystems then halts or reboots the system. | |
Opcode | 337 (0x0151) |
Availability | This function is available under all MiNT versions integrated with MultiTOS. |
Parameters | If mode is zero, the
system will shutdown then enter a halted condition. On
mode equal to 1, the system will reboot the machine
after shutting everything down.
All other values of mode are reserved for future definition. |
Binding |
move.w mode,-(sp) move.w #$0151,-(sp) trap #1 addq.l #4,sp |
Return Value | Shutdown() returns a negative GEMDOS error code, if failed. On success this call obviously never returns. |
Caveats |
All current versions of MiNT (including 1.15.x) contain a bug that causes the system to crash, if you call Shutdown() while both GEM AES and virtual console daemon are present. |
Comments | You need root privileges to shut the system down. |
See Also | Sync() |