pcie: shell: Verify command parameters
Exit on wrong parameter for pcie ls command. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
7e9e3116e4
commit
d46c7595d9
1 changed files with 5 additions and 0 deletions
|
|
@ -205,6 +205,11 @@ static int cmd_pcie_ls(const struct shell *sh, size_t argc, char **argv)
|
|||
if (bdf == PCIE_BDF_NONE) {
|
||||
bdf = get_bdf(argv[i]);
|
||||
}
|
||||
|
||||
if (bdf == PCIE_BDF_NONE) {
|
||||
shell_error(sh, "Unknown parameter: %s", argv[i]);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Show only specified device */
|
||||
|
|
|
|||
Loading…
Reference in a new issue