Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151771458
D18936.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D18936.id.diff
View Options
Index: head/sys/dev/md/md.c
===================================================================
--- head/sys/dev/md/md.c
+++ head/sys/dev/md/md.c
@@ -151,7 +151,6 @@
#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 @@
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 @@
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 @@
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);
@@ -2018,12 +1973,6 @@
case MDIOCQUERY_32:
#endif
error = kern_mdquery(&mdr);
- break;
- case MDIOCLIST:
-#ifdef COMPAT_FREEBSD32
- case MDIOCLIST_32:
-#endif
- error = kern_mdlist(&mdr);
break;
default:
error = ENOIOCTL;
Index: head/sys/sys/mdioctl.h
===================================================================
--- head/sys/sys/mdioctl.h
+++ head/sys/sys/mdioctl.h
@@ -64,7 +64,7 @@
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 @@
#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 */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 11, 1:42 PM (12 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31236579
Default Alt Text
D18936.id.diff (3 KB)
Attached To
Mode
D18936: Remove the unused and unusable MDIOCLIST ioctl.
Attached
Detach File
Event Timeline
Log In to Comment