diff options
author | Damien Zammit <damien@zamaudio.com> | 2021-04-04 13:37:50 +1000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-04-04 16:16:26 +0200 |
commit | bef0f49eff0eb113e551b7cf1f552364f8d805c7 (patch) | |
tree | 2e53daaf3b0e94a3a7456253bb7903630d1f65dc /libmachdev | |
parent | 5ff1e40ee5fd2262192f7819b6de59d16993c5a2 (diff) | |
download | hurd-bef0f49eff0eb113e551b7cf1f552364f8d805c7.tar.gz hurd-bef0f49eff0eb113e551b7cf1f552364f8d805c7.tar.bz2 hurd-bef0f49eff0eb113e551b7cf1f552364f8d805c7.zip |
machdev: Pass argv through to _hurd_init
Message-Id: <20210404033750.143411-1-damien@zamaudio.com>
Diffstat (limited to 'libmachdev')
-rw-r--r-- | libmachdev/machdev.h | 2 | ||||
-rw-r--r-- | libmachdev/trivfs_server.c | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/libmachdev/machdev.h b/libmachdev/machdev.h index 8f613b35..5d0eed02 100644 --- a/libmachdev/machdev.h +++ b/libmachdev/machdev.h @@ -33,7 +33,7 @@ void machdev_device_init(void); void machdev_device_shutdown(mach_port_t dosync_handle); void * machdev_server(void *); error_t machdev_create_device_port (size_t size, void *result); -int machdev_trivfs_init(mach_port_t bootstrap_resume_task, const char *name, const char *path, mach_port_t *bootstrap); +int machdev_trivfs_init(int argc, char **argv, mach_port_t bootstrap_resume_task, const char *name, const char *path, mach_port_t *bootstrap); void machdev_trivfs_server(mach_port_t bootstrap); boolean_t machdev_is_master_device (mach_port_t port); diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index 60711348..1c5d53ad 100644 --- a/libmachdev/trivfs_server.c +++ b/libmachdev/trivfs_server.c @@ -76,12 +76,14 @@ static char *devnode; /* Startup and shutdown notifications management */ struct port_class *machdev_shutdown_notify_class; - static void arrange_shutdown_notification (void); /* Our parent's task, if applicable */ static task_t parent_task; +/* Our argument vector */ +static char **machdev_argv; + static void install_as_translator (mach_port_t bootport) { @@ -315,7 +317,7 @@ trivfs_S_fsys_init (struct trivfs_control *fsys, portarray[INIT_PORT_AUTH] = authhandle; portarray[INIT_PORT_CRDIR] = root; portarray[INIT_PORT_CWDIR] = root; - _hurd_init (0, NULL, portarray, INIT_PORT_MAX, NULL, 0); + _hurd_init (0, machdev_argv, portarray, INIT_PORT_MAX, NULL, 0); /* Mark us as important. */ proc = getproc (); @@ -434,8 +436,8 @@ resume_bootstrap_server(mach_port_t server_task, const char *server_name) } int -machdev_trivfs_init(mach_port_t bootstrap_resume_task, const char *name, const char *path, - mach_port_t *bootstrap) +machdev_trivfs_init(int argc, char **argv, mach_port_t bootstrap_resume_task, + const char *name, const char *path, mach_port_t *bootstrap) { mach_port_t mybootstrap = MACH_PORT_NULL; port_bucket = ports_create_bucket (); @@ -445,6 +447,7 @@ machdev_trivfs_init(mach_port_t bootstrap_resume_task, const char *name, const c trivfs_protid_class, 0, &control); *bootstrap = MACH_PORT_NULL; + machdev_argv = argv; task_get_bootstrap_port (mach_task_self (), &mybootstrap); if (mybootstrap) |