Commit b6b9b7cc authored by Davide Ciminaghi's avatar Davide Ciminaghi Committed by Alessandro Rubini

cmdline: remove -l option

-l has been replaced by the "latency" config option.
This patch also removes cmd_line_parse_two(), which is now useless.
Signed-off-by: Davide Ciminaghi's avatarDavide Ciminaghi <ciminaghi@gnudd.com>
parent 9e021361
......@@ -35,7 +35,6 @@ static struct cmd_line_opt cmd_line_list[] = {
{"-e", "run in ethernet mode (level2)"},
/* {"-h", "run in End to End mode"}, -- we only support end-to-end */
/* {"-G", "run in gPTP mode (implies -e)"}, -- no peer-to-peer mode */
{"-l NUMBER,NUMBER", "specify inbound, outbound latency in nsec"},
CMD_LINE_SEPARATOR,
{"-i NUMBER", "specify PTP domain number"},
CMD_LINE_SEPARATOR,
......@@ -66,28 +65,11 @@ static void cmd_line_print_help(void)
}
}
static void cmd_line_parse_two(char *a, int *n1, int *n2)
{
int i, comma = 0;
*n1 = *n2 = 0;
for (i = 0; a[i] != '\0'; i++) {
if (a[i] == ',') {
comma = i;
a[i] = '\0';
*n1 = atoi(a);
break;
}
}
*n2 = atoi(&a[comma+1]);
a[comma] = ',';
}
int pp_parse_cmdline(struct pp_globals *ppg, int argc, char **argv)
{
int i, err = 0;
int j;
char *a; /* cmd line argument */
int n1, n2; /* used by cmd_line_parse_two */
for (i = 1; i < argc; i++) {
a = argv[i];
......@@ -126,12 +108,6 @@ int pp_parse_cmdline(struct pp_globals *ppg, int argc, char **argv)
a = argv[++i];
GOPTS(ppg)->s = atoi(a);
break;
case 'l':
a = argv[++i];
cmd_line_parse_two(a, &n1, &n2);
GOPTS(ppg)->inbound_latency.nanoseconds = n1;
GOPTS(ppg)->outbound_latency.nanoseconds = n2;
break;
case 'i':
a = argv[++i];
GOPTS(ppg)->domain_number = atoi(a);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment