[PATCH] nvme-cli: fix connecting failure due to invalid uuid format of hostid

Christoph Hellwig hch at infradead.org
Thu Aug 10 02:09:58 PDT 2017


On Thu, Aug 03, 2017 at 09:38:16PM +0800, Guan Junxiong wrote:
> When we connect or discover a target with --hostid option via the
> /etc/nvme/hostid file, we fails this operation because the hostid
> is only 35 not 36 bytes which doesn't pass the uuid checking in the
> kernel.The last character is overridden with null bytes because fgets
> reads at most one less than sizeof of buffer characters.
> 
> Signed-off-by: Guan Junxiong <guanjunxiong at huawei.com>

Looks good,

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



More information about the Linux-nvme mailing list