comparison cli-runopts.c @ 1212:bf626d259eb1

Support syslog logging in dbclient.
author Konstantin Tokarev <ktokarev@smartlabs.tv>
date Tue, 01 Dec 2015 21:55:34 +0300
parents 64a50eac1030
children 7fd1211a1f63
comparison
equal deleted inserted replaced
1211:6ecc133fb2ee 1212:bf626d259eb1
862 if (strcmp(origstr, "help") == 0) { 862 if (strcmp(origstr, "help") == 0) {
863 dropbear_log(LOG_INFO, "Available options:\n" 863 dropbear_log(LOG_INFO, "Available options:\n"
864 #ifdef ENABLE_CLI_ANYTCPFWD 864 #ifdef ENABLE_CLI_ANYTCPFWD
865 "\tExitOnForwardFailure\n" 865 "\tExitOnForwardFailure\n"
866 #endif 866 #endif
867 #ifndef DISABLE_SYSLOG
868 "\tUseSyslog\n"
869 #endif
867 ); 870 );
868 exit(EXIT_SUCCESS); 871 exit(EXIT_SUCCESS);
869 } 872 }
870 873
871 #ifdef ENABLE_CLI_ANYTCPFWD 874 #ifdef ENABLE_CLI_ANYTCPFWD
873 cli_opts.exit_on_fwd_failure = parse_flag_value(optstr); 876 cli_opts.exit_on_fwd_failure = parse_flag_value(optstr);
874 return; 877 return;
875 } 878 }
876 #endif 879 #endif
877 880
881 #ifndef DISABLE_SYSLOG
882 if (match_extendedopt(&optstr, "UseSyslog") == DROPBEAR_SUCCESS) {
883 opts.usingsyslog = parse_flag_value(optstr);
884 return;
885 }
886 #endif
887
878 dropbear_exit("Bad configuration option '%s'", origstr); 888 dropbear_exit("Bad configuration option '%s'", origstr);
879 } 889 }