mirror of https://github.com/thesofproject/sof.git
logger: Check for unused arguments
There is no place for unused arguments, their are consequence of invalid argument list as usual. Such an situation is highly possible especially during defining trace filters, eg `-Fv=mux 4.1` instead `-F"v=mux 4.1"` or `-Fv=mux4.1`. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This commit is contained in:
parent
7709924f16
commit
9e131360fc
|
@ -262,6 +262,11 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (argc != optind) {
|
||||
fprintf(stderr, "error: Unused parameter '%s'\n", argv[optind]);
|
||||
usage();
|
||||
}
|
||||
|
||||
if (snapshot_file)
|
||||
return baud ? EINVAL : -snapshot(snapshot_file);
|
||||
|
||||
|
|
Loading…
Reference in New Issue