Gianluca Guida, le Sun 08 Jan 2006 18:40:45 +0100, a écrit :
> On 1/8/06, Samuel Thibault <[EMAIL PROTECTED]> wrote:
> > I was not sure about this indeed. The caller here is actually all
> > drivers that call io_port_create()...
>
> What drivers and where?
./i386/i386at/kd.c: io_port_create(device, kd_port_list);
./i386/i386at/iopl.c: io_port_create(iopl_device, iopl_port_list);
> Can you be more precise about it? The more I look at the patch the
> less I understand what it is for.
The problem is that when opening a device (device_open), the port that
is returned to the user is &device->dev: see
device/ds_routines.c:device_open():
#ifdef i386
*device_p = &device->dev;
#else
*device_p = device;
#endif
And hence this is the port that the user gives to i386_io_port_add() ;
while io_port_create() always gets "device" for now, not "&device->dev",
so that the lookup fails.
Regards,
Samuel
_______________________________________________
Bug-hurd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-hurd