From af0c711a68e0ca4b8aa4e3e25fdf1f2206ec0911 Mon Sep 17 00:00:00 2001 From: Marin Ramesa Date: Mon, 9 Dec 2013 23:57:44 +0100 Subject: 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. --- device/subrs.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'device/subrs.c') diff --git a/device/subrs.c b/device/subrs.c index 0382bc65..0a7d690c 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); -- cgit v1.2.3