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 74
74
# '\.c\:[1-9]' to filter like '.c:6' this type keyword like:
75
75
# [3017136.770833] (11.302083) c0 SA src/lib/agent.c:65 ERROR validate(), ll drift detected, delta = 25549
76
76
fw_log_err=$( grep -i ' error' " $data_file " | grep -v ' \.c\:[1-9]' )
77
+ data_len=$( wc -l < " ${data_file} " )
77
78
78
79
# '[[:blank:]]TIMESTAMP.*CONTENT$' to filter the log header:
79
80
# TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT
80
81
if [[ ! $( sed -n ' /[[:blank:]]TIMESTAMP.*CONTENT$/p' " ${data_file} " ) ]]; then
81
82
dloge " Log header not found in ${data_file} "
82
83
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
83
87
# we catch error from fw log
84
88
elif [[ $fw_log_err ]]; then
85
89
dloge " Error(s) found in firmware log ${data_file} "
You can’t perform that action at this time.
0 commit comments