diff options
| author | Stefan Schmidt <stefan@datenfreihafen.org> | 2019-03-19 16:25:37 +0100 |
|---|---|---|
| committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2019-03-19 16:25:37 +0100 |
| commit | 86008304dc2ad41a274cdacb585c641ec6bbb558 (patch) | |
| tree | 7d8fdd6d9cbba05cebb7d36c4309ea2bb48e0af0 /scripts/ver_linux | |
| parent | ieee802154: hwsim: propagate genlmsg_reply return code (diff) | |
| parent | Documentation: networking: Update netdev-FAQ regarding patches (diff) | |
| download | linux-86008304dc2ad41a274cdacb585c641ec6bbb558.tar.gz linux-86008304dc2ad41a274cdacb585c641ec6bbb558.zip | |
Merge remote-tracking branch 'net/master'
Diffstat (limited to 'scripts/ver_linux')
| -rwxr-xr-x | scripts/ver_linux | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/ver_linux b/scripts/ver_linux index a6c728db05ce..810e608baa24 100755 --- a/scripts/ver_linux +++ b/scripts/ver_linux @@ -13,6 +13,8 @@ BEGIN { system("uname -a") printf("\n") + vernum = "[0-9]+([.]?[0-9]+)+" + printversion("GNU C", version("gcc -dumpversion")) printversion("GNU Make", version("make --version")) printversion("Binutils", version("ld -v")) @@ -34,7 +36,7 @@ BEGIN { while (getline <"/proc/self/maps" > 0) { if (/libc.*\.so$/) { n = split($0, procmaps, "/") - if (match(procmaps[n], /[0-9]+([.]?[0-9]+)+/)) { + if (match(procmaps[n], vernum)) { ver = substr(procmaps[n], RSTART, RLENGTH) printversion("Linux C Library", ver) break @@ -70,7 +72,7 @@ BEGIN { function version(cmd, ver) { cmd = cmd " 2>&1" while (cmd | getline > 0) { - if (match($0, /[0-9]+([.]?[0-9]+)+/)) { + if (match($0, vernum)) { ver = substr($0, RSTART, RLENGTH) break } |
