[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] libmachdev: Add resume for bootstrap server
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 2/5] libmachdev: Add resume for bootstrap server |
Date: |
Fri, 24 Jul 2020 15:50:45 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Hello,
Thanks for using send-email, that makes the review way easier.
Samuel
Damien Zammit, le ven. 24 juil. 2020 23:20:36 +1000, a ecrit:
> @@ -94,11 +95,8 @@ ds_device_open (mach_port_t open_port, mach_port_t
> reply_port,
> char *name, device_t *devp, mach_msg_type_name_t *devicePoly)
> {
> int i;
> - io_return_t err;
> -
> - /* Open must be called on the master device port. */
> - if (!machdev_is_master_device (open_port))
> - return D_INVALID_OPERATION;
> + mach_port_t dev_master;
> + io_return_t err = D_NO_SUCH_DEVICE;
What about my comment on keeping the machdev_is_master_device call? I
see on IRC that you had troubles with this, but I believe we want to
fix it, not drop it.
> +/* Override the privileged ports for booting the system */
> +kern_return_t
> +trivfs_S_fsys_getpriv (struct diskfs_control *init_bootstrap_port,
> + mach_port_t reply, mach_msg_type_name_t reply_type,
> + mach_port_t *host_priv, mach_msg_type_name_t *hp_type,
> + mach_port_t *dev_master, mach_msg_type_name_t
> *dm_type,
> + mach_port_t *fstask, mach_msg_type_name_t *task_type)
> +{
> + error_t err;
> + mach_port_t right;
> + struct port_info *server_info;
> +
> + err = ports_create_port (trivfs_protid_class, port_bucket,
> + sizeof (struct port_info), &server_info);
This returns a port in the trivfs_protid_class, so that should be
getting accepted by machdev_is_master_device.
Samuel
- [PATCH 1/5] libmachdev: Remove deviceUser, this lib is a deviceServer, Damien Zammit, 2020/07/24
- [PATCH 2/5] libmachdev: Add resume for bootstrap server, Damien Zammit, 2020/07/24
- Re: [PATCH 2/5] libmachdev: Add resume for bootstrap server,
Samuel Thibault <=
- [PATCH 3/5] Makeconf: Add mach_i386 defs, Damien Zammit, 2020/07/24
- [PATCH 4/5] libmachdev: Implement S_i386_io_perm_create, Damien Zammit, 2020/07/24
- [PATCH 5/5] rumpdisk: Use bootstrap resume of fs task in machdev, Damien Zammit, 2020/07/24
- Re: [PATCH 1/5] libmachdev: Remove deviceUser, this lib is a deviceServer, Samuel Thibault, 2020/07/24