Do not print error message for errno when showing the usage string. Use the same usage string in the two places where the usage is printed.
This commit is contained in:
parent
2662c87d60
commit
9b801b59c7
1 changed files with 5 additions and 3 deletions
|
@ -29,7 +29,7 @@
|
|||
*
|
||||
* This file is part of the uIP TCP/IP stack.
|
||||
*
|
||||
* $Id: tapslip6.c,v 1.2 2009/11/02 11:46:49 adamdunkels Exp $
|
||||
* $Id: tapslip6.c,v 1.3 2009/11/03 14:00:28 nvt-se Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -64,6 +64,8 @@ void write_to_serial(int outfd, void *inbuf, int len);
|
|||
//#define PROGRESS(s) fprintf(stderr, s)
|
||||
#define PROGRESS(s) do { } while (0)
|
||||
|
||||
#define USAGE_STRING "usage: tapslip6 [-B baudrate] [-s siodev] [-t tundev] ipaddress netmask"
|
||||
|
||||
char tundev[32] = { "tap0" };
|
||||
|
||||
int
|
||||
|
@ -512,7 +514,7 @@ main(int argc, char **argv)
|
|||
case '?':
|
||||
case 'h':
|
||||
default:
|
||||
err(1, "usage: tapslip6 [-B baudrate] [-s siodev] [-t tundev] ipaddress netmask");
|
||||
errx(1, USAGE_STRING);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -520,7 +522,7 @@ main(int argc, char **argv)
|
|||
argv += (optind - 1);
|
||||
|
||||
if(argc != 3 && argc != 4) {
|
||||
err(1, "usage: tapslip6 [-s siodev] [-t tundev] ipaddress netmask ");
|
||||
errx(1, USAGE_STRING);
|
||||
}
|
||||
ipaddr = argv[1];
|
||||
netmask = argv[2];
|
||||
|
|
Loading…
Reference in a new issue