diff options
author | Thomas Bushnell <thomas@gnu.org> | 2000-03-17 17:21:02 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 2000-03-17 17:21:02 +0000 |
commit | ed1d3f38812f06fcc85ff3fc60785b2193fa08a5 (patch) | |
tree | 04b5b9afee694f2aa16f15d5693c6b452acd0a19 /libdiskfs | |
parent | bde9c6f42327e37103f1fdd5381438536005b701 (diff) |
2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
* boot-start.c (diskfs_S_fsys_init, diskfs_start_bootstrap): Don't
use MOVE_SEND in Hurd RPC.
* file-exec.c (diskfs_S_file_exec): Don't use MAKE_SEND in Hurd
RPC.
* init-startup.c (diskfs_startup_diskfs, _diskfs_init_completed):
Likewise.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/ChangeLog | 10 | ||||
-rw-r--r-- | libdiskfs/boot-start.c | 6 | ||||
-rw-r--r-- | libdiskfs/file-exec.c | 7 | ||||
-rw-r--r-- | libdiskfs/init-startup.c | 15 |
4 files changed, 28 insertions, 10 deletions
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index f5bfd980..19770250 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,13 @@ +2000-03-17 Thomas Bushnell, BSG <tb@mit.edu> + + * boot-start.c (diskfs_S_fsys_init, diskfs_start_bootstrap): Don't + use MOVE_SEND in Hurd RPC. + + * file-exec.c (diskfs_S_file_exec): Don't use MAKE_SEND in Hurd + RPC. + * init-startup.c (diskfs_startup_diskfs, _diskfs_init_completed): + Likewise. + 2000-03-17 Roland McGrath <roland@baalperazim.frob.com> * dir-lookup.c (diskfs_S_dir_lookup): Use ports_get_send_right. diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c index 2b357541..829994d1 100644 --- a/libdiskfs/boot-start.c +++ b/libdiskfs/boot-start.c @@ -181,7 +181,8 @@ diskfs_start_bootstrap () assert (retry_name[0] == '\0'); assert (execnode != MACH_PORT_NULL); err = file_set_translator (execnode, 0, FS_TRANS_SET, 0, 0, 0, - diskfs_exec_ctl, MACH_MSG_TYPE_MOVE_SEND); + diskfs_exec_ctl, MACH_MSG_TYPE_COPY_SEND); + mach_port_deallocate (mach_task_self (), diskfs_exec_ctl); mach_port_deallocate (mach_task_self (), execnode); assert_perror (err); } @@ -546,8 +547,9 @@ diskfs_S_fsys_init (mach_port_t port, RPC of its own, as init would have sent it. */ err = task_get_bootstrap_port (mach_task_self (), &bootstrap); assert_perror (err); - err = fsys_init (bootstrap, parent_proc, MACH_MSG_TYPE_MOVE_SEND, + err = fsys_init (bootstrap, parent_proc, MACH_MSG_TYPE_COPY_SEND, authhandle); + mach_port_deallocate (mach_task_self (), parent_proc); mach_port_deallocate (mach_task_self (), bootstrap); assert_perror (err); } diff --git a/libdiskfs/file-exec.c b/libdiskfs/file-exec.c index 451854ab..13afb7a9 100644 --- a/libdiskfs/file-exec.c +++ b/libdiskfs/file-exec.c @@ -57,6 +57,8 @@ diskfs_S_file_exec (struct protid *cred, mach_port_t execserver; int cached_exec; struct hurd_userlink ulink; + mach_port_t right; + #define RETURN(code) do { err = (code); goto out; } while (0) if (!cred) @@ -150,15 +152,16 @@ diskfs_S_file_exec (struct protid *cred, { do { + right = ports_get_send_right (newpi); err = exec_exec (execserver, - ports_get_right (newpi), - MACH_MSG_TYPE_MAKE_SEND, + right, MACH_MSG_TYPE_COPY_SEND, task, flags, argv, argvlen, envp, envplen, fds, MACH_MSG_TYPE_COPY_SEND, fdslen, portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen, intarray, intarraylen, deallocnames, deallocnameslen, destroynames, destroynameslen); + mach_port_deallocate (mach_task_self (), newpi) if (err == MACH_SEND_INVALID_DEST) { if (cached_exec) diff --git a/libdiskfs/init-startup.c b/libdiskfs/init-startup.c index 0b0b8d5f..98e39ea1 100644 --- a/libdiskfs/init-startup.c +++ b/libdiskfs/init-startup.c @@ -1,5 +1,5 @@ /* diskfs_startup_diskfs -- advertise our fsys control port to our parent FS. - Copyright (C) 1994, 1995, 1996, 1998, 1999 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000 Free Software Foundation This file is part of the GNU Hurd. @@ -32,7 +32,7 @@ char *_diskfs_chroot_directory; mach_port_t diskfs_startup_diskfs (mach_port_t bootstrap, int flags) { - mach_port_t realnode; + mach_port_t realnode, right; struct port_info *newpi; if (_diskfs_chroot_directory != NULL) @@ -89,8 +89,10 @@ diskfs_startup_diskfs (mach_port_t bootstrap, int flags) sizeof (struct port_info), &newpi); if (! errno) { - errno = fsys_startup (bootstrap, flags, ports_get_right (newpi), - MACH_MSG_TYPE_MAKE_SEND, &realnode); + right = ports_get_send_right (newpi); + errno = fsys_startup (bootstrap, flags, right, + MACH_MSG_TYPE_COPY_SEND, &realnode); + mach_port_deallocate (mach_task_self (), newpi); ports_port_deref (newpi); } if (errno) @@ -186,12 +188,13 @@ _diskfs_init_completed () if (err) goto errout; - notify = ports_get_right (pi); + notify = ports_get_send_right (pi); ports_port_deref (pi); asprintf (&name, "%s %s", program_invocation_short_name, diskfs_disk_name ?: "-"); err = startup_request_notification (init, notify, - MACH_MSG_TYPE_MAKE_SEND, name); + MACH_MSG_TYPE_COPY_SEND, name); + mach_port_deallocate (mach_task_self (), notify); free (name); if (err) goto errout; |