mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
The get_device_node() function for getting the name of an NVMe's controller device e.g. "nvme0" as implemented in zpcictl is generally useful and will be needed for NVMe SMART data collection in zpcimon as well. Move it to libzpci and rename it to zpci_get_nvme_device_node() to account for the change in namespace. It would be tempting to pass a struct zpci_dev* instead of a const char* but as zpcictl uses an incompatible struct zpci_device* this will require a larger rework. Prioritize minimizing code duplication for now. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>