From 748e404f265fbf5c868b090f03da1bae6bb12d4e Mon Sep 17 00:00:00 2001 From: Scott Long Date: Fri, 19 Jul 2013 06:42:15 +0000 Subject: [PATCH] Since there's no defined schema for the XML that's generated by the kern.geom.confxml sysctl, it's silly to warn about tags in libgeom, especially since libgeom exists simply to build a tree out of the conf information. Obtained from: Netflix MFC after: 3 days --- lib/libgeom/geom_xml2tree.c | 2 ++ lib/libgeom/libgeom.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c index 02be01991c1e..2874cd0abd9c 100644 --- a/lib/libgeom/geom_xml2tree.c +++ b/lib/libgeom/geom_xml2tree.c @@ -282,7 +282,9 @@ EndElement(void *userData, const char *name) } if (p != NULL) { +#if DEBUG_LIBGEOM > 0 printf("Unexpected XML: name=%s data=\"%s\"\n", name, p); +#endif free(p); } diff --git a/lib/libgeom/libgeom.h b/lib/libgeom/libgeom.h index c951f25babfe..73d43352ee84 100644 --- a/lib/libgeom/libgeom.h +++ b/lib/libgeom/libgeom.h @@ -40,6 +40,10 @@ __BEGIN_DECLS +#ifndef DEBUG_LIBGEOM +#define DEBUG_LIBGEOM 0 +#endif + void geom_stats_close(void); void geom_stats_resync(void); int geom_stats_open(void);