sysinfo: remove errors if the IOEXP is not programmed
If the IOExpander is not programmed but the kernel is running its driver, the following messages will appear when running sysinfo: cat: can't open '/sys/devices/platform/soc/2100000.aips-bus/21a0000.i2c/i2c-0/0-006e/hw_version': No such file or directory cat: can't open '/sys/devices/platform/soc/2100000.aips-bus/21a0000.i2c/i2c-0/0-006e/fw_version': No such file or directory Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
This commit is contained in:
parent
594e7fbf55
commit
234f783b81
|
|
@ -274,8 +274,8 @@ fi
|
|||
|
||||
IOEXP_NODE="/sys/devices/platform/soc/2100000.aips-bus/21a0000.i2c/i2c-0/0-006e"
|
||||
if [ -d "$IOEXP_NODE" ]; then
|
||||
IOEXP_HW_VERSION=$(cat ${IOEXP_NODE}/hw_version) || IOEXP_HW_VERSION="??"
|
||||
IOEXP_FW_VERSION=$(cat ${IOEXP_NODE}/fw_version) || IOEXP_FW_VERSION="??"
|
||||
IOEXP_HW_VERSION=$(cat ${IOEXP_NODE}/hw_version 2>/dev/null) || IOEXP_HW_VERSION="??"
|
||||
IOEXP_FW_VERSION=$(cat ${IOEXP_NODE}/fw_version 2>/dev/null) || IOEXP_FW_VERSION="??"
|
||||
IOEXP_VERSION="HW_VERSION=${IOEXP_HW_VERSION} FW_VERSION=${IOEXP_FW_VERSION}"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue