Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165266569
D25811.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25811.id.diff
View Options
Index: head/sys/geom/geom.h
===================================================================
--- head/sys/geom/geom.h
+++ head/sys/geom/geom.h
@@ -434,7 +434,7 @@
void *gctl_get_paraml_opt(struct gctl_req *req, const char *param, int len);
int gctl_error(struct gctl_req *req, const char *fmt, ...) __printflike(2, 3);
struct g_class *gctl_get_class(struct gctl_req *req, char const *arg);
-struct g_geom *gctl_get_geom(struct gctl_req *req, struct g_class *mpr, char const *arg);
+struct g_geom *gctl_get_geom(struct gctl_req *req, struct g_class *mp, char const *arg);
struct g_provider *gctl_get_provider(struct gctl_req *req, char const *arg);
#endif /* _GEOM_GEOM_H_ */
Index: head/sys/geom/geom_ctl.c
===================================================================
--- head/sys/geom/geom_ctl.c
+++ head/sys/geom/geom_ctl.c
@@ -409,25 +409,20 @@
}
struct g_geom *
-gctl_get_geom(struct gctl_req *req, struct g_class *mpr, char const *arg)
+gctl_get_geom(struct gctl_req *req, struct g_class *mp, char const *arg)
{
char const *p;
- struct g_class *mp;
struct g_geom *gp;
+ MPASS(mp != NULL);
p = gctl_get_asciiparam(req, arg);
if (p == NULL) {
gctl_error(req, "Missing %s argument", arg);
return (NULL);
}
- LIST_FOREACH(mp, &g_classes, class) {
- if (mpr != NULL && mpr != mp)
- continue;
- LIST_FOREACH(gp, &mp->geom, geom) {
- if (!strcmp(p, gp->name))
- return (gp);
- }
- }
+ LIST_FOREACH(gp, &mp->geom, geom)
+ if (!strcmp(p, gp->name))
+ return (gp);
gctl_error(req, "Geom not found: \"%s\"", p);
return (NULL);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 8, 7:10 AM (19 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36201805
Default Alt Text
D25811.id.diff (1 KB)
Attached To
Mode
D25811: gctl_get_geom: Skip validation of g_class.
Attached
Detach File
Event Timeline
Log In to Comment