Lookup the startup server through /servers/startup
authorDavid Michael <fedora.dm0@gmail.com>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
* 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.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-reboot-startup.diff

sysdeps/mach/hurd/reboot.c

index 0ad355370795e8c58a103a9d932fe3b49ee7fffc..b14a342ef7576db98ee42a24c63ace3fb4c69374 100644 (file)
@@ -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);