]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme-cli: fix connecting failure due to invalid uuid format of hostid
authorGuan Junxiong <guanjunxiong@huawei.com>
Thu, 3 Aug 2017 13:38:16 +0000 (21:38 +0800)
committerKeith Busch <keith.busch@intel.com>
Thu, 10 Aug 2017 17:09:24 +0000 (13:09 -0400)
commit0832d06cd62d3541489a3b74e6280b6b68522880
treed2430212418b71a42734ac0a2809332de6c9f217
parentb048895a9fd2cfece1bae74087a48c6a7a115218
nvme-cli: fix connecting failure due to invalid uuid format of hostid

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@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
fabrics.c