aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2009-07-08 05:56:14 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2009-07-08 05:56:14 +0000
commitf43b57e32a9b8b21482eba2b3c870270f7556c2f (patch)
tree5caadd9b3e91865617319d5117cb5c08cd75adf6 /sys/geom
parent347e22a68b15792fae3f9a7efa0ba04566e38915 (diff)
downloadsrc-f43b57e32a9b8b21482eba2b3c870270f7556c2f.tar.gz
src-f43b57e32a9b8b21482eba2b3c870270f7556c2f.zip
Revert revisions 188839 and 188868. Use of the ioctl in geom_dev.c
is invalid because the ioctl happens without prior open. The ioctl got introduced to provide backward compatibility for extended partitions, but it ended up not being used because it didn't work as expected. Since there are no consumers of the ioctl and the implementation is broken, the best fix is to remove the code entirely. Spotted by: phk Approved by: re (kensmith)
Notes
Notes: svn path=/head/; revision=195436
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_dev.c12
-rw-r--r--sys/geom/part/g_part.c28
-rw-r--r--sys/geom/part/g_part_if.m9
3 files changed, 0 insertions, 49 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index b304c5135c4b..b40dea07fcb9 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -113,7 +113,6 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
{
struct g_geom *gp;
struct g_consumer *cp;
- char *alias;
int error;
struct cdev *dev;
@@ -135,17 +134,6 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
gp->softc = dev;
dev->si_drv1 = gp;
dev->si_drv2 = cp;
-
- g_topology_unlock();
-
- alias = g_malloc(MAXPATHLEN, M_WAITOK | M_ZERO);
- error = (pp->geom->ioctl == NULL) ? ENODEV :
- pp->geom->ioctl(pp, DIOCGPROVIDERALIAS, alias, 0, curthread);
- if (!error && alias[0] != '\0')
- make_dev_alias(dev, "%s", alias);
- g_free(alias);
-
- g_topology_lock();
return (gp);
}
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
index 68df8c40bc33..78c36501326b 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/bio.h>
-#include <sys/disk.h>
#include <sys/diskmbr.h>
#include <sys/endian.h>
#include <sys/kernel.h>
@@ -92,7 +91,6 @@ static g_taste_t g_part_taste;
static g_access_t g_part_access;
static g_dumpconf_t g_part_dumpconf;
-static g_ioctl_t g_part_ioctl;
static g_orphan_t g_part_orphan;
static g_spoiled_t g_part_spoiled;
static g_start_t g_part_start;
@@ -109,7 +107,6 @@ static struct g_class g_part_class = {
/* Geom methods. */
.access = g_part_access,
.dumpconf = g_part_dumpconf,
- .ioctl = g_part_ioctl,
.orphan = g_part_orphan,
.spoiled = g_part_spoiled,
.start = g_part_start,
@@ -1611,31 +1608,6 @@ g_part_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp,
}
}
-static int
-g_part_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag,
- struct thread *td)
-{
- struct g_geom *gp;
- struct g_part_table *table;
- struct g_part_entry *entry;
- int error;
-
- gp = pp->geom;
- table = gp->softc;
- entry = pp->private;
-
- switch (cmd) {
- case DIOCGPROVIDERALIAS:
- error = G_PART_DEVALIAS(table, entry, data, MAXPATHLEN);
- break;
- default:
- error = ENOTTY;
- break;
- }
-
- return (error);
-}
-
static void
g_part_orphan(struct g_consumer *cp)
{
diff --git a/sys/geom/part/g_part_if.m b/sys/geom/part/g_part_if.m
index 506e5401afb2..8252f0cadc34 100644
--- a/sys/geom/part/g_part_if.m
+++ b/sys/geom/part/g_part_if.m
@@ -85,15 +85,6 @@ METHOD int destroy {
struct g_part_parms *gpp;
};
-# devalias() - return the name (if any) to be used as an alias for
-# the device special file created for the partition entry.
-METHOD int devalias {
- struct g_part_table *table;
- struct g_part_entry *entry;
- char *buf;
- size_t bufsz;
-};
-
# dumpconf()
METHOD void dumpconf {
struct g_part_table *table;