From 234f783b8180f7c155d8812046306b22448acc12 Mon Sep 17 00:00:00 2001 From: "Diaz de Grenu, Jose" Date: Mon, 10 Jul 2017 09:58:57 +0200 Subject: [PATCH] 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 --- meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo b/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo index 0ad16d112..9d0695a87 100755 --- a/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo +++ b/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo @@ -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