Added filter helper to filter sysfs write errors, retain only the
error part.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
sed -e "s#.*: Input\/output error#$message#"
}
+# Filters
+# +./common/rc: line 5085: echo: write error: Invalid argument
+# to
+# Invalid argument
+_filter_sysfs_error()
+{
+ sed 's/.*: \(.*\)$/\1/'
+}
+
# make sure this script returns success
/bin/true