aboutsummaryrefslogtreecommitdiff
path: root/device/blkio.c
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2022-12-20 20:01:02 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-21 12:55:46 +0100
commit448889a4f0c32ba8ea61f870d4edcb0e0d58af85 (patch)
treecad56c7263667bb09096cc05c707130d3809544a /device/blkio.c
parent28ac48ba2371ad6f76f263e56dcf0090fe0d6087 (diff)
downloadgnumach-448889a4f0c32ba8ea61f870d4edcb0e0d58af85.tar.gz
gnumach-448889a4f0c32ba8ea61f870d4edcb0e0d58af85.tar.bz2
gnumach-448889a4f0c32ba8ea61f870d4edcb0e0d58af85.zip
Use -Wstrict-prototypes and fix warnings
Most of the changes include defining and using proper function type declarations (with argument types declared) and avoiding using the K&R style of function declarations. Message-Id: <Y6Jazsuis1QA0lXI@mars>
Diffstat (limited to 'device/blkio.c')
-rw-r--r--device/blkio.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/device/blkio.c b/device/blkio.c
index 7ec1f2cf..62fc6295 100644
--- a/device/blkio.c
+++ b/device/blkio.c
@@ -37,50 +37,6 @@
#include <device/ds_routines.h>
-
-io_return_t block_io(
- void (*strat)(),
- void (*max_count)(),
- io_req_t ior)
-{
- kern_return_t rc;
- boolean_t wait = FALSE;
-
- /*
- * Make sure the size is not too large by letting max_count
- * change io_count. If we are doing a write, then io_alloc_size
- * preserves the original io_count.
- */
- (*max_count)(ior);
-
- /*
- * If reading, allocate memory. If writing, wire
- * down the incoming memory.
- */
- if (ior->io_op & IO_READ)
- rc = device_read_alloc(ior, (vm_size_t)ior->io_count);
- else
- rc = device_write_get(ior, &wait);
-
- if (rc != KERN_SUCCESS)
- return (rc);
-
- /*
- * Queue the operation for the device.
- */
- (*strat)(ior);
-
- /*
- * The io is now queued. Wait for it if needed.
- */
- if (wait) {
- iowait(ior);
- return(D_SUCCESS);
- }
-
- return (D_IO_QUEUED);
-}
-
/*
* 'standard' max_count routine. VM continuations mean that this
* code can cope with arbitrarily-sized write operations (they won't be