bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 29/29] device/subrs.c: use io_req_t instead of struct buf


From: Marin Ramesa
Subject: [PATCH 29/29] device/subrs.c: use io_req_t instead of struct buf
Date: Mon, 9 Dec 2013 23:57:44 +0100

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(-)

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);
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]