Skip to content

Commit

Permalink
nvme-fabrics: fix reporting of unrecognized options
Browse files Browse the repository at this point in the history
Only print the specified options that are not recognized, instead
of the whole list of options.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
  • Loading branch information
Christoph Hellwig committed Aug 17, 2017
1 parent 369157b commit 81a0b8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/nvme/host/fabrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,8 @@ static int nvmf_check_allowed_opts(struct nvmf_ctrl_options *opts,
int i;

for (i = 0; i < ARRAY_SIZE(opt_tokens); i++) {
if (opt_tokens[i].token & ~allowed_opts) {
if ((opt_tokens[i].token & opts->mask) &&
(opt_tokens[i].token & ~allowed_opts)) {
pr_warn("invalid parameter '%s'\n",
opt_tokens[i].pattern);
}
Expand Down

0 comments on commit 81a0b8d

Please sign in to comment.