aboutsummaryrefslogtreecommitdiff
path: root/device/ds_routines.c
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-01-19 14:22:12 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-19 23:32:30 +0100
commit4a1be513c08971b69d80f00478ade68cb25e7d3b (patch)
tree781ecf60fc7122b851223e94fded7e75454af077 /device/ds_routines.c
parentc7a84af651ae5cf2588c4a057564f9c2189846ef (diff)
downloadgnumach-4a1be513c08971b69d80f00478ade68cb25e7d3b.tar.gz
gnumach-4a1be513c08971b69d80f00478ade68cb25e7d3b.tar.bz2
gnumach-4a1be513c08971b69d80f00478ade68cb25e7d3b.zip
Include mig generated device headers to avoid missing prototypes
Some of the existing definitions lacked the const qualifier, which was added. Message-Id: <Y8mYZEKqWN43n2SA@mercury.tail36e24.ts.net>
Diffstat (limited to 'device/ds_routines.c')
-rw-r--r--device/ds_routines.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/device/ds_routines.c b/device/ds_routines.c
index 07cfd85b..e5dec6c7 100644
--- a/device/ds_routines.c
+++ b/device/ds_routines.c
@@ -84,6 +84,7 @@
#include <vm/vm_user.h>
#include <device/device_types.h>
+#include <device/device.server.h>
#include <device/dev_hdr.h>
#include <device/conf.h>
#include <device/io_req.h>
@@ -140,7 +141,7 @@ struct kmem_cache io_inband_cache;
io_return_t
ds_device_open (ipc_port_t open_port, ipc_port_t reply_port,
mach_msg_type_name_t reply_port_type, dev_mode_t mode,
- char *name, device_t *devp)
+ const_dev_name_t name, device_t *devp)
{
unsigned i;
io_return_t err;
@@ -206,7 +207,7 @@ io_return_t
ds_device_write_inband (device_t dev, ipc_port_t reply_port,
mach_msg_type_name_t reply_port_type,
dev_mode_t mode, recnum_t recnum,
- io_buf_ptr_inband_t data, unsigned count,
+ const io_buf_ptr_inband_t data, unsigned count,
int *bytes_written)
{
/* Refuse if device is dead or not completely open. */
@@ -245,7 +246,7 @@ ds_device_read (device_t dev, ipc_port_t reply_port,
io_return_t
ds_device_read_inband (device_t dev, ipc_port_t reply_port,
mach_msg_type_name_t reply_port_type, dev_mode_t mode,
- recnum_t recnum, int count, char *data,
+ recnum_t recnum, int count, io_buf_ptr_inband_t data,
unsigned *bytes_read)
{
/* Refuse if device is dead or not completely open. */
@@ -492,7 +493,7 @@ static io_return_t
device_open(const ipc_port_t reply_port,
mach_msg_type_name_t reply_port_type,
dev_mode_t mode,
- char * name,
+ const char * name,
device_t *device_p)
{
mach_device_t device;
@@ -826,7 +827,7 @@ device_write_inband(void *dev,
mach_msg_type_name_t reply_port_type,
dev_mode_t mode,
recnum_t recnum,
- io_buf_ptr_inband_t data,
+ const io_buf_ptr_inband_t data,
unsigned int data_count,
int *bytes_written)
{
@@ -849,7 +850,7 @@ device_write_inband(void *dev,
ior->io_op = IO_WRITE | IO_CALL | IO_INBAND;
ior->io_mode = mode;
ior->io_recnum = recnum;
- ior->io_data = data;
+ ior->io_data = (io_buf_ptr_t)data;
ior->io_count = data_count;
ior->io_total = data_count;
ior->io_alloc_size = 0;