aboutsummaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorRyan Moeller <freqlabs@FreeBSD.org>2020-08-09 16:27:28 +0000
committerRyan Moeller <freqlabs@FreeBSD.org>2020-08-09 16:27:28 +0000
commit94cba8034ba53725c225c85e35724f0c2b13cea5 (patch)
treecd1eb42508fbc932a852f76cc8c3142ab874b996 /rescue
parentcbc0517c2b0be647b5064b9905fddd312feb6142 (diff)
downloadsrc-94cba8034ba53725c225c85e35724f0c2b13cea5.tar.gz
src-94cba8034ba53725c225c85e35724f0c2b13cea5.zip
Move ifconfig SFP status functionality into libifconfig
libifconfig_sfp.h provides an API in libifconfig for querying SFP module properties, operational status, and vendor strings, as well as descriptions of the various fields, string conversions, and other useful helpers for implementing user interfaces. SFP module status is obtained by reading registers via an I2C interface. Descriptions of these registers and the values therein have been collected in a Lua table which is used to generate all the boilerplace C headers and source files for accessing these values, their names, and descriptions. The generated code is fully commented and readable. This is the first use of libifconfig in ifconfig itself. For now, the scope remains very limited. Over time, more of ifconfig will be replaced with libifconfig. Some minor changes to the formatting of ifconfig output have been made: - Module memory hex dumps are indented one extra space as a result of using hexdump(3) instead of a bespoke hex dump function. - Media descriptions have an added two-character short-name in parenthesis. - QSFP modules were incorrectly displaying TX bias current as power. Now TX channels display bias current, and this change has been made for both SFP and QSFP modules for consistency. A Lua binding for libifconfig including this functionality is implemented but has not been included in this commit. The plan is for it to be committed after dynamic module loading has been enabled in flua. Reviewed by: kp, melifaro Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25494
Notes
Notes: svn path=/head/; revision=364058
Diffstat (limited to 'rescue')
-rw-r--r--rescue/rescue/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile
index 9681ebaddfa3..66aa7f188ec1 100644
--- a/rescue/rescue/Makefile
+++ b/rescue/rescue/Makefile
@@ -224,6 +224,9 @@ CRUNCH_ALIAS_chown= chgrp
##################################################################
CRUNCH_LIBS+= -lm
+CRUNCH_LIBS+= ${OBJTOP}/lib/libifconfig/libifconfig.a
+CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS+=-I${OBJTOP}/lib/libifconfig
+
.if ${MK_ISCSI} != "no"
CRUNCH_PROGS_usr.bin+= iscsictl
CRUNCH_PROGS_usr.sbin+= iscsid