Changeset 481 for trunk/src/sh_getopt.c
- Timestamp:
- Jul 18, 2015, 5:06:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_getopt.c
r467 r481 34 34 #include "sh_utils.h" 35 35 #include "sh_mail.h" 36 #include "sh_ forward.h"36 #include "sh_xfer.h" 37 37 #include "sh_hash.h" 38 #include "sh_dbIO.h" 39 #include "sh_dbCheck.h" 40 #include "sh_dbCreate.h" 41 #include "sh_sem.h" 38 42 39 43 #if defined(WITH_EXTERNAL) … … 64 68 #if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE) 65 69 static int sh_getopt_forever (const char * dummy); 70 static int sh_getopt_outpath (const char * dummy); 66 71 #endif 67 72 static int sh_getopt_copyright (const char * dummy); … … 92 97 N_("Set the server port to connect to"), 93 98 HAS_ARG_YES, 94 sh_ forward_server_port },99 sh_xfer_server_port }, 95 100 { N_("server-host"), 96 101 '-', 97 102 N_("Set the server host to connect to"), 98 103 HAS_ARG_YES, 99 sh_ forward_setlogserver },104 sh_xfer_set_logserver }, 100 105 #endif 101 106 #ifdef SH_WITH_SERVER … … 109 114 N_("Log fully qualified name of client host"), 110 115 HAS_ARG_NO, 111 sh_ forward_set_strip },116 sh_xfer_set_strip }, 112 117 { N_("chroot"), 113 118 '-', … … 222 227 N_("Compute a client registry entry for password"), 223 228 HAS_ARG_YES, 224 sh_ forward_make_client },229 sh_xfer_make_client }, 225 230 { N_("gen-password"), 226 231 'G', 227 232 N_("Generate a random password"), 228 233 HAS_ARG_NO, 229 sh_ forward_create_password },234 sh_xfer_create_password }, 230 235 #endif 231 236 … … 236 241 HAS_ARG_NO, 237 242 sh_getopt_forever}, 243 { N_("outfile"), 244 'o', 245 N_("Pathname for output file"), 246 HAS_ARG_YES, 247 sh_getopt_outpath}, 238 248 { N_("list-file"), 239 249 '-', 240 N_("Modify -d to listcontent of a single file"),250 N_("Modify -d to show content of a single file"), 241 251 HAS_ARG_YES, 242 252 set_list_file}, 253 { N_("list-filter"), 254 '-', 255 N_("Modify -d to filter by file list given in text file"), 256 HAS_ARG_YES, 257 sh_dbIO_list_filter}, 243 258 { N_("full-detail"), 244 259 'a', 245 N_("Modify -d to listfull details"),260 N_("Modify -d to show full details"), 246 261 HAS_ARG_NO, 247 262 set_full_detail}, 248 263 { N_("delimited"), 249 264 '-', 250 N_("Modify -d to listfull details, comma delimited"),265 N_("Modify -d to show full details, comma delimited"), 251 266 HAS_ARG_NO, 252 267 set_list_delimited}, 268 { N_("binary"), 269 '-', 270 N_("Modify -d to output in binary database format"), 271 HAS_ARG_NO, 272 sh_dbIO_list_binary}, 253 273 { N_("list-database"), 254 274 'd', 255 275 N_("List database content (like ls -l)"), 256 276 HAS_ARG_YES, 257 sh_ hash_list_db},277 sh_dbIO_list_db}, 258 278 { N_("init2stdout"), 259 279 '-', 260 280 N_("Write database to stdout on init"), 261 281 HAS_ARG_NO, 262 sh_hash_pushdata_stdout}, 282 sh_dbIO_writeout_stdout}, 283 { N_("verify-database"), 284 '-', 285 N_("Verify the given database"), 286 HAS_ARG_YES, 287 sh_dbCheck_verify}, 288 { N_("create-database"), 289 '-', 290 N_("Create database from file list"), 291 HAS_ARG_YES, 292 sh_dbCreate}, 293 { N_("wait-on-check"), 294 'w', 295 N_("Timed wait for end of filecheck (0 for no timeout)"), 296 HAS_ARG_YES, 297 sh_sem_wait}, 263 298 #endif 264 299 { N_("trace-logfile"), … … 744 779 sh.flag.loop = S_TRUE; 745 780 SL_RETURN(0, _("sh_getopt_forever")); 781 } 782 783 static int sh_getopt_outpath (const char * str) 784 { 785 if (str) 786 { 787 if (sh.outpath) 788 SH_FREE(sh.outpath); 789 sh.outpath = sh_util_strdup(str); 790 return 0; 791 } 792 return -1; 746 793 } 747 794 #endif
Note:
See TracChangeset
for help on using the changeset viewer.