Revert "Sort plugins by type when printing them"

This reverts commit 2707d32a87.
This commit is contained in:
Lon Hohberger 2010-01-04 14:16:42 -05:00
parent 2707d32a87
commit e0dd134a34
3 changed files with 7 additions and 32 deletions

View File

@ -36,7 +36,7 @@ MODULE_PATH=${libdir}/${PACKAGE_NAME}
#
# Module sources
#
fence_virtd_SOURCES = main.c plugin.c config.c
fence_virtd_SOURCES = main.c plugin.c
libvirt_so_SOURCES = libvirt.c virt.c uuid-test.c
null_so_SOURCES = null.c
libvirt_qpid_so_SOURCES = uuid-test.c

View File

@ -13,9 +13,6 @@
#include <debug.h>
#include <syslog.h>
/* configure.c */
int do_configure(config_object_t *config, const char *filename);
void
usage(void)
@ -24,7 +21,6 @@ usage(void)
printf(" -F Do not daemonize.\n");
printf(" -f <file> Use <file> as configuration file.\n");
printf(" -d <level> Set debugging level to <level>.\n");
printf(" -c Configuration mode.\n");
}
@ -41,11 +37,11 @@ main(int argc, char **argv)
listener_context_t listener_ctx = NULL;
backend_context_t backend_ctx = NULL;
int debug_set = 0, foreground = 0;
int opt, configure = 0;
int opt;
config = sc_init();
while ((opt = getopt(argc, argv, "Ff:d:c")) != EOF) {
while ((opt = getopt(argc, argv, "Ff:d:")) != EOF) {
switch(opt) {
case 'F':
printf("Background mode disabled\n");
@ -58,9 +54,6 @@ main(int argc, char **argv)
case 'd':
debug_set = atoi(optarg);
break;
case 'c':
configure = 1;
break;
case 'h':
case '?':
usage();
@ -70,10 +63,6 @@ main(int argc, char **argv)
}
}
if (configure) {
return do_configure(config, config_file);
}
if (sc_parse(config, config_file) != 0) {
printf("Failed to parse %s\n", config_file);
return -1;

View File

@ -94,28 +94,14 @@ void
plugin_dump(void)
{
plugin_list_t *p;
int x, y;
int x;
y = 0;
list_for(&server_plugins, p, x) {
if (p->type == PLUGIN_BACKEND) {
if (!y) {
y = 1;
printf("Available backends:\n");
}
printf(" %s %s\n",
printf("backend: %s %s\n",
p->backend->name, p->backend->version);
}
}
y = 0;
list_for(&server_plugins, p, x) {
if (p->type == PLUGIN_LISTENER) {
if (!y) {
y = 1;
printf("Available listeners:\n");
}
printf(" %s %s\n",
} else if (p->type == PLUGIN_LISTENER) {
printf("listener: %s %s\n",
p->listener->name, p->listener->version);
}
}