mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-22 05:54:58 +02:00
add --version, note that --help is probably obsolete
svn:r1195
This commit is contained in:
parent
1147289dc0
commit
b961732246
@ -328,10 +328,10 @@ static int config_assign_default(or_options_t *options) {
|
|||||||
/* prints the usage of tor. */
|
/* prints the usage of tor. */
|
||||||
static void print_usage(void) {
|
static void print_usage(void) {
|
||||||
printf("tor -f <torrc> [args]\n"
|
printf("tor -f <torrc> [args]\n"
|
||||||
"See man page for more options.\n\n"
|
"See man page for more options. This -h is probably obsolete.\n\n"
|
||||||
"-b <bandwidth>\t\tbytes/second rate limiting\n"
|
"-b <bandwidth>\t\tbytes/second rate limiting\n"
|
||||||
"-d <file>\t\tDebug file\n"
|
"-d <file>\t\tDebug file\n"
|
||||||
"-m <max>\t\tMax number of connections\n"
|
// "-m <max>\t\tMax number of connections\n"
|
||||||
"-l <level>\t\tLog level\n"
|
"-l <level>\t\tLog level\n"
|
||||||
"-r <file>\t\tList of known routers\n");
|
"-r <file>\t\tList of known routers\n");
|
||||||
printf("\nClient options:\n"
|
printf("\nClient options:\n"
|
||||||
@ -429,6 +429,11 @@ int getconfig(int argc, char **argv, or_options_t *options) {
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(argc > 1 && (!strcmp(argv[1],"--version"))) {
|
||||||
|
printf("Tor version %s.\n",VERSION);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
/* learn config file name, get config lines, assign them */
|
/* learn config file name, get config lines, assign them */
|
||||||
i = 1;
|
i = 1;
|
||||||
while(i < argc-1 && strcmp(argv[i],"-f")) {
|
while(i < argc-1 && strcmp(argv[i],"-f")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user