mirror of
https://review.haiku-os.org/haiku
synced 2025-01-21 05:53:46 +01:00
Patch by Olivier Coursiere: When rebooting, shutdown all the system teams,
most importantly input_server, which then closes the drivers for input devices. This in turn will do some cleanup. The touch pad driver will then be reset to act as normal PS/2 mouse, so that OS like BeOS can use it again. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29948 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
642cc1315d
commit
e18d4a2d06
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright 2009, Olivier Coursière. All rights reserved.
|
||||
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
@ -11,8 +12,20 @@
|
||||
status_t
|
||||
system_shutdown(bool reboot)
|
||||
{
|
||||
// ToDo: shutdown all system services!
|
||||
|
||||
int32 cookie = 0;
|
||||
team_info info;
|
||||
|
||||
// Now shutdown all system services!
|
||||
// TODO: Once we are sure we can shutdown the system on all hardware
|
||||
// checking reboot may not be necessary anymore.
|
||||
if (reboot) {
|
||||
while (get_next_team_info(&cookie, &info) == B_OK) {
|
||||
if (info.team == B_SYSTEM_TEAM)
|
||||
continue;
|
||||
kill_team(info.team);
|
||||
}
|
||||
}
|
||||
|
||||
sync();
|
||||
|
||||
return arch_cpu_shutdown(reboot);
|
||||
|
Loading…
x
Reference in New Issue
Block a user