From patchwork Sun Mar 11 23:25:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 26280 Received: (qmail 48175 invoked by alias); 11 Mar 2018 23:25:47 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 48166 invoked by uid 89); 11 Mar 2018 23:25:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=H*r:sk:static-, Hx-spam-relays-external:sk:static-, H*RU:sk:static- X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: David Michael Subject: [hurd,commited] Lookup the startup server through /servers/startup Date: Mon, 12 Mar 2018 00:25:41 +0100 Message-Id: <20180311232541.25642-1-samuel.thibault@ens-lyon.org> From: David Michael * sysdeps/mach/hurd/reboot.c: Include (reboot): Lookup _SERVERS_STARTUP instead of calling proc_getmsgport to get a port to the startup server. --- ChangeLog | 6 ++++++ sysdeps/mach/hurd/reboot.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index eda37a2b31..02d1ccdc68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-03-12 David Michael + + * sysdeps/mach/hurd/reboot.c: Include + (reboot): Lookup _SERVERS_STARTUP instead of calling proc_getmsgport to + get a port to the startup server. + 2018-03-11 Zack Weinberg * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Include math.h 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 #include #include +#include #include #include @@ -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);