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