find_linux_proc_banner does not work on Debian
pali opened this issue · 1 comments
pali commented
On Debian systems standard awk command does not support strtonum function. Probably it is just GNU extension which is available in gawk (GNU awk).
Starting ./run.sh just show follwing error:
looking for linux_proc_banner in /proc/kallsyms
awk: line 7: function strtonum never defined
Here is patch which implements find_linux_proc_banner function in more compatible way:
diff --git a/run.sh b/run.sh
index 39419b7..e6629b7 100755
--- a/run.sh
+++ b/run.sh
@@ -1,12 +1,7 @@
#!/bin/sh
find_linux_proc_banner() {
- $2 awk '
- /linux_proc_banner/ {
- if (strtonum("0x"$1))
- print $1;
- exit 0;
- }' $1
+ $2 sed -n -E 's/^([0-9a-f]+) .* linux_proc_banner$/\1/p' $1
}
echo "looking for linux_proc_banner in /proc/kallsyms"
paboldin commented
Thanks.