File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ if [ $# -ne 0 ]; then
3838 usage err
3939fi
4040
41+ status=0
42+
4143release=" $( uname -r) "
4244
4345found_vmlinux=
@@ -54,11 +56,14 @@ for path in "/usr/lib/debug/boot/vmlinux-$release" \
5456done
5557if [ -z " $found_vmlinux " ]; then
5658 echo " vmlinux not found" >&2
57- exit 1
59+ status= 1
5860fi
5961
60- cut -d' ' -f1 /proc/modules | while read -r module; do
61- module_path=" $( modinfo -F filename " $module " ) "
62+ while read -r module _; do
63+ if ! module_path=" $( modinfo -F filename " $module " ) " ; then
64+ status=1
65+ continue
66+ fi
6267
6368 case " $module_path " in
6469 * .ko.gz)
@@ -81,11 +86,13 @@ cut -d' ' -f1 /proc/modules | while read -r module; do
8186 fi
8287 done
8388 if [ -z " $found_module " ]; then
84- if eu-readelf -S " $module_path " | grep -q ' \.z?debug_info' ; then
89+ if eu-readelf -S " $module_path " | grep -q ' \.z\ ?debug_info' ; then
8590 echo " $module_path "
8691 else
87- echo " debug info for $module not found"
88- exit 1
92+ echo " debug info for $module not found" >&2
93+ status= 1
8994 fi
9095 fi
91- done
96+ done < /proc/modules
97+
98+ exit $status
You can’t perform that action at this time.
0 commit comments