[PATCH v3 04/16] nvmet-trace: null terminate device name string correctly

Christoph Hellwig hch at lst.de
Mon Dec 18 20:29:48 PST 2023


On Mon, Dec 18, 2023 at 04:30:52PM +0100, Daniel Wagner wrote:
> strlen returns the string length excluding the null byte ('\0'), thus we
> cut the last chars from the device name. While at it, switch snprintf to
> ensure we always have properly terminated string.

Looks good:

Reviewed-by: Christoph Hellwig <hch at lst.de>



More information about the Linux-nvme mailing list