[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/29] device/dev_pager.c: remove forward declaration
From: |
Marin Ramesa |
Subject: |
[PATCH 18/29] device/dev_pager.c: remove forward declaration |
Date: |
Mon, 9 Dec 2013 23:57:33 +0100 |
* Makefrag.am: Include device/blkio.h.
* device/blkio.h: New file.
Add copyright.
[_DEVICE_BLKIO_H_]: Add ifndef.
(block_io_mmap): Add prototype.
* device/dev_pager.c: Include device/blkio.h.
(block_io_mmap): Remove forward declaration.
---
Makefrag.am | 1 +
device/blkio.h | 24 ++++++++++++++++++++++++
device/dev_pager.c | 4 +---
3 files changed, 26 insertions(+), 3 deletions(-)
create mode 100644 device/blkio.h
diff --git a/Makefrag.am b/Makefrag.am
index 155635b..c1387bd 100644
--- a/Makefrag.am
+++ b/Makefrag.am
@@ -279,6 +279,7 @@ EXTRA_DIST += \
# TODO. Functions in device/subrs.c should each be moved elsewhere.
libkernel_a_SOURCES += \
device/blkio.c \
+ device/blkio.h \
device/buf.h \
device/chario.c \
device/chario.h \
diff --git a/device/blkio.h b/device/blkio.h
new file mode 100644
index 0000000..13a1669
--- /dev/null
+++ b/device/blkio.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2013 Free Software Foundation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _DEVICE_BLKIO_H_
+#define _DEVICE_BLKIO_H_
+
+extern vm_offset_t block_io_mmap(void);
+
+#endif /* _DEVICE_BLKIO_H_ */
diff --git a/device/dev_pager.c b/device/dev_pager.c
index 9f0e8e9..0c13376 100644
--- a/device/dev_pager.c
+++ b/device/dev_pager.c
@@ -56,9 +56,7 @@
#include <device/io_req.h>
#include <device/memory_object_reply.user.h>
#include <device/dev_pager.h>
-
-extern vm_offset_t block_io_mmap(); /* dummy routine to allow
- mmap for block devices */
+#include <device/blkio.h>
/*
* The device pager routines are called directly from the message
--
1.8.1.4
- Re: [PATCH 09/29] device/cirbuf.c (getc): use char instead of an unsigned char, (continued)
- [PATCH 10/29] device/cirbuf.c (cb_alloc): use vm_size_t instead of an int, Marin Ramesa, 2013/12/09
- [PATCH 11/29] device/cirbuf.c (cb_free): use vm_size_t instead of an int, Marin Ramesa, 2013/12/09
- [PATCH 12/29] device/cons.c: fix argument list, Marin Ramesa, 2013/12/09
- [PATCH 13/29] device/dev_pager.c (device_pager_data_request): remove forward declaration, Marin Ramesa, 2013/12/09
- [PATCH 14/29] device/dev_pager.c (device_pager_data_request): cast to (void *) instead to (char *), Marin Ramesa, 2013/12/09
- [PATCH 15/29] device/dev_pager.c (device_pager_data_request_done): check if io_count is larger or equal to zero and cast it to vm_size_t, Marin Ramesa, 2013/12/09
- [PATCH 16/29] device/dev_pager.c (device_pager_data_request_done): check if io_residual is larger or equal to zero and cast it to size_t, Marin Ramesa, 2013/12/09
- [PATCH 17/29] device/dev_pager.c (device_pager_data_request_done): remove unnecessary cast, Marin Ramesa, 2013/12/09
- [PATCH 18/29] device/dev_pager.c: remove forward declaration,
Marin Ramesa <=
- [PATCH 19/29] device/dev_pager.c: remove forward declarations, Marin Ramesa, 2013/12/09
- [PATCH 20/29] device/ds_routines.c: remove forward declaration, Marin Ramesa, 2013/12/09
- [PATCH 21/29] device/ds_routines.c (device_write_get): check if io_count is larger or equal to zero and cast it to size_t, Marin Ramesa, 2013/12/09
- [PATCH 22/29] device/kmsg.c (kmsgread): check if io_count is larger or equal to zero and cast it to vm_size_t, Marin Ramesa, 2013/12/09
- [PATCH 23/29] device/kmsg.c (kmsgread, kmsg_read_done): cast arguments to memcpy(), Marin Ramesa, 2013/12/09
- [PATCH 24/29] device/kmsg.c (kmsg_read_done): check if amt is negative, Marin Ramesa, 2013/12/09
- [PATCH 25/29] device/net_io.c: remove forward declarations, Marin Ramesa, 2013/12/09
- [PATCH 26/29] device/net_io.c (net_getstat): check if addr_byte_count is negative, Marin Ramesa, 2013/12/09