Skip to content

Commit 9cc3ef3

Browse files
Jesper JuhlSam Ravnborg
authored andcommitted
kbuild: ver_linux fix glibc version print
Fix ver_linux glibc version printing (for real this time) Alexey Dobriyan reported that commit 4a645d5 broke ver_linux when glibc has a 3 digit version number, and proposed a patch. Al Viro then suggested a simpler way to solve the problem which I've then simply put into patch form. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent de47062 commit 9cc3ef3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎scripts/ver_linux‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ isdnctrl 2>&1 | grep version | awk \
6565
showmount --version 2>&1 | grep nfs-utils | awk \
6666
'NR==1{print "nfs-utils ", $NF}'
6767

68-
ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \
69-
-e 's/\.so$//' | sed -e 's/>//' | \
70-
awk -F'[.-]' '{print "Linux C Library "$(NF-1)"."$NF}'
68+
echo -n "Linux C Library "
69+
sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps
7170

7271
ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
7372
'NR==1{print "Dynamic linker (ldd) ", $NF}'

0 commit comments

Comments
 (0)