diff options
author | phk <phk@FreeBSD.org> | 1999-05-08 06:40:31 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-05-08 06:40:31 +0000 |
commit | 500e41bd7127ee03db75cd2a3704b8025c24e345 (patch) | |
tree | 8dc80d7dc8cd7f629dab45bcd87aa448cb9a4ca0 /sys/gnu/ext2fs/ext2_vfsops.c | |
parent | ed809a974db9e6d86dabb993b9b0c6c49e1bbf32 (diff) | |
download | FreeBSD-src-500e41bd7127ee03db75cd2a3704b8025c24e345.zip FreeBSD-src-500e41bd7127ee03db75cd2a3704b8025c24e345.tar.gz |
I got tired of seeing all the cdevsw[major(foo)] all over the place.
Made a new (inline) function devsw(dev_t dev) and substituted it.
Changed to the BDEV variant to this format as well: bdevsw(dev_t dev)
DEVFS will eventually benefit from this change too.
Diffstat (limited to 'sys/gnu/ext2fs/ext2_vfsops.c')
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index 4410199..43f8ead 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -136,9 +136,9 @@ ext2_mountroot() bzero((char *)mp, (u_long)sizeof(struct mount)); mp->mnt_op = &ext2fs_vfsops; mp->mnt_flag = MNT_RDONLY; - if (bdevsw(major(rootdev))->d_flags & D_NOCLUSTERR) + if (bdevsw(rootdev)->d_flags & D_NOCLUSTERR) mp->mnt_flag |= MNT_NOCLUSTERR; - if (bdevsw(major(rootdev))->d_flags & D_NOCLUSTERW) + if (bdevsw(rootdev)->d_flags & D_NOCLUSTERW) mp->mnt_flag |= MNT_NOCLUSTERW; if (error = ext2_mountfs(rootvp, mp, p)) { bsd_free(mp, M_MOUNT); @@ -201,9 +201,9 @@ ext2_mount(mp, path, data, ndp, p) ump = VFSTOUFS(mp); fs = ump->um_e2fs; error = 0; - if (bdevsw(major(ump->um_dev))->d_flags & D_NOCLUSTERR) + if (bdevsw(ump->um_dev)->d_flags & D_NOCLUSTERR) mp->mnt_flag |= MNT_NOCLUSTERR; - if (bdevsw(major(ump->um_dev))->d_flags & D_NOCLUSTERW) + if (bdevsw(ump->um_dev)->d_flags & D_NOCLUSTERW) mp->mnt_flag |= MNT_NOCLUSTERW; if (fs->s_rd_only == 0 && (mp->mnt_flag & MNT_RDONLY)) { flags = WRITECLOSE; @@ -277,7 +277,7 @@ ext2_mount(mp, path, data, ndp, p) return (ENOTBLK); } if (major(devvp->v_rdev) >= nblkdev || - bdevsw(major(devvp->v_rdev)) == NULL) { + bdevsw(devvp->v_rdev) == NULL) { vrele(devvp); return (ENXIO); } @@ -299,9 +299,9 @@ ext2_mount(mp, path, data, ndp, p) } if ((mp->mnt_flag & MNT_UPDATE) == 0) { - if (bdevsw(major(devvp->v_rdev))->d_flags & D_NOCLUSTERR) + if (bdevsw(devvp->v_rdev)->d_flags & D_NOCLUSTERR) mp->mnt_flag |= MNT_NOCLUSTERR; - if (bdevsw(major(devvp->v_rdev))->d_flags & D_NOCLUSTERW) + if (bdevsw(devvp->v_rdev)->d_flags & D_NOCLUSTERW) mp->mnt_flag |= MNT_NOCLUSTERW; error = ext2_mountfs(devvp, mp, p); } else { |