From 372832d8fec7cb82a9ae5030206f146a40e73b32 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sun, 16 Jan 2005 02:21:14 +0000 Subject: make tor-resolve print the Tor version on --version too svn:r3358 --- src/tools/tor-resolve.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/tools/tor-resolve.c') diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c index f269ee63b..65a6300cf 100644 --- a/src/tools/tor-resolve.c +++ b/src/tools/tor-resolve.c @@ -181,6 +181,11 @@ main(int argc, char **argv) if (!n_args) usage(); + if (!strcmp(arg[0],"--version")) { + printf("Tor version %s.\n",VERSION); + return 0; + } + if (!strcmp("-v", arg[0])) { add_stream_log(LOG_DEBUG, LOG_ERR, "", stderr); ++arg; --n_args; @@ -213,7 +218,7 @@ main(int argc, char **argv) if (network_init()<0) { log_fn(LOG_ERR,"Error initializing network; exiting."); - return -1; + return 1; } if (do_resolve(arg[0], sockshost, socksport, &result)) -- cgit v1.2.3