Gianluca Guida, le Sun 08 Jan 2006 19:18:52 +0100, a écrit :
> On 1/8/06, Samuel Thibault <[EMAIL PROTECTED]> wrote:
> > 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():
>
> Ok. The patch is functionally OK. Only thing I ask is that you add
> some comment at each #if i386 specifying that it's for device
> emulation layer.
Ok, here it is
2006-01-08 Samuel Thibault <[EMAIL PROTECTED]>
* iopb.c(i386_io_port_add): Fix getting device parameter.
(i386_io_port_remove): Same as above.
diff -u -r1.1.1.1 iopb.c
--- i386/i386/iopb.c 25 Feb 1997 21:27:09 -0000 1.1.1.1
+++ i386/i386/iopb.c 8 Jan 2006 18:29:28 -0000
@@ -307,12 +307,23 @@
/*
* Add an IO mapping to a thread.
*/
+#ifdef i386
+kern_return_t
+i386_io_port_add(
+ thread_t thread,
+ device_t d)
+#else
kern_return_t
i386_io_port_add(
thread_t thread,
mach_device_t device)
+#endif
{
pcb_t pcb;
+#ifdef i386
+ /* I386 uses device emulation layer. */
+ mach_device_t device = d->emul_data;
+#endif
iopb_tss_t io_tss, new_io_tss;
io_port_t io_port;
io_use_t iu, old_iu;
@@ -406,12 +417,23 @@
/*
* Remove an IO mapping from a thread.
*/
+#ifdef i386
+kern_return_t
+i386_io_port_remove(thread, d)
+ thread_t thread;
+ device_t d;
+#else
kern_return_t
i386_io_port_remove(thread, device)
thread_t thread;
mach_device_t device;
+#endif
{
pcb_t pcb;
+#ifdef i386
+ /* I386 uses device emulation layer. */
+ mach_device_t device = d->emul_data;
+#endif
iopb_tss_t io_tss;
io_port_t io_port;
io_use_t iu;
_______________________________________________
Bug-hurd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-hurd