Added filter helper to filter sysfs write errors, retain only the error part. Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx> Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx> --- common/filter | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/filter b/common/filter index 1ebfd27e898e..bbe13f4c8a8d 100644 --- a/common/filter +++ b/common/filter @@ -674,5 +674,14 @@ _filter_flakey_EIO() 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 -- 2.47.0