From 4b5186044b8d52f518bf5a6330bd2e2750a8cffe Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 14 May 1996 15:26:44 +0000 Subject: (reboot_system): Print prettier messages for shutdown notifications. --- init/init.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/init/init.c b/init/init.c index ae44c3ec..d1d27a4a 100644 --- a/init/init.c +++ b/init/init.c @@ -156,16 +156,17 @@ reboot_system (int flags) for (n = ntfy_tasks; n != NULL; n = n->next) { error_t err; - printf ("init: notifying %p\n", (void *) n->notify_port); + printf ("%s: notifying %s of shutdown...", + program_invocation_short_name, n->name); fflush (stdout); err = startup_dosync (n->notify_port, 60000); /* 1 minute to reply */ - if (err && err != MACH_SEND_INVALID_DEST) - { - printf ("init: %p complained: %s\n", - (void *) n->notify_port, - strerror (err)); - fflush (stdout); - } + if (err == MACH_SEND_INVALID_DEST) + printf ("(no longer present)\n"); + else if (err) + printf ("%s", strerror (err)); + else + printf ("done\n"); + fflush (stdout); } if (fakeboot) -- cgit v1.2.3