diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-07-28 19:01:17 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-07-28 19:03:58 +0200 |
commit | b036b05d9ad0ba367b6c99a046364ec912416f85 (patch) | |
tree | b63b26fb0b9f0950f8b63ec1c58d2d1579c2ab26 /device | |
parent | cc0dffd12bbf19cc2f7f3480db4987b2dd9039b9 (diff) | |
download | gnumach-b036b05d9ad0ba367b6c99a046364ec912416f85.tar.gz gnumach-b036b05d9ad0ba367b6c99a046364ec912416f85.tar.bz2 gnumach-b036b05d9ad0ba367b6c99a046364ec912416f85.zip |
device: Fix d_mmap type
* device/conf.h (dev_ops): Make d_mmap return vm_offset_t instead of
int.
(nomap): Update accordingly.
* device/blkio.c (block_io_mmap): Likewise.
* device/blkio.h (block_io_mmap): Likewise.
* device/dev_name.c (nomap): Likewise.
* i386/i386at/kd.c (kdmmap): Likewise.
* i386/i386at/kd.h (kdmmap): Likewise.
* i386/i386at/mem.c (memmmap): Likewise.
* i386/i386at/mem.h (memmmap): Likewise.
* i386/i386at/model_dep.c (timemmap): Likewise.
* i386/i386at/model_dep.h (timemmap): Likewise.
Diffstat (limited to 'device')
-rw-r--r-- | device/blkio.c | 2 | ||||
-rw-r--r-- | device/blkio.h | 2 | ||||
-rw-r--r-- | device/conf.h | 4 | ||||
-rw-r--r-- | device/dev_name.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/device/blkio.c b/device/blkio.c index e5b4d09f..7ec1f2cf 100644 --- a/device/blkio.c +++ b/device/blkio.c @@ -101,7 +101,7 @@ void minphys(io_req_t ior) * Dummy routine placed in device switch entries to indicate that * block device may be mapped. */ -int block_io_mmap(dev_t dev, vm_offset_t off, int prot) +vm_offset_t block_io_mmap(dev_t dev, vm_offset_t off, int prot) { return (0); } diff --git a/device/blkio.h b/device/blkio.h index 77eb105a..aaff9f8a 100644 --- a/device/blkio.h +++ b/device/blkio.h @@ -19,6 +19,6 @@ #ifndef _DEVICE_BLKIO_H_ #define _DEVICE_BLKIO_H_ -extern int block_io_mmap(dev_t dev, vm_offset_t off, int prot); +extern vm_offset_t block_io_mmap(dev_t dev, vm_offset_t off, int prot); #endif /* _DEVICE_BLKIO_H_ */ diff --git a/device/conf.h b/device/conf.h index 14a23f97..1af00285 100644 --- a/device/conf.h +++ b/device/conf.h @@ -53,7 +53,7 @@ struct dev_ops { int (*d_write)(dev_t, io_req_t); /* write */ int (*d_getstat)(dev_t, dev_flavor_t, dev_status_t, mach_msg_type_number_t *); /* get status/control */ int (*d_setstat)(dev_t, dev_flavor_t, dev_status_t, mach_msg_type_number_t); /* set status/control */ - int (*d_mmap)(dev_t, vm_offset_t, vm_prot_t); /* map memory */ + vm_offset_t (*d_mmap)(dev_t, vm_offset_t, vm_prot_t); /* map memory */ int (*d_async_in)(); /* asynchronous input setup */ int (*d_reset)(); /* reset device */ int (*d_port_death)(dev_t, mach_port_t); @@ -76,7 +76,7 @@ extern io_return_t nulldev_getstat(dev_t dev, dev_flavor_t flavor, dev_status_t extern io_return_t nulldev_setstat(dev_t dev, dev_flavor_t flavor, dev_status_t data, mach_msg_type_number_t count); extern io_return_t nulldev_portdeath(dev_t dev, mach_port_t port); extern int nodev(void); /* no operation - error */ -extern int nomap(dev_t dev, vm_offset_t off, int prot); /* no operation - error */ +extern vm_offset_t nomap(dev_t dev, vm_offset_t off, int prot); /* no operation - error */ /* * Flavor constants for d_dev_info routine diff --git a/device/dev_name.c b/device/dev_name.c index 6036fb46..f6133679 100644 --- a/device/dev_name.c +++ b/device/dev_name.c @@ -83,10 +83,10 @@ int nodev(void) return (D_INVALID_OPERATION); } -int +vm_offset_t nomap(dev_t dev, vm_offset_t off, int prot) { - return (D_INVALID_OPERATION); + return -1; } /* |