summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2005-07-21 16:09:50 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2005-07-21 16:09:50 +0000
commit2d99d0794bce2145032d6b597c5021680f71750b (patch)
tree9613ba7bfd4955d2583472df6428fdbb18aeef4c
parentf0cd9585a4dfb5e413afb354316936e4c5a5c601 (diff)
downloadcanutils-2d99d0794bce2145032d6b597c5021680f71750b.tar.gz
forgot break in switch, set default identifier
git-svn-id: https://iocaste.extern.pengutronix.de/svn/canutils/trunks/canutils-1.0-trunk@29 5fd5a299-6ef2-0310-aa18-8b01d7c39d8c
-rw-r--r--cansend.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cansend.c b/cansend.c
index eced013..f5b628c 100644
--- a/cansend.c
+++ b/cansend.c
@@ -29,7 +29,7 @@ void print_usage(char *prg)
fprintf(stderr, "Usage: %s <can-interface> [Options] <can-msg>\n"
"<can-msg> can consist of up to 8 bytes given as a space separated list\n"
"Options:\n"
- " -i, --identifier=ID CAN Identifier\n"
+ " -i, --identifier=ID CAN Identifier (default = 1)\n"
" -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_PROTO_RAW = %d)\n"
@@ -69,6 +69,8 @@ int main(int argc, char **argv)
{ 0, 0, 0, 0},
};
+ frame.can_id = 1;
+
while ((opt = getopt_long(argc, argv, "hf:t:p:vi:l", long_options, NULL)) != -1) {
switch (opt) {
case 'h':
@@ -98,6 +100,7 @@ int main(int argc, char **argv)
break;
case 'i':
frame.can_id = strtoul(optarg, NULL, 0);
+ break;
case VERSION_OPTION:
printf("cansend %s\n",VERSION);