[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 36/37: startup: add more error handling
From: |
Samuel Thibault |
Subject: |
[hurd] 36/37: startup: add more error handling |
Date: |
Mon, 09 Feb 2015 09:59:12 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to annotated tag upstream/hurd/0.5.git20150208
in repository hurd.
commit e04b779d1cf875010befd37f1a0b86e132d077a6
Author: Justus Winter <address@hidden>
Date: Sun Feb 8 01:32:33 2015 +0100
startup: add more error handling
* startup/startup.c (launch_core_servers): Add more error handling.
---
startup/startup.c | 63 ++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 41 insertions(+), 22 deletions(-)
diff --git a/startup/startup.c b/startup/startup.c
index e01d2a8..da78b13 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -665,10 +665,11 @@ launch_core_servers (void)
error_t err;
/* Reply to the proc and auth servers. */
- startup_procinit_reply (procreply, procreplytype, 0,
- mach_task_self (), authserver,
- host_priv, MACH_MSG_TYPE_COPY_SEND,
- device_master, MACH_MSG_TYPE_COPY_SEND);
+ err = startup_procinit_reply (procreply, procreplytype, 0,
+ mach_task_self (), authserver,
+ host_priv, MACH_MSG_TYPE_COPY_SEND,
+ device_master, MACH_MSG_TYPE_COPY_SEND);
+ assert_perror (err);
if (!fakeboot)
{
mach_port_deallocate (mach_task_self (), device_master);
@@ -676,25 +677,34 @@ launch_core_servers (void)
}
/* Mark us as important. */
- proc_mark_important (procserver);
- proc_mark_exec (procserver);
+ err = proc_mark_important (procserver);
+ assert_perror (err);
+ err = proc_mark_exec (procserver);
+ assert_perror (err);
/* Declare that the filesystem and auth are our children. */
- proc_child (procserver, fstask);
- proc_child (procserver, authtask);
+ err = proc_child (procserver, fstask);
+ assert_perror (err);
+ err = proc_child (procserver, authtask);
+ assert_perror (err);
- proc_task2proc (procserver, authtask, &authproc);
- proc_mark_important (authproc);
- proc_mark_exec (authproc);
+ err = proc_task2proc (procserver, authtask, &authproc);
+ assert_perror (err);
+ err = proc_mark_important (authproc);
+ assert_perror (err);
+ err = proc_mark_exec (authproc);
+ assert_perror (err);
err = install_as_translator ();
if (err)
/* Good luck. Who knows, maybe it's an old installation. */
error (0, err, "Failed to bind to " _SERVERS_STARTUP);
- startup_authinit_reply (authreply, authreplytype, 0, authproc,
- MACH_MSG_TYPE_COPY_SEND);
- mach_port_deallocate (mach_task_self (), authproc);
+ err = startup_authinit_reply (authreply, authreplytype, 0, authproc,
+ MACH_MSG_TYPE_COPY_SEND);
+ assert_perror (err);
+ err = mach_port_deallocate (mach_task_self (), authproc);
+ assert_perror (err);
/* Give the library our auth and proc server ports. */
_hurd_port_set (&_hurd_ports[INIT_PORT_AUTH], authserver);
@@ -703,13 +713,16 @@ launch_core_servers (void)
/* Do NOT run _hurd_proc_init! That will start signals, which we do not
want. We listen to our own message port. Tell the proc server where
our args and environment are. */
- proc_set_arg_locations (procserver,
- (vm_address_t) global_argv, (vm_address_t) environ);
+ err = proc_set_arg_locations (procserver,
+ (vm_address_t) global_argv,
+ (vm_address_t) environ);
+ assert_perror (err);
default_ports[INIT_PORT_AUTH] = authserver;
/* Declare that the proc server is our child. */
- proc_child (procserver, proctask);
+ err = proc_child (procserver, proctask);
+ assert_perror (err);
err = proc_task2proc (procserver, proctask, &procproc);
if (!err)
{
@@ -718,13 +731,18 @@ launch_core_servers (void)
mach_port_deallocate (mach_task_self (), procproc);
}
- proc_register_version (procserver, host_priv, "init", "", HURD_VERSION);
+ err = proc_register_version (procserver, host_priv,
+ "init", "", HURD_VERSION);
+ assert_perror (err);
/* Get the bootstrap filesystem's proc server port.
We must do this before calling proc_setmsgport below. */
- proc_task2proc (procserver, fstask, &fsproc);
- proc_mark_important (fsproc);
- proc_mark_exec (fsproc);
+ err = proc_task2proc (procserver, fstask, &fsproc);
+ assert_perror (err);
+ err = proc_mark_important (fsproc);
+ assert_perror (err);
+ err = proc_mark_exec (fsproc);
+ assert_perror (err);
#if 0
printf ("Init has completed.\n");
@@ -739,7 +757,8 @@ launch_core_servers (void)
before accepting more RPC requests! However, we must do this before
calling fsys_init, because fsys_init blocks on exec_init, and
exec_init will block waiting on our message port. */
- proc_setmsgport (procserver, startup, &old);
+ err = proc_setmsgport (procserver, startup, &old);
+ assert_perror (err);
if (old != MACH_PORT_NULL)
mach_port_deallocate (mach_task_self (), old);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 20/37: libshouldbeinlibc: Fix typo in local variable name, (continued)
- [hurd] 20/37: libshouldbeinlibc: Fix typo in local variable name, Samuel Thibault, 2015/02/09
- [hurd] 15/37: lib*: Fix typos in comments (found by codespell), Samuel Thibault, 2015/02/09
- [hurd] 11/37: hurd: make the protected payload changes less intrusive, Samuel Thibault, 2015/02/09
- [hurd] 23/37: random: fix typo, Samuel Thibault, 2015/02/09
- [hurd] 21/37: procfs: Fix typos in comments (found by codespell), Samuel Thibault, 2015/02/09
- [hurd] 25/37: libdiskfs: fix port leak, Samuel Thibault, 2015/02/09
- [hurd] 17/37: console-client: Fix typos in comments, Samuel Thibault, 2015/02/09
- [hurd] 27/37: startup: give the tasks we create a name, Samuel Thibault, 2015/02/09
- [hurd] 33/37: Remove unimplemented -s option, Samuel Thibault, 2015/02/09
- [hurd] 19/37: misc: Fix typos in comments (found by codespell), Samuel Thibault, 2015/02/09
- [hurd] 36/37: startup: add more error handling,
Samuel Thibault <=
- [hurd] 32/37: utils/rpctrace: fix notification port handling, Samuel Thibault, 2015/02/09
- [hurd] 16/37: aclocal.m4, configure.ac: Fix typos and grammar in comment (found by codespell), Samuel Thibault, 2015/02/09
- [hurd] 37/37: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2015/02/09
- [hurd] 24/37: libfshelp: improve error handling, Samuel Thibault, 2015/02/09
- [hurd] 18/37: console: Fix typos in comments, Samuel Thibault, 2015/02/09
- [hurd] 30/37: proc: call `startup_essential_task' earlier, Samuel Thibault, 2015/02/09
- [hurd] 34/37: Allow dhcp trafic and configuration, Samuel Thibault, 2015/02/09
- [hurd] 01/37: Makeconf: handle the task_notify protocol, Samuel Thibault, 2015/02/09
- [hurd] 02/37: proc: register for new task notifications, Samuel Thibault, 2015/02/09
- [hurd] 07/37: ext2fs: tune the size of the inode cache, Samuel Thibault, 2015/02/09