aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/md/md.c55
-rw-r--r--sys/sys/mdioctl.h3
2 files changed, 3 insertions, 55 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 42d3f256e8e6..c9cd5a6e95a0 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -151,7 +151,6 @@ CTASSERT((sizeof(struct md_ioctl32)) == 436);
#define MDIOCATTACH_32 _IOC_NEWTYPE(MDIOCATTACH, struct md_ioctl32)
#define MDIOCDETACH_32 _IOC_NEWTYPE(MDIOCDETACH, struct md_ioctl32)
#define MDIOCQUERY_32 _IOC_NEWTYPE(MDIOCQUERY, struct md_ioctl32)
-#define MDIOCLIST_32 _IOC_NEWTYPE(MDIOCLIST, struct md_ioctl32)
#define MDIOCRESIZE_32 _IOC_NEWTYPE(MDIOCRESIZE, struct md_ioctl32)
#endif /* COMPAT_FREEBSD32 */
@@ -1876,48 +1875,6 @@ kern_mdquery(struct md_req *mdr)
return (error);
}
-static int
-kern_mdlist_locked(struct md_req *mdr)
-{
- struct md_s *sc;
- int i;
-
- sx_assert(&md_sx, SA_XLOCKED);
-
- /*
- * Write the number of md devices to mdr->md_units[0].
- * Write the unit number of the first (mdr->md_units_nitems - 2)
- * units to mdr->md_units[1::(mdr->md_units - 2)] and terminate the
- * list with -1.
- *
- * XXX: There is currently no mechanism to retrieve unit
- * numbers for more than (MDNPAD - 2) units.
- *
- * XXX: Due to the use of LIST_INSERT_HEAD in mdnew(), the
- * list of visible unit numbers not stable.
- */
- i = 1;
- LIST_FOREACH(sc, &md_softc_list, list) {
- if (i < mdr->md_units_nitems - 1)
- mdr->md_units[i] = sc->unit;
- i++;
- }
- mdr->md_units[MIN(i, mdr->md_units_nitems - 1)] = -1;
- mdr->md_units[0] = i - 1;
- return (0);
-}
-
-static int
-kern_mdlist(struct md_req *mdr)
-{
- int error;
-
- sx_xlock(&md_sx);
- error = kern_mdlist_locked(mdr);
- sx_xunlock(&md_sx);
- return (error);
-}
-
/* Copy members that are not userspace pointers. */
#define MD_IOCTL2REQ(mdio, mdr) do { \
(mdr)->md_unit = (mdio)->md_unit; \
@@ -1958,8 +1915,7 @@ mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
case MDIOCATTACH:
case MDIOCDETACH:
case MDIOCRESIZE:
- case MDIOCQUERY:
- case MDIOCLIST: {
+ case MDIOCQUERY: {
struct md_ioctl *mdio = (struct md_ioctl *)addr;
if (mdio->md_version != MDIOVERSION)
return (EINVAL);
@@ -1976,8 +1932,7 @@ mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
case MDIOCATTACH_32:
case MDIOCDETACH_32:
case MDIOCRESIZE_32:
- case MDIOCQUERY_32:
- case MDIOCLIST_32: {
+ case MDIOCQUERY_32: {
struct md_ioctl32 *mdio = (struct md_ioctl32 *)addr;
if (mdio->md_version != MDIOVERSION)
return (EINVAL);
@@ -2019,12 +1974,6 @@ mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
#endif
error = kern_mdquery(&mdr);
break;
- case MDIOCLIST:
-#ifdef COMPAT_FREEBSD32
- case MDIOCLIST_32:
-#endif
- error = kern_mdlist(&mdr);
- break;
default:
error = ENOIOCTL;
}
diff --git a/sys/sys/mdioctl.h b/sys/sys/mdioctl.h
index eac81012bdfd..9e0b0c995341 100644
--- a/sys/sys/mdioctl.h
+++ b/sys/sys/mdioctl.h
@@ -64,7 +64,7 @@ struct md_ioctl {
int md_fwheads; /* firmware heads */
int md_fwsectors; /* firmware sectors */
char *md_label; /* label of the device */
- int md_pad[MDNPAD]; /* storage for MDIOCLIST */
+ int md_pad[MDNPAD]; /* padding */
};
#define MD_NAME "md"
@@ -81,7 +81,6 @@ struct md_ioctl {
#define MDIOCATTACH _IOWR('m', 0, struct md_ioctl) /* attach disk */
#define MDIOCDETACH _IOWR('m', 1, struct md_ioctl) /* detach disk */
#define MDIOCQUERY _IOWR('m', 2, struct md_ioctl) /* query status */
-#define MDIOCLIST _IOWR('m', 3, struct md_ioctl) /* query status */
#define MDIOCRESIZE _IOWR('m', 4, struct md_ioctl) /* resize disk */
#define MD_CLUSTER 0x01 /* Don't cluster */