[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/6] libmachdev: add, fix and use declaration for create_device_p
From: |
Justus Winter |
Subject: |
[PATCH 6/6] libmachdev: add, fix and use declaration for create_device_port |
Date: |
Sun, 13 Apr 2014 13:43:14 +0200 |
* libmachdev/ds_routines.c (create_device_port): Fix the type of the
size parameter. Make it return error_t.
* libmachdev/ds_routines.h (create_device_port): Add declaration.
* libmachdev/net.c: Include ds_routines.h.
* libmachdev/block.c: Include ds_routines.h.
---
libmachdev/block.c | 1 +
libmachdev/ds_routines.c | 3 ++-
libmachdev/ds_routines.h | 2 ++
libmachdev/net.c | 1 +
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/libmachdev/block.c b/libmachdev/block.c
index 756a07b..cd868d2 100644
--- a/libmachdev/block.c
+++ b/libmachdev/block.c
@@ -35,6 +35,7 @@
#include <ddekit/printf.h>
+#include "ds_routines.h"
#include "vm_param.h"
#include "device_reply_U.h"
#include "dev_hdr.h"
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
index 1da1393..6bd5a12 100644
--- a/libmachdev/ds_routines.c
+++ b/libmachdev/ds_routines.c
@@ -331,7 +331,8 @@ ds_device_map (struct mach_device *device, vm_prot_t prot,
vm_offset_t offset,
return D_INVALID_OPERATION;
}
-int create_device_port (int size, void *result)
+error_t
+create_device_port (size_t size, void *result)
{
return ports_create_port (dev_class, device_bucket,
size, result);
diff --git a/libmachdev/ds_routines.h b/libmachdev/ds_routines.h
index e314e80..3706aa5 100644
--- a/libmachdev/ds_routines.h
+++ b/libmachdev/ds_routines.h
@@ -52,4 +52,6 @@ boolean_t ds_write_done(io_req_t);
void iowait (io_req_t ior);
+error_t create_device_port (size_t size, void *result);
+
#endif /* DS_ROUTINES_H */
diff --git a/libmachdev/net.c b/libmachdev/net.c
index 6037e2f..07bb74a 100644
--- a/libmachdev/net.c
+++ b/libmachdev/net.c
@@ -70,6 +70,7 @@
#define MACH_INCLUDE
+#include "ds_routines.h"
#include "vm_param.h"
#include "device_reply_U.h"
#include "dev_hdr.h"
--
1.9.1
- more dde fixes, Justus Winter, 2014/04/13
- [PATCH 1/6] libmachdev: fix device_open, Justus Winter, 2014/04/13
- [PATCH 2/6] libmachdev: remove mach_device_deallocate, Justus Winter, 2014/04/13
- [PATCH 3/6] libmachdev: make the two port buckets clearly distinct, Justus Winter, 2014/04/13
- [PATCH 4/6] libmachdev: drop unused declarations, Justus Winter, 2014/04/13
- [PATCH 6/6] libmachdev: add, fix and use declaration for create_device_port,
Justus Winter <=
- [PATCH 5/6] libmachdev: add missing includes, Justus Winter, 2014/04/13