]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
Read system UUID from DMI and merge hostnqn generation functions
authorHannes Reinecke <hare@suse.de>
Wed, 24 Mar 2021 07:22:28 +0000 (08:22 +0100)
committerKeith Busch <kbusch@kernel.org>
Wed, 31 Mar 2021 21:47:51 +0000 (15:47 -0600)
commit3e0520ecad13b768519ca6b402d8be86e2a48c6b
tree08c2162ab35f5d2cfaa8694787c49ee2c69221b3
parentb529a8232045d96939cb015bbf71c2675b90f0be
Read system UUID from DMI and merge hostnqn generation functions

Both fabrics.c and the 'gen-hostnqn' command contain functions
to generate a default host NQN. Needless to say, both are different.
_And_ we have the script 'nvme-gen-hostnqn' to read the host nqn
from the system UUID, implement yet another way.

This patch merges all of these functions, and implements a hierarchy
in generating host NQNs:
- Try reading system UUID from /sys/firmware/dmi/entries
- Try reading systemd-generated UUID
- Generate a random UUID

Signed-off-by: Hannes Reinecke <hare@suse.de>
fabrics.c
nvme-topology.c
nvme.c
nvme.h