mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Introduce the concept of a generic zPCI device monitor by creating the zpcimon_ops operations struct turning all optics specific calls into abstract monitor calls. Handle monitors as a static array of zpcimon_ops based monitors of which the now split out optics monitor is currently the only one. All operations are in principle optional though a monitor which provides an init operation must also provide the corresponding destroy operation. Keep the base64 based JSON pair as non optics specific for later re-use and make it just skip the output in the very unlikely case that encoding fails. In follow on commits a monitor for NVMe devices collecting SMART data will be added. 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>