File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 7474# '\.c\:[1-9]' to filter like '.c:6' this type keyword like:
7575# [3017136.770833] (11.302083) c0 SA src/lib/agent.c:65 ERROR validate(), ll drift detected, delta = 25549
7676fw_log_err=$( grep -i ' error' " $data_file " | grep -v ' \.c\:[1-9]' )
77+ data_len=$( wc -l < " ${data_file} " )
7778
7879# '[[:blank:]]TIMESTAMP.*CONTENT$' to filter the log header:
7980# TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT
8081if [[ ! $( sed -n ' /[[:blank:]]TIMESTAMP.*CONTENT$/p' " ${data_file} " ) ]]; then
8182 dloge " Log header not found in ${data_file} "
8283 func_logger_exit 1
84+ elif [[ " ${data_len} " -lt 2 ]]; then
85+ dloge " Nothing but the header in ${data_file} "
86+ func_logger_exit 1
8387# we catch error from fw log
8488elif [[ $fw_log_err ]]; then
8589 dloge " Error(s) found in firmware log ${data_file} "
You can’t perform that action at this time.
0 commit comments