diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-04-04 20:36:57 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-04-04 20:54:31 +0200 |
commit | a79dc8ecbbcd8cadaa1036b8e5ca6e978bbf75c3 (patch) | |
tree | 12c0c0bacd6fff64bb2dbe426cc054f87a8553ec /libmachdev | |
parent | 651df2e03f3eb2fcca3446174625dda77b94bcc6 (diff) | |
download | hurd-a79dc8ecbbcd8cadaa1036b8e5ca6e978bbf75c3.tar.gz hurd-a79dc8ecbbcd8cadaa1036b8e5ca6e978bbf75c3.tar.bz2 hurd-a79dc8ecbbcd8cadaa1036b8e5ca6e978bbf75c3.zip |
libmachdev: Fix non-bootstrap translator startup
* libmachdev/trivfs_server.c (machdev_trivfs_init): Call fsys_getpriv
only when bootstrapping.
Diffstat (limited to 'libmachdev')
-rw-r--r-- | libmachdev/trivfs_server.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index 1c5d53ad..4d9b415d 100644 --- a/libmachdev/trivfs_server.c +++ b/libmachdev/trivfs_server.c @@ -392,6 +392,8 @@ trivfs_S_fsys_getpriv (struct diskfs_control *init_bootstrap_port, error_t err; mach_port_t right; + /* FIXME: check init_bootstrap_port */ + right = ports_get_send_right (&control->pi); err = get_privileged_ports (host_priv, NULL); if (!err) @@ -453,7 +455,18 @@ machdev_trivfs_init(int argc, char **argv, mach_port_t bootstrap_resume_task, if (mybootstrap) { *bootstrap = mybootstrap; - fsys_getpriv (*bootstrap, &_hurd_host_priv, &_hurd_device_master, &parent_task); + + if (bootstrap_resume_task != MACH_PORT_NULL) + { + mach_port_t host_priv; + mach_port_t device_master; + + if (fsys_getpriv (*bootstrap, &host_priv, &device_master, &parent_task) == 0) + { + _hurd_host_priv = host_priv; + _hurd_device_master = device_master; + } + } } if (bootstrap_resume_task != MACH_PORT_NULL) |