aboutsummaryrefslogtreecommitdiff
path: root/src/tools/tor-resolve.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-01-16 02:21:14 +0000
committerRoger Dingledine <arma@torproject.org>2005-01-16 02:21:14 +0000
commit372832d8fec7cb82a9ae5030206f146a40e73b32 (patch)
tree7415b16697057c86f1fd4be9eaaf3c0aaa1950c2 /src/tools/tor-resolve.c
parent22a48e0a41acf09d1baa70b84db661714922b869 (diff)
downloadtor-372832d8fec7cb82a9ae5030206f146a40e73b32.tar
tor-372832d8fec7cb82a9ae5030206f146a40e73b32.tar.gz
make tor-resolve print the Tor version on --version too
svn:r3358
Diffstat (limited to 'src/tools/tor-resolve.c')
-rw-r--r--src/tools/tor-resolve.c7
1 files changed, 6 insertions, 1 deletions
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>", 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))