]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Lookup the startup server through /servers/startup
authorDavid Michael <fedora.dm0@gmail.com>
Sun, 11 Mar 2018 23:21:44 +0000 (00:21 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 11 Mar 2018 23:24:31 +0000 (00:24 +0100)
* 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.

ChangeLog
sysdeps/mach/hurd/reboot.c

index eda37a2b314de851c7ca39d43642794826f78034..02d1ccdc682ee69ffc14fef9fbec08f171141ced 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-03-12  David Michael <fedora.dm0@gmail.com>
+
+       * 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.
+
 2018-03-11  Zack Weinberg  <zackw@panix.com>
 
        * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Include math.h
index a7987e1640994338469c9be42e0d673dab9554d0..beeb9bfcbc8899430ceb3709a5d9b6730b6299dd 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);