mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zpcimon: Split optics monitoring out into separate monitor
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>
This commit is contained in:
committed by
Jan Höppner
parent
f9ef8a0106
commit
113e9ebfef
+1
-1
@@ -73,7 +73,7 @@ BUILDTARGET += zpcimon
|
||||
|
||||
all: ${BUILDTARGET}
|
||||
|
||||
zpcimon: zpcimon.o optics_info.o optics_sclp.o ethtool.o link_mon.o $(libs)
|
||||
zpcimon: zpcimon.o opticsmon.o optics_info.o optics_sclp.o ethtool.o link_mon.o $(libs)
|
||||
|
||||
install: all
|
||||
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man8
|
||||
|
||||
Reference in New Issue
Block a user