Re: [PATCH v3 3/3] nvme: wwid_show: strip trailing 0-bytes
From: Keith Busch
Date: Thu Jul 20 2017 - 16:05:57 EST
On Thu, Jul 20, 2017 at 06:34:02PM +0200, Martin Wilck wrote:
> Some broken targets (such as the current Linux target) pad
> model or serial fields with 0-bytes rather than spaces. The
> NVME spec disallows 0 bytes in "ASCII" fields.
> Thus strip trailing 0-bytes, too. Also make sure that we get no
> underflow for pathological input.
>
> Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
> Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
> Acked-by: Christoph Hellwig <hch@xxxxxx>
Looks good.
Reviewed-by: Keith Busch <keith.busch@xxxxxxxxx>