From 362db5003b8ce9fb231a26c2d05e28de7b1662e4 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sat, 18 Apr 2009 17:22:12 +0200 Subject: [PATCH] Remove config file conversion code --- src/main.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/main.c b/src/main.c index d4f3a5fa..9d828d82 100644 --- a/src/main.c +++ b/src/main.c @@ -535,7 +535,6 @@ int main(int argc, char *argv[]) { int force_non_root=0; int skip_initial=1; int kill_server=0; - int convert_conf=0; char *db_type,*db_parms,*web_root,*runas, *tmp; char **mp3_dir_array; char *servername; @@ -560,7 +559,7 @@ int main(int argc, char *argv[]) { err_setlevel(2); config.foreground=0; - while((option=getopt(argc,argv,"D:d:c:P:frysiuvb:Vk")) != -1) { + while((option=getopt(argc,argv,"D:d:c:P:frysiub:Vk")) != -1) { switch(option) { case 'b': ffid=optarg; @@ -603,10 +602,6 @@ int main(int argc, char *argv[]) { force_non_root=1; break; - case 'v': - convert_conf=1; - break; - case 'k': kill_server=1; break; @@ -623,7 +618,7 @@ int main(int argc, char *argv[]) { } } - if((getuid()) && (!force_non_root) && (!convert_conf)) { + if((getuid()) && (!force_non_root)) { fprintf(stderr,"You are not root. This is almost certainly wrong. " "If you are\nsure you want to do this, use the -y " "command-line switch\n"); @@ -657,15 +652,6 @@ int main(int argc, char *argv[]) { if(debuglevel) /* was specified, should override the config file */ err_setlevel(debuglevel); - if(convert_conf) { - fprintf(stderr,"Converting config file...\n"); - if(CONF_E_SUCCESS != conf_write()) { - fprintf(stderr,"Error writing config file.\n"); - exit(EXIT_FAILURE); - } - exit(EXIT_SUCCESS); - } - DPRINTF(E_LOG,L_MAIN,"Firefly Version %s: Starting with debuglevel %d\n", VERSION,err_getlevel());