forked from altcloud/fence-virt
Revert "Sort plugins by type when printing them"
This reverts commit 2707d32a8753c109489332270aab19d3a750133b.
This commit is contained in:
parent
2707d32a87
commit
e0dd134a34
@ -36,7 +36,7 @@ MODULE_PATH=${libdir}/${PACKAGE_NAME}
|
|||||||
#
|
#
|
||||||
# Module sources
|
# 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
|
libvirt_so_SOURCES = libvirt.c virt.c uuid-test.c
|
||||||
null_so_SOURCES = null.c
|
null_so_SOURCES = null.c
|
||||||
libvirt_qpid_so_SOURCES = uuid-test.c
|
libvirt_qpid_so_SOURCES = uuid-test.c
|
||||||
|
@ -13,9 +13,6 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
/* configure.c */
|
|
||||||
int do_configure(config_object_t *config, const char *filename);
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
@ -24,7 +21,6 @@ usage(void)
|
|||||||
printf(" -F Do not daemonize.\n");
|
printf(" -F Do not daemonize.\n");
|
||||||
printf(" -f <file> Use <file> as configuration file.\n");
|
printf(" -f <file> Use <file> as configuration file.\n");
|
||||||
printf(" -d <level> Set debugging level to <level>.\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;
|
listener_context_t listener_ctx = NULL;
|
||||||
backend_context_t backend_ctx = NULL;
|
backend_context_t backend_ctx = NULL;
|
||||||
int debug_set = 0, foreground = 0;
|
int debug_set = 0, foreground = 0;
|
||||||
int opt, configure = 0;
|
int opt;
|
||||||
|
|
||||||
config = sc_init();
|
config = sc_init();
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "Ff:d:c")) != EOF) {
|
while ((opt = getopt(argc, argv, "Ff:d:")) != EOF) {
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
case 'F':
|
case 'F':
|
||||||
printf("Background mode disabled\n");
|
printf("Background mode disabled\n");
|
||||||
@ -58,9 +54,6 @@ main(int argc, char **argv)
|
|||||||
case 'd':
|
case 'd':
|
||||||
debug_set = atoi(optarg);
|
debug_set = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
case 'c':
|
|
||||||
configure = 1;
|
|
||||||
break;
|
|
||||||
case 'h':
|
case 'h':
|
||||||
case '?':
|
case '?':
|
||||||
usage();
|
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) {
|
if (sc_parse(config, config_file) != 0) {
|
||||||
printf("Failed to parse %s\n", config_file);
|
printf("Failed to parse %s\n", config_file);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -94,28 +94,14 @@ void
|
|||||||
plugin_dump(void)
|
plugin_dump(void)
|
||||||
{
|
{
|
||||||
plugin_list_t *p;
|
plugin_list_t *p;
|
||||||
int x, y;
|
int x;
|
||||||
|
|
||||||
y = 0;
|
|
||||||
list_for(&server_plugins, p, x) {
|
list_for(&server_plugins, p, x) {
|
||||||
if (p->type == PLUGIN_BACKEND) {
|
if (p->type == PLUGIN_BACKEND) {
|
||||||
if (!y) {
|
printf("backend: %s %s\n",
|
||||||
y = 1;
|
|
||||||
printf("Available backends:\n");
|
|
||||||
}
|
|
||||||
printf(" %s %s\n",
|
|
||||||
p->backend->name, p->backend->version);
|
p->backend->name, p->backend->version);
|
||||||
}
|
} else if (p->type == PLUGIN_LISTENER) {
|
||||||
}
|
printf("listener: %s %s\n",
|
||||||
|
|
||||||
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",
|
|
||||||
p->listener->name, p->listener->version);
|
p->listener->name, p->listener->version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user