aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/boot-start.c9
-rw-r--r--libdiskfs/init-startup.c13
2 files changed, 13 insertions, 9 deletions
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index 42e991e6..cfe23034 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -33,7 +33,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <string.h>
#include <argz.h>
#include <error.h>
-#include <pids.h>
#include "exec_S.h"
#include "exec_startup_S.h"
#include "fsys_S.h"
@@ -602,9 +601,12 @@ diskfs_S_fsys_init (struct diskfs_control *pt,
proc_register_version (procserver, host, diskfs_server_name, "",
diskfs_server_version);
+ mach_port_deallocate (mach_task_self (), procserver);
- err = proc_getmsgport (procserver, HURD_PID_STARTUP, &startup);
- if (!err)
+ startup = file_name_lookup (_SERVERS_STARTUP, 0, 0);
+ if (startup == MACH_PORT_NULL)
+ error (0, errno, "%s", _SERVERS_STARTUP);
+ else
{
startup_essential_task (startup, mach_task_self (), MACH_PORT_NULL,
diskfs_server_name, host);
@@ -612,7 +614,6 @@ diskfs_S_fsys_init (struct diskfs_control *pt,
}
mach_port_deallocate (mach_task_self (), host);
- mach_port_deallocate (mach_task_self (), procserver);
_diskfs_init_completed ();
diff --git a/libdiskfs/init-startup.c b/libdiskfs/init-startup.c
index d10c9641..3a588e15 100644
--- a/libdiskfs/init-startup.c
+++ b/libdiskfs/init-startup.c
@@ -25,8 +25,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <fcntl.h>
#include <error.h>
#include <hurd/fsys.h>
+#include <hurd/paths.h>
#include <hurd/startup.h>
-#include <pids.h>
#include "startup_S.h"
@@ -195,15 +195,18 @@ _diskfs_init_completed ()
/* Mark us as important. */
err = proc_mark_important (proc);
+ mach_port_deallocate (mach_task_self (), proc);
/* This might fail due to permissions or because the old proc server
is still running, ignore any such errors. */
if (err && err != EPERM && err != EMIG_BAD_ID)
goto errout;
- err = proc_getmsgport (proc, HURD_PID_STARTUP, &init);
- mach_port_deallocate (mach_task_self (), proc);
- if (err)
- goto errout;
+ init = file_name_lookup (_SERVERS_STARTUP, 0, 0);
+ if (init == MACH_PORT_NULL)
+ {
+ err = errno;
+ goto errout;
+ }
notify = ports_get_send_right (pi);
ports_port_deref (pi);