diff options
author | phk <phk@FreeBSD.org> | 2002-03-11 10:11:00 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-03-11 10:11:00 +0000 |
commit | 19d3c15d79e8215e01073c4a22de90f49ea49579 (patch) | |
tree | fdd55e826c31938ca97904c09605978f0671de7f /sys | |
parent | 9a5e4c88a3c8f122fd226c41249210b7d9a95ab7 (diff) | |
download | FreeBSD-src-19d3c15d79e8215e01073c4a22de90f49ea49579.zip FreeBSD-src-19d3c15d79e8215e01073c4a22de90f49ea49579.tar.gz |
Remove use of the bogus ioctl DIOCGPART.
It was used to initialize an unused variable, because ext2fs was
copy&pasted from UFS rather than copy,paste&cleaned from UFS.
Suggested by: bde
Diffstat (limited to 'sys')
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 12 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 12 |
2 files changed, 2 insertions, 22 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index e08b2f2..15a94d9 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -53,7 +53,6 @@ #include <sys/buf.h> #include <sys/conf.h> #include <sys/fcntl.h> -#include <sys/disklabel.h> #include <sys/malloc.h> #include <sys/stat.h> #include <sys/mutex.h> @@ -627,9 +626,7 @@ ext2_mountfs(devvp, mp, td) register struct ext2_sb_info *fs; struct ext2_super_block * es; dev_t dev = devvp->v_rdev; - struct partinfo dpart; - int havepart = 0; - int error, i, size; + int error, i; int ronly; /* @@ -655,13 +652,6 @@ ext2_mountfs(devvp, mp, td) VOP_UNLOCK(devvp, 0, td); if (error) return (error); - if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, td) != 0) - size = DEV_BSIZE; - else { - havepart = 1; - size = dpart.disklab->d_secsize; - } - bp = NULL; ump = NULL; if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0) diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index e08b2f2..15a94d9 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -53,7 +53,6 @@ #include <sys/buf.h> #include <sys/conf.h> #include <sys/fcntl.h> -#include <sys/disklabel.h> #include <sys/malloc.h> #include <sys/stat.h> #include <sys/mutex.h> @@ -627,9 +626,7 @@ ext2_mountfs(devvp, mp, td) register struct ext2_sb_info *fs; struct ext2_super_block * es; dev_t dev = devvp->v_rdev; - struct partinfo dpart; - int havepart = 0; - int error, i, size; + int error, i; int ronly; /* @@ -655,13 +652,6 @@ ext2_mountfs(devvp, mp, td) VOP_UNLOCK(devvp, 0, td); if (error) return (error); - if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, td) != 0) - size = DEV_BSIZE; - else { - havepart = 1; - size = dpart.disklab->d_secsize; - } - bp = NULL; ump = NULL; if ((error = bread(devvp, SBLOCK, SBSIZE, NOCRED, &bp)) != 0) |