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

Max Gurtovoy mgurtovoy at nvidia.com
Thu Apr 29 11:47:44 BST 2021


On 4/26/2021 4:15 PM, Max Gurtovoy wrote:
>
> On 4/23/2021 6:51 PM, Keith Busch wrote:
>> 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.
>
> This is an existing function in the code.
>
> We'll add a dedicated commit to replace it.
>
Actually the isprint check is weaker than the nvmet_is_ascii so we'll 
leave it as-is.

Thanks.





More information about the Linux-nvme mailing list