diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-12-25 20:57:00 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-12-25 20:57:00 +0000 |
commit | 7fdd0b4f5f1150954e76eae066b86bdec5c40fb5 (patch) | |
tree | aac171e2a3c49267c1817fda922de073377c1abd /sys | |
parent | 7ab7d0b1d1e067c9900725b57ccd0964daa1ff60 (diff) |
Turn xxUNIT, xxPARt, xxLABELDEV macro names into uppercase.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/dev/hd.c | 40 | ||||
-rw-r--r-- | sys/arch/hp300/dev/hdvar.h | 8 | ||||
-rw-r--r-- | sys/arch/hp300/dev/sd.c | 40 | ||||
-rw-r--r-- | sys/arch/hp300/dev/sdvar.h | 8 |
4 files changed, 48 insertions, 48 deletions
diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index 359ca0cc3e1..5db78c6702b 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.19 2002/12/10 23:33:08 miod Exp $ */ +/* $OpenBSD: hd.c,v 1.20 2002/12/25 20:56:59 miod Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -523,7 +523,7 @@ hdgetinfo(dev, rs, lp, spoofonly) /* * Now try to read the disklabel */ - errstring = readdisklabel(hdlabdev(dev), hdstrategy, lp, NULL, + errstring = readdisklabel(HDLABELDEV(dev), hdstrategy, lp, NULL, spoofonly); if (errstring) { printf("%s: WARNING: %s, defining `c' partition as entire disk\n", @@ -547,7 +547,7 @@ hdopen(dev, flags, mode, p) int flags, mode; struct proc *p; { - int unit = hdunit(dev); + int unit = HDUNIT(dev); struct hd_softc *rs; int error, mask, part; @@ -576,7 +576,7 @@ hdopen(dev, flags, mode, p) return(error); } - part = hdpart(dev); + part = HDPART(dev); mask = 1 << part; /* Check that the partition exists. */ @@ -606,12 +606,12 @@ hdclose(dev, flag, mode, p) int flag, mode; struct proc *p; { - int unit = hdunit(dev); + int unit = HDUNIT(dev); struct hd_softc *rs = hd_cd.cd_devs[unit]; struct disk *dk = &rs->sc_dkdev; int mask, s; - mask = 1 << hdpart(dev); + mask = 1 << HDPART(dev); if (mode == S_IFCHR) dk->dk_copenmask &= ~mask; else @@ -642,7 +642,7 @@ void hdstrategy(bp) struct buf *bp; { - int unit = hdunit(bp->b_dev); + int unit = HDUNIT(bp->b_dev); struct hd_softc *rs = hd_cd.cd_devs[unit]; struct buf *dp = &rs->sc_tab; struct partition *pinfo; @@ -658,12 +658,12 @@ hdstrategy(bp) #endif bn = bp->b_blkno; sz = howmany(bp->b_bcount, DEV_BSIZE); - pinfo = &rs->sc_dkdev.dk_label->d_partitions[hdpart(bp->b_dev)]; + pinfo = &rs->sc_dkdev.dk_label->d_partitions[HDPART(bp->b_dev)]; /* Don't perform partition translation on RAW_PART. */ - offset = (hdpart(bp->b_dev) == RAW_PART) ? 0 : pinfo->p_offset; + offset = (HDPART(bp->b_dev) == RAW_PART) ? 0 : pinfo->p_offset; - if (hdpart(bp->b_dev) != RAW_PART) { + if (HDPART(bp->b_dev) != RAW_PART) { /* * XXX This block of code belongs in * XXX bounds_check_with_label() @@ -774,7 +774,7 @@ again: printf("hdstart(%s): bp %p, %c\n", rs->sc_dev.dv_xname, bp, (bp->b_flags & B_READ) ? 'R' : 'W'); #endif - part = hdpart(bp->b_dev); + part = HDPART(bp->b_dev); rs->sc_flags |= HDF_SEEK; rs->sc_ioc.c_unit = C_SUNIT(rs->sc_punit); rs->sc_ioc.c_volume = C_SVOL(0); @@ -1034,7 +1034,7 @@ hderror(unit) * we just use b_blkno. */ bp = rs->sc_tab.b_actf; - pbn = rs->sc_dkdev.dk_label->d_partitions[hdpart(bp->b_dev)].p_offset; + pbn = rs->sc_dkdev.dk_label->d_partitions[HDPART(bp->b_dev)].p_offset; if ((sp->c_fef & FEF_CU) || (sp->c_fef & FEF_DR) || (sp->c_ief & IEF_RRMASK)) { hwbn = HDBTOS(pbn + bp->b_blkno); @@ -1050,7 +1050,7 @@ hderror(unit) * of the transfer, not necessary where the error occurred. */ printf("%s%c: hard error sn%d\n", rs->sc_dev.dv_xname, - 'a'+hdpart(bp->b_dev), pbn); + 'a'+HDPART(bp->b_dev), pbn); /* * Now report the status as returned by the hardware with * attempt at interpretation (unless debugging). @@ -1119,7 +1119,7 @@ hdioctl(dev, cmd, data, flag, p) int flag; struct proc *p; { - int unit = hdunit(dev); + int unit = HDUNIT(dev); struct hd_softc *sc = hd_cd.cd_devs[unit]; struct disklabel *lp = sc->sc_dkdev.dk_label; int error, flags; @@ -1136,7 +1136,7 @@ hdioctl(dev, cmd, data, flag, p) case DIOCGPART: ((struct partinfo *)data)->disklab = lp; ((struct partinfo *)data)->part = - &lp->d_partitions[hdpart(dev)]; + &lp->d_partitions[HDPART(dev)]; return (0); case DIOCWLABEL: @@ -1167,7 +1167,7 @@ hdioctl(dev, cmd, data, flag, p) return (error); flags = sc->sc_flags; sc->sc_flags = HDF_ALIVE | HDF_WLABEL; - error = writedisklabel(hdlabdev(dev), hdstrategy, lp, + error = writedisklabel(HDLABELDEV(dev), hdstrategy, lp, (struct cpu_disklabel *)0); sc->sc_flags = flags; return (error); @@ -1179,7 +1179,7 @@ int hdsize(dev) dev_t dev; { - int unit = hdunit(dev); + int unit = HDUNIT(dev); struct hd_softc *rs; int psize, didopen = 0; @@ -1198,7 +1198,7 @@ hdsize(dev) return(-1); didopen = 1; } - psize = rs->sc_dkdev.dk_label->d_partitions[hdpart(dev)].p_size * + psize = rs->sc_dkdev.dk_label->d_partitions[HDPART(dev)].p_size * (rs->sc_dkdev.dk_label->d_secsize / DEV_BSIZE); if (didopen) (void) hdclose(dev, FREAD|FWRITE, S_IFBLK, NULL); @@ -1255,8 +1255,8 @@ hddump(dev, blkno, va, size) hddoingadump = 1; /* Decompose unit and partition. */ - unit = hdunit(dev); - part = hdpart(dev); + unit = HDUNIT(dev); + part = HDPART(dev); /* Make sure dump device is ok. */ if (unit >= hd_cd.cd_ndevs || diff --git a/sys/arch/hp300/dev/hdvar.h b/sys/arch/hp300/dev/hdvar.h index 2ef6c939d25..a69b31f3d18 100644 --- a/sys/arch/hp300/dev/hdvar.h +++ b/sys/arch/hp300/dev/hdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hdvar.h,v 1.3 2001/05/01 16:51:09 millert Exp $ */ +/* $OpenBSD: hdvar.h,v 1.4 2002/12/25 20:56:59 miod Exp $ */ /* $NetBSD: rdvar.h,v 1.6 1997/01/30 09:14:19 thorpej Exp $ */ /* @@ -92,9 +92,9 @@ struct hd_softc { #define HDF_WANTED 0x20 #define HDF_WLABEL 0x40 -#define hdunit(x) DISKUNIT(x) -#define hdpart(x) DISKPART(x) -#define hdlabdev(d) MAKEDISKDEV(major(d), hdunit(d), RAW_PART) +#define HDUNIT(x) DISKUNIT(x) +#define HDPART(x) DISKPART(x) +#define HDLABELDEV(d) MAKEDISKDEV(major(d), HDUNIT(d), RAW_PART) #define b_cylin b_resid diff --git a/sys/arch/hp300/dev/sd.c b/sys/arch/hp300/dev/sd.c index 5029530c2ab..2589175dd23 100644 --- a/sys/arch/hp300/dev/sd.c +++ b/sys/arch/hp300/dev/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.27 2002/12/25 20:40:36 miod Exp $ */ +/* $OpenBSD: sd.c,v 1.28 2002/12/25 20:56:59 miod Exp $ */ /* $NetBSD: sd.c,v 1.34 1997/07/10 18:14:10 kleink Exp $ */ /* @@ -483,7 +483,7 @@ sdgetinfo(dev, sc, lp, spoofonly) lp->d_magic2 = DISKMAGIC; lp->d_checksum = dkcksum(lp); - errstring = readdisklabel(sdlabdev(dev), sdstrategy, lp, NULL, + errstring = readdisklabel(SDLABELDEV(dev), sdstrategy, lp, NULL, spoofonly); } @@ -509,7 +509,7 @@ sdopen(dev, flags, mode, p) int flags, mode; struct proc *p; { - int unit = sdunit(dev); + int unit = SDUNIT(dev); struct sd_softc *sc; int error, mask, part; @@ -538,7 +538,7 @@ sdopen(dev, flags, mode, p) return(error); } - part = sdpart(dev); + part = SDPART(dev); mask = 1 << part; /* Check that the partition exists. */ @@ -568,12 +568,12 @@ sdclose(dev, flag, mode, p) int flag, mode; struct proc *p; { - int unit = sdunit(dev); + int unit = SDUNIT(dev); struct sd_softc *sc = sd_cd.cd_devs[unit]; struct disk *dk = &sc->sc_dkdev; int mask, s; - mask = 1 << sdpart(dev); + mask = 1 << SDPART(dev); if (mode == S_IFCHR) dk->dk_copenmask &= ~mask; else @@ -615,7 +615,7 @@ sdlblkstrat(bp, bsize) struct buf *bp; int bsize; { - struct sd_softc *sc = sd_cd.cd_devs[sdunit(bp->b_dev)]; + struct sd_softc *sc = sd_cd.cd_devs[SDUNIT(bp->b_dev)]; struct buf *cbp = (struct buf *)malloc(sizeof(struct buf), M_DEVBUF, M_WAITOK); caddr_t cbuf = (caddr_t)malloc(bsize, M_DEVBUF, M_WAITOK); @@ -705,7 +705,7 @@ void sdstrategy(bp) struct buf *bp; { - int unit = sdunit(bp->b_dev); + int unit = SDUNIT(bp->b_dev); struct sd_softc *sc = sd_cd.cd_devs[unit]; struct buf *dp = &sc->sc_tab; struct partition *pinfo; @@ -726,12 +726,12 @@ sdstrategy(bp) } bn = bp->b_blkno; sz = howmany(bp->b_bcount, DEV_BSIZE); - pinfo = &sc->sc_dkdev.dk_label->d_partitions[sdpart(bp->b_dev)]; + pinfo = &sc->sc_dkdev.dk_label->d_partitions[SDPART(bp->b_dev)]; /* Don't perform partition translation on RAW_PART. */ - offset = (sdpart(bp->b_dev) == RAW_PART) ? 0 : pinfo->p_offset; + offset = (SDPART(bp->b_dev) == RAW_PART) ? 0 : pinfo->p_offset; - if (sdpart(bp->b_dev) != RAW_PART) { + if (SDPART(bp->b_dev) != RAW_PART) { /* * XXX This block of code belongs in * XXX bounds_check_with_label() @@ -1021,7 +1021,7 @@ sdread(dev, uio, flags) struct uio *uio; int flags; { - int unit = sdunit(dev); + int unit = SDUNIT(dev); struct sd_softc *sc = sd_cd.cd_devs[unit]; int pid; @@ -1038,7 +1038,7 @@ sdwrite(dev, uio, flags) struct uio *uio; int flags; { - int unit = sdunit(dev); + int unit = SDUNIT(dev); struct sd_softc *sc = sd_cd.cd_devs[unit]; int pid; @@ -1057,7 +1057,7 @@ sdioctl(dev, cmd, data, flag, p) int flag; struct proc *p; { - int unit = sdunit(dev); + int unit = SDUNIT(dev); struct sd_softc *sc = sd_cd.cd_devs[unit]; struct disklabel *lp = sc->sc_dkdev.dk_label; int error, flags; @@ -1074,7 +1074,7 @@ sdioctl(dev, cmd, data, flag, p) case DIOCGPART: ((struct partinfo *)data)->disklab = lp; ((struct partinfo *)data)->part = - &lp->d_partitions[sdpart(dev)]; + &lp->d_partitions[SDPART(dev)]; return (0); case DIOCWLABEL: @@ -1106,7 +1106,7 @@ sdioctl(dev, cmd, data, flag, p) return (error); flags = sc->sc_flags; sc->sc_flags = SDF_ALIVE | SDF_WLABEL; - error = writedisklabel(sdlabdev(dev), sdstrategy, lp, + error = writedisklabel(SDLABELDEV(dev), sdstrategy, lp, (struct cpu_disklabel *)0); sc->sc_flags = flags; return (error); @@ -1160,7 +1160,7 @@ int sdsize(dev) dev_t dev; { - int unit = sdunit(dev); + int unit = SDUNIT(dev); struct sd_softc *sc = sd_cd.cd_devs[unit]; int psize, didopen = 0; @@ -1179,7 +1179,7 @@ sdsize(dev) return(-1); didopen = 1; } - psize = sc->sc_dkdev.dk_label->d_partitions[sdpart(dev)].p_size * + psize = sc->sc_dkdev.dk_label->d_partitions[SDPART(dev)].p_size * (sc->sc_dkdev.dk_label->d_secsize / DEV_BSIZE); if (didopen) (void) sdclose(dev, FREAD|FWRITE, S_IFBLK, NULL); @@ -1214,8 +1214,8 @@ sddump(dev, blkno, va, size) sddoingadump = 1; /* Decompose unit and partition. */ - unit = sdunit(dev); - part = sdpart(dev); + unit = SDUNIT(dev); + part = SDPART(dev); /* Make sure device is ok. */ if (unit >= sd_cd.cd_ndevs || diff --git a/sys/arch/hp300/dev/sdvar.h b/sys/arch/hp300/dev/sdvar.h index 78813016d9f..5be443977c5 100644 --- a/sys/arch/hp300/dev/sdvar.h +++ b/sys/arch/hp300/dev/sdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sdvar.h,v 1.10 2002/03/14 01:26:30 millert Exp $ */ +/* $OpenBSD: sdvar.h,v 1.11 2002/12/25 20:56:59 miod Exp $ */ /* $NetBSD: sdvar.h,v 1.7 1997/03/31 07:40:07 scottr Exp $ */ /* @@ -74,9 +74,9 @@ struct sd_softc { #define SDF_RMEDIA 0x20 #define SDF_ERROR 0x40 -#define sdunit(x) DISKUNIT(x) -#define sdpart(x) DISKPART(x) -#define sdlabdev(d) MAKEDISKDEV(major(d), sdunit(d), RAW_PART) +#define SDUNIT(x) DISKUNIT(x) +#define SDPART(x) DISKPART(x) +#define SDLABELDEV(d) MAKEDISKDEV(major(d), SDUNIT(d), RAW_PART) #define b_cylin b_resid |