[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH hurd] rumpdisk: Include complete USB stack to enable mass sto
From: |
Damien Zammit |
Subject: |
Re: [PATCH hurd] rumpdisk: Include complete USB stack to enable mass storage driver |
Date: |
Tue, 27 Jun 2023 09:24:54 +0000 |
Hi,
On 26/6/23 02:41, Samuel Thibault wrote:
> We also need /dev entries. It happens that this re-uses /dev/sd*
> names, so we need to care about compatibility. We probably want
> rumpdisk_device_open to forward to the kernel when 'disabled' is true.
Doesn't libmachdev do this for us already?
/* Call each emulation's open routine to find the device. */
for (i = 0; i < num_emul; i++)
{
err = (*emulation_list[i]->open) (reply_port, reply_port_type,
mode, name, devp, devicePoly);
if (err != D_NO_SUCH_DEVICE)
break;
}
/* Fall back to opening kernel device master */
if (err)
{
err = get_privileged_ports(NULL, &dev_master);
if (!err)
err = device_open (dev_master, mode, name, devp);
if (!err)
*devicePoly = MACH_MSG_TYPE_MOVE_SEND;
}
Damien