[PATCH] nvme: print out valid arguments when reading from /dev/nvme-fabrics

Christoph Hellwig hch at lst.de
Tue Nov 23 08:22:04 PST 2021


The subject should use a nvme-fabrics prefix.

> +		const struct match_token *tok;
> +		int idx;
> +
> +		for (idx = 0; idx < ARRAY_SIZE(opt_tokens); idx++) {
> +			tok = &opt_tokens[idx];
> +			if (tok->token == NVMF_OPT_ERR)
> +				continue;
> +			if (idx)
> +				seq_puts(seq_file, ",");
> +			seq_puts(seq_file, tok->pattern);
> +		}
> +		seq_puts(seq_file, "\n");

A helper for this logic would be nice.  Also shouldn't be there
some kind of token to distinguish from the case where a controller
has already been created?



More information about the Linux-nvme mailing list