aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/reboot.c
diff options
context:
space:
mode:
authorDavid Michael <fedora.dm0@gmail.com>2018-03-12 00:21:44 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-03-12 00:24:31 +0100
commitda6d4404ecfd7eacba8c096b0761a5758a59da4b (patch)
tree6d1bff4b44189a104de3659775807e7c073133d8 /sysdeps/mach/hurd/reboot.c
parentd3da750d019d458355af602936d01901ba14f11c (diff)
downloadglibc-da6d4404ecfd7eacba8c096b0761a5758a59da4b.tar
glibc-da6d4404ecfd7eacba8c096b0761a5758a59da4b.tar.gz
glibc-da6d4404ecfd7eacba8c096b0761a5758a59da4b.tar.bz2
glibc-da6d4404ecfd7eacba8c096b0761a5758a59da4b.zip
Lookup the startup server through /servers/startup
* sysdeps/mach/hurd/reboot.c: Include <hurd/paths.h> (reboot): Lookup _SERVERS_STARTUP instead of calling proc_getmsgport to get a port to the startup server.
Diffstat (limited to 'sysdeps/mach/hurd/reboot.c')
-rw-r--r--sysdeps/mach/hurd/reboot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/reboot.c b/sysdeps/mach/hurd/reboot.c
index a7987e1640..beeb9bfcbc 100644
--- a/sysdeps/mach/hurd/reboot.c
+++ b/sysdeps/mach/hurd/reboot.c
@@ -18,6 +18,7 @@
#include <errno.h>
#include <unistd.h>
#include <hurd.h>
+#include <hurd/paths.h>
#include <hurd/startup.h>
#include <sys/reboot.h>
@@ -33,8 +34,8 @@ reboot (int howto)
if (err)
return __hurd_fail (EPERM);
- err = __USEPORT (PROC, __proc_getmsgport (port, 1, &init));
- if (!err)
+ init = __file_name_lookup (_SERVERS_STARTUP, 0, 0);
+ if (init != MACH_PORT_NULL)
{
err = __startup_reboot (init, hostpriv, howto);
__mach_port_deallocate (__mach_task_self (), init);