From: deraadt Date: Sun, 6 Apr 1997 20:59:40 +0000 (+0000) Subject: bad dkpart(), bad dkunit(), bad bad bad X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6daf152e2693a87a18866a504da1f70e0cecd712;p=openbsd bad dkpart(), bad dkunit(), bad bad bad --- diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index a7b7e2b6944..753036c5e8a 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.11 1997/02/24 14:19:57 niklas Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.12 1997/04/06 20:59:40 deraadt Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -173,11 +173,6 @@ insert: bp->b_actf = bq->b_actf; bq->b_actf = bp; } -/* encoding of disk minor numbers, should be elsewhere... */ -#define dkunit(dev) (minor(dev) >> 3) -#define dkpart(dev) (minor(dev) & 07) -#define dkminor(unit, part) (((unit) << 3) | (part)) - /* * Compute checksum for disk label. */ @@ -216,7 +211,7 @@ diskerr(bp, dname, what, pri, blkdone, lp) int pri, blkdone; register struct disklabel *lp; { - int unit = dkunit(bp->b_dev), part = dkpart(bp->b_dev); + int unit = DISKUNIT(bp->b_dev), part = DISKPART(bp->b_dev); register int (*pr) __P((const char *, ...)); char partname = 'a' + part; int sn;