Author: feld (ports committer) Date: Mon Nov 17 15:19:57 2014 New Revision: 274631 URL: https://svnweb.freebsd.org/changeset/base/274631
Log: Fix geom's "usage" generation to not fabricate usage/help output for any imaginary class we give it. Differential Revision: https://reviews.freebsd.org/D1150 Submitted by: homerj Approved by: pjd Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Mon Nov 17 15:12:46 2014 (r274630) +++ head/sbin/geom/core/geom.c Mon Nov 17 15:19:57 2014 (r274631) @@ -640,6 +640,11 @@ get_class(int *argc, char ***argv) #endif /* !STATIC_GEOM_CLASSES */ set_class_name(); + + /* If we can't load or list, it's not a class. */ + if (!std_available("load") && !std_available("list")) + errx(EXIT_FAILURE, "Invalid class name."); + if (*argc < 1) usage(); } _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
