diff options
author | Marin Ramesa <mpr@hi.t-com.hr> | 2013-12-09 23:57:44 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-12-10 00:56:12 +0100 |
commit | af0c711a68e0ca4b8aa4e3e25fdf1f2206ec0911 (patch) | |
tree | d014fc3b09bfdfa8e16467b6a485c0bc7cba624a | |
parent | 8ae2160beab7e58c60265648b21b3c1754fe4989 (diff) |
device/subrs.c: use io_req_t instead of struct buf
Struct buf is not defined. Use io_req_t instead of it.
* device/subrs.c (harderr) (bp): Change name to ior and use io_req_t as type instead of (struct buf *).
(harderr) (minor): Use io_unit instead of b_dev.
(harderr): Use io_recnum instead of b_blkno.
(gateblk): Use io_req_t as return value instead of (struct buf *).
(brelse) (bp): Change name to ior and use io_req_t as type instead of (struct buf *).
(brelse) (ior): Remove variable.
-rw-r--r-- | device/subrs.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/device/subrs.c b/device/subrs.c index 0382bc6..0a7d690 100644 --- a/device/subrs.c +++ b/device/subrs.c @@ -40,15 +40,15 @@ /* * Print out disk name and block number for hard disk errors. */ -void harderr(bp, cp) - struct buf *bp; +void harderr(ior, cp) + io_req_t ior; char * cp; { printf("%s%d%c: hard error sn%d ", cp, - minor(bp->b_dev) >> 3, - 'a' + (minor(bp->b_dev) & 0x7), - bp->b_blkno); + minor(ior->io_unit) >> 3, + 'a' + (minor(ior->io_unit) & 0x7), + ior->io_recnum); } /* @@ -103,7 +103,7 @@ void wakeup(channel) thread_wakeup((event_t) channel); } -struct buf * +io_req_t geteblk(size) int size; { @@ -128,11 +128,9 @@ geteblk(size) return (ior); } -void brelse(bp) - struct buf *bp; +void brelse(ior) + io_req_t ior; { - io_req_t ior = bp; - (void) vm_deallocate(kernel_map, (vm_offset_t) ior->io_data, ior->io_alloc_size); |