summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2008-09-29 11:19:04 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2008-09-29 11:19:04 +0000
commit917444312a72e8243586efea3737d916872a3bc7 (patch)
tree5d0f6a453a0dcd4aff8c14299eaaae5663a10a3a
parent2b42936122f4feaaaf59c810871e15ccc236e18b (diff)
downloadcanutils-917444312a72e8243586efea3737d916872a3bc7.tar.gz
canutils-917444312a72e8243586efea3737d916872a3bc7.tar.xz
git-svn-id: https://iocaste.extern.pengutronix.de/svn/canutils/trunks/canutils-3.0-trunk@97 5fd5a299-6ef2-0310-aa18-8b01d7c39d8c
-rw-r--r--src/cansend.c6
-rw-r--r--src/cansequence.c10
2 files changed, 5 insertions, 11 deletions
diff --git a/src/cansend.c b/src/cansend.c
index 3081dd5..578264a 100644
--- a/src/cansend.c
+++ b/src/cansend.c
@@ -33,8 +33,8 @@ static void print_usage(char *prg)
" -f, --family=FAMILY Protocol family (default PF_CAN = %d)\n"
" -t, --type=TYPE Socket type, see man 2 socket (default SOCK_RAW = %d)\n"
" -p, --protocol=PROTO CAN protocol (default CAN_RAW = %d)\n"
- " -l send message infinite times\n"
- " --loop=COUNT send message COUNT times\n"
+ " -l send message infinite times\n"
+ " --loop=COUNT send message COUNT times\n"
" -v, --verbose be verbose\n"
" -h, --help this help\n"
" --version print version information and exit\n",
@@ -125,7 +125,7 @@ int main(int argc, char **argv)
if (optind == argc) {
print_usage(basename(argv[0]));
exit(0);
- }
+ }
if (argv[optind] == NULL) {
fprintf(stderr, "No Interface supplied\n");
diff --git a/src/cansequence.c b/src/cansequence.c
index 30b5cd6..8f90ee4 100644
--- a/src/cansequence.c
+++ b/src/cansequence.c
@@ -42,8 +42,7 @@ void print_usage(char *prg)
" -t, --type=TYPE Socket type, see man 2 socket (default SOCK_RAW = %d)\n"
" -p, --protocol=PROTO CAN protocol (default CAN_RAW = %d)\n"
" -r, --receive work as receiver\n"
- " -l send message infinite times\n"
- " --loop=COUNT send message COUNT times\n"
+ " --loop=COUNT send message COUNT times\n"
" -q --quit quit if a wrong sequence is encountered\n"
" -v, --verbose be verbose (twice to be even more verbose\n"
" -h --help this help\n"
@@ -64,7 +63,7 @@ int main(int argc, char **argv)
char *interface = "can0";
unsigned char sequence = 0;
int family = PF_CAN, type = SOCK_RAW, proto = CAN_RAW;
- int loopcount = 1, infinite = 0;
+ int loopcount = 1, infinite = 1;
int nbytes;
int opt;
int receive = 0;
@@ -134,11 +133,6 @@ int main(int argc, char **argv)
}
}
- if (optind == argc) {
- print_usage(basename(argv[0]));
- exit(0);
- }
-
if (argv[optind] == NULL) {
fprintf(stderr, "No Interface supplied\n");
exit(-1);