MINOR: initcall: use initcalls for section parsers
The two calls to cfg_register_section() and cfg_register_postparser()
are now supported by initcalls. This allowed to remove two other
constructors.
diff --git a/include/common/cfgparse.h b/include/common/cfgparse.h
index 3069722..b46e02b 100644
--- a/include/common/cfgparse.h
+++ b/include/common/cfgparse.h
@@ -24,6 +24,7 @@
#include <common/compat.h>
#include <common/config.h>
+#include <common/initcall.h>
#include <common/mini-clist.h>
#include <proto/log.h>
@@ -143,6 +144,13 @@
return 0;
}
+/* simplified way to define a section parser */
+#define REGISTER_CONFIG_SECTION(name, parse, post) \
+ INITCALL3(STG_REGISTER, cfg_register_section, (name), (parse), (post))
+
+#define REGISTER_CONFIG_POSTPARSER(name, parser) \
+ INITCALL2(STG_REGISTER, cfg_register_postparser, (name), (parser))
+
#endif /* _COMMON_CFGPARSE_H */
/*