[PATCH 1/4] nvmet: change sn size and check validity

Keith Busch kbusch at kernel.org
Fri Apr 23 16:51:39 BST 2021


On Tue, Apr 20, 2021 at 09:09:00AM +0000, Max Gurtovoy wrote:
> +/* See Section 1.5 of NVMe 1.4 */
> +static bool nvmet_is_ascii(const char c)
> +{
> +	return c >= 0x20 && c <= 0x7e;
> +}

There's a library function, "isprint()", that can provide this check.



More information about the Linux-nvme mailing list