Damien Zammit, le dim. 26 juil. 2020 17:37:20 +1000, a ecrit:
> ---
>  libdiskfs/boot-start.c   | 11 +++++++
>  libdiskfs/init-startup.c | 64 +++++++++++++++++++++++++---------------
>  2 files changed, 52 insertions(+), 23 deletions(-)
> 
> diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
> index 29b8acc6..4fbd62c5 100644
> --- a/libdiskfs/boot-start.c
> +++ b/libdiskfs/boot-start.c
> @@ -518,7 +518,9 @@ diskfs_S_fsys_init (struct diskfs_control *pt,
>  
>    if (diskfs_exec_server_task != MACH_PORT_NULL)
>      {
> +      mach_port_t bootstrap;
>        process_t execprocess;
> +
>        err = proc_task2proc (procserver, diskfs_exec_server_task, 
> &execprocess);
>        assert_perror_backtrace (err);
>  
> @@ -531,7 +533,16 @@ diskfs_S_fsys_init (struct diskfs_control *pt,
>        HURD_PORT_USE (&_diskfs_exec_portcell,
>                    exec_init (port, authhandle,
>                               execprocess, MACH_MSG_TYPE_COPY_SEND));
> +
> +      /* Give the real bootstrap filesystem an fsys_init
> +      RPC of its own, as init would have sent it.  */
> +      err = task_get_bootstrap_port (mach_task_self (), &bootstrap);

Mmm, I think you want to check whether bootstrap is NULL? Otherwise a
boot without rump will crash?

> +      assert_perror_backtrace (err);
> +      err = fsys_init (bootstrap, execprocess, MACH_MSG_TYPE_COPY_SEND,
> +                    authhandle);
>        mach_port_deallocate (mach_task_self (), execprocess);
> +      mach_port_deallocate (mach_task_self (), bootstrap);
> +      assert_perror_backtrace (err);
>  
>        /* We don't need this anymore. */
>        mach_port_deallocate (mach_task_self (), diskfs_exec_server_task);

Reply via email to