Skip to content

Commit

Permalink
Fixed argparse errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Naresh Nayak <Naresh.Nayak@de.bosch.com>
  • Loading branch information
nayakned committed Nov 19, 2024
1 parent d75f4a3 commit e8b03f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions examples/acf-can/acf-can-listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ static char doc[] =
static struct argp_option options[] = {
{"udp", 'u', 0, 0, "Use UDP" },
{"fd", ARGPARSE_CAN_FD_OPTION, 0, 0, "Use CAN-FD"},
{"canif", ARGPARSE_CAN_IF_OPTION, 0, 0, "CAN interface"},
{"ifname", 'i', 0, 0, "Network interface (If Ethernet)"},
{"canif", ARGPARSE_CAN_IF_OPTION, "CAN_IF", 0, "CAN interface"},
{"ifname", 'i', "IFNAME", 0, "Network interface (If Ethernet)"},
{"dst-addr", 'd', "MACADDR", 0, "Stream destination MAC address (If Ethernet)"},
{"udp-port", 'p', 0, 0, "UDP Port to listen on (if UDP)"},
{"udp-port", 'p', "UDP_PORT", 0, "UDP Port to listen on (if UDP)"},
{ 0 }
};

Expand Down Expand Up @@ -112,7 +112,7 @@ static error_t parser(int key, char *arg, struct argp_state *state)
return 0;
}

static struct argp argp = { options, parser, 0, doc };
static struct argp argp = { options, parser };

static int is_valid_acf_packet(uint8_t* acf_pdu)
{
Expand Down
10 changes: 5 additions & 5 deletions examples/acf-can/acf-can-talker.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ static char doc[] =
\vEXAMPLES\n\
acf-can-talker -i eth0 -d aa:bb:cc:ee:dd:ff --canif vcan0\n\
\t(tunnel transactions from CAN vcan0 over Ethernet eth0)\n\n\
acf-can-talker -u --dst-nw-address 10.0.0.2:17220 --canif vcan1\n\
acf-can-talker -u --dst-nw-addr 10.0.0.2:17220 --canif vcan1\n\
\t(tunnel transactions from vcan1 interface using UDP)";

static struct argp_option options[] = {
{"tscf", 't', 0, 0, "Use TSCF"},
{"udp", 'u', 0, 0, "Use UDP" },
{"fd", ARGPARSE_CAN_FD_OPTION, 0, 0, "Use CAN-FD"},
{"count", 'c', "COUNT", 0, "Set count of CAN messages per Ethernet frame"},
{"canif", ARGPARSE_CAN_IF_OPTION, 0, 0, "CAN interface"},
{"ifname", 'i', 0, 0, "Network interface (If Ethernet)"},
{"canif", ARGPARSE_CAN_IF_OPTION, "CAN_IF", 0, "CAN interface"},
{"ifname", 'i', "IFNAME", 0, "Network interface (If Ethernet)"},
{"dst-addr", 'd', "MACADDR", 0, "Stream destination MAC address (If Ethernet)"},
{"dst-nw-addr", 'n', 0, 0, "Stream destination network address and port (If UDP)"},
{"dst-nw-addr", 'n', "NW_ADDR", 0, "Stream destination network address and port (If UDP)"},
{ 0 }
};

Expand Down Expand Up @@ -137,7 +137,7 @@ static error_t parser(int key, char *arg, struct argp_state *state)
return 0;
}

static struct argp argp = { options, parser, 0, doc };
static struct argp argp = { options, parser};

static int init_cf_pdu(uint8_t* pdu)
{
Expand Down

0 comments on commit e8b03f2

Please sign in to comment.