X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=b17435ec8bfcc800e2f3b31009c9b6b4257056e6;hb=d809e9b8fc03a0a08060034c6ddbd4b4c4176399;hp=9d65438f5fdd519852e5a209c59ce6574bb78376;hpb=c6853a55ca911415e6851de27621b7022a665933;p=src%2Fapp-framework-binder.git diff --git a/src/main.c b/src/main.c index 9d65438f..b17435ec 100644 --- a/src/main.c +++ b/src/main.c @@ -71,7 +71,6 @@ static sigjmp_buf exitPoint; // context save for set/longjmp #define SET_CONFIG_SAVE 135 #define SET_CONFIG_EXIT 138 - #define SET_SMACK 140 #define SET_AUTH_TOKEN 141 #define SET_LDPATH 142 #define SET_APITIMEOUT 143 @@ -107,7 +106,6 @@ static AFB_options cliOptions [] = { {SET_CONFIG_SAVE ,0,"save" , "Save config on disk [default no]"}, {SET_CONFIG_EXIT ,0,"saveonly" , "Save config on disk and then exit"}, - // {SET_SMACK ,1,"smack" , "Set Smack Label [default demo]"}, {SET_LDPATH ,1,"ldpaths" , "Load Plugins from dir1:dir2:... [default = PLUGIN_INSTALL_DIR"}, {SET_AUTH_TOKEN ,1,"token" , "Initial Secret [default=no-session, --token="" for session without authentication]"}, @@ -344,12 +342,6 @@ int main(int argc, char *argv[]) { } break; - case SET_SMACK: - if (optarg == 0) goto needValueForOption; - fprintf (stderr, "Not Implemented yet\n"); - cliconfig.smack = optarg; - break; - case SET_AUTH_TOKEN: if (optarg == 0) goto needValueForOption; cliconfig.token = optarg; @@ -431,7 +423,7 @@ int main(int argc, char *argv[]) { printHelp(programName); goto normalExit; - } + } } // if exist merge config file with CLI arguments @@ -450,7 +442,7 @@ int main(int argc, char *argv[]) { // open syslog if ever needed openlog("AGB-log", 0, LOG_DAEMON); - // -------------- Try to kill any previsou process if asked --------------------- + // -------------- Try to kill any previous process if asked --------------------- if (session->killPrevious) { pid = readPidFile (session->config); // enforce commandline option switch (pid) { @@ -582,7 +574,7 @@ int main(int argc, char *argv[]) { if (status == -1) goto errorPidFile; // we are in father process, we don't need this one - exit (0); + _exit (0); } // end background-foreground