3 comments:
start = strtoul(argv[optind], &endptr, 0);
if (errno == ERANGE || errno == EINVAL || *endptr != '\0') {
msg_gerr("Error: value \"%s\" invalid\n", argv[optind]);
ret = 1;
goto out_shutdown;
}
len = strtoul(argv[optind + 1], &endptr, 0);
if (errno == ERANGE || errno == EINVAL || *endptr != '\0') {
msg_gerr("Error: value \"%s\" invalid\n", argv[optind + 1]);
I think we should avoid using `argv[optind]` and `argv[optind + 1]` to get the values here. It currently won't work at all since the two arguments will look like extraneous tokens and cause the program to abort on lines 408-409.
It's tricky since getopt_long() can't parse two arguments for a single flag. We could either:
Patch Set #6, Line 851: /* FIXME: Move to spi25.c if it's a JEDEC standard opcode */
Should this fn be moved?
Patch Set #6, Line 872: /* FIXME: Move to spi25.c if it's a JEDEC standard opcode */
Ditto
To view, visit change 40325. To unsubscribe, or for help writing mail filters, visit settings.