214 |
return EOPNOTSUPP; |
return EOPNOTSUPP; |
215 |
else |
else |
216 |
{ |
{ |
217 |
/* We pass in 0 for the OFFSET and SIZE argument because in many cases |
/* Note that older Mach drivers (through GNU Mach 1.x) ignore |
218 |
we can't supply them (devices that can't otherwise do I/O are often |
the OFFSET and SIZE parameters. The OSKit-Mach drivers obey |
219 |
still mappable) and mach ignores them entirely. XXXX */ |
them, and so the size we pass must be large enough (or zero |
220 |
error_t err = device_map (store->port, prot, 0, 0, memobj, 0); |
only if the size is indeterminable). If using only the newer |
221 |
|
drivers, we could remove the `start != 0' condition above and |
222 |
|
support kernel mapping of partial devices. However, since |
223 |
|
the older drivers silently ignore the OFFSET argument, that |
224 |
|
would produce scrambled results on old kernels. */ |
225 |
|
error_t err = device_map (store->port, prot, |
226 |
|
store->runs[0].start, |
227 |
|
store->runs[0].length, |
228 |
|
memobj, 0); |
229 |
if (err == ED_INVALID_OPERATION) |
if (err == ED_INVALID_OPERATION) |
230 |
err = EOPNOTSUPP; /* This device doesn't support paging. */ |
err = EOPNOTSUPP; /* This device doesn't support paging. */ |
231 |
return err; |
return err; |