root/Whitix/trunk/kernel/reboot.c
| Revision 652, 1.4 KB (checked in by mwhitworth, 4 years ago) |
|---|
| Line | |
|---|---|
| 1 | /* This file is part of Whitix. |
| 2 | * |
| 3 | * Whitix is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation; either version 2 of the License, or |
| 6 | * (at your option) any later version. |
| 7 | * |
| 8 | * Whitix is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with Whitix; if not, write to the Free Software |
| 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 16 | * |
| 17 | */ |
| 18 | |
| 19 | #include <print.h> |
| 20 | #include <typedefs.h> |
| 21 | #include <error.h> |
| 22 | #include <fs/vfs.h> |
| 23 | #include <sys.h> |
| 24 | |
| 25 | extern int ArchReboot(); |
| 26 | |
| 27 | /*********************************************************************** |
| 28 | * |
| 29 | * FUNCTION: SysShutdown |
| 30 | * |
| 31 | * DESCRIPTION: Shutdown or reboot the computer. |
| 32 | * |
| 33 | * PARAMETERS: None. |
| 34 | * |
| 35 | * RETURNS: Nothing. |
| 36 | * |
| 37 | ***********************************************************************/ |
| 38 | |
| 39 | int SysShutdown(int type) |
| 40 | { |
| 41 | KePrint("Synchronising the filesystem\n"); |
| 42 | // SysFileSystemSync(); |
| 43 | KePrint("Rebooting\n"); |
| 44 | ArchReboot(); |
| 45 | |
| 46 | /* Should not get here. */ |
| 47 | return 0; |
| 48 | } |
| 49 | |
| 50 | struct SysCall sysShutdown=SysEntry(SysShutdown, 4); |
| 51 | |
| 52 | void ShutdownInit() |
| 53 | { |
| 54 | SysRegisterCall(SYS_SHUTDOWN_BASE, &sysShutdown); |
| 55 | } |
Note: See TracBrowser
for help on using the browser.
