mirror of https://gerrit.osmocom.org/libtelnet
use basename(argv[0]) to determine true program name
This commit is contained in:
parent
a3c6223016
commit
000cfc37a3
|
@ -21,6 +21,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <libgen.h>
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
#include "zlib.h"
|
#include "zlib.h"
|
||||||
|
@ -149,7 +150,8 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
/* check usage */
|
/* check usage */
|
||||||
if (argc != 3) {
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue