aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-03-25 21:40:25 +0800
committerHarald Welte <laforge@gnumonks.org>2010-03-25 21:40:25 +0800
commit000cfc37a3bf0c78c37e57efb9050311d89dc67a (patch)
tree3454044fbb6f323d7f7ab7f47527bdbe0f2a56fb /util
parenta3c62230162f44891ec4ced3a8937cc775acb0bf (diff)
use basename(argv[0]) to determine true program name
Diffstat (limited to 'util')
-rw-r--r--util/telnet-client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/telnet-client.c b/util/telnet-client.c
index f2fcedb..8401359 100644
--- a/util/telnet-client.c
+++ b/util/telnet-client.c
@@ -21,6 +21,7 @@
#include <ctype.h>
#include <termios.h>
#include <unistd.h>
+#include <libgen.h>
#ifdef HAVE_ZLIB
#include "zlib.h"
@@ -149,7 +150,8 @@ int main(int argc, char **argv) {
/* check usage */
if (argc != 3) {
- fprintf(stderr, "Usage:\n ./telnet-client <host> <port>\n");
+ fprintf(stderr, "Usage:\n %s <host> <port>\n",
+ basename(argv[0]));
return 1;
}