public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Alexey Dobriyan <adobriyan@sw.ru>,
	sam@ravnborg.org, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ver_linux is [censored]
Date: Wed, 22 Aug 2007 03:11:56 +0200	[thread overview]
Message-ID: <200708220311.56736.jesper.juhl@gmail.com> (raw)
In-Reply-To: <20070822005236.GF21089@ftp.linux.org.uk>


Fix ver_linux glibc version printing (for real this time)

Alexey Dobriyan reported that commit 
4a645d5ea65baaa5736bcb566673bf4a351b2ad8
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>
---

 scripts/ver_linux |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/ver_linux b/scripts/ver_linux
index 8f8df93..5a16bad 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -65,9 +65,8 @@ isdnctrl 2>&1 | grep version | awk \
 showmount --version 2>&1 | grep nfs-utils | awk \
 'NR==1{print "nfs-utils             ", $NF}'
 
-ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \
--e 's/\.so$//' | sed -e 's/>//' | \
-awk -F'[.-]' '{print "Linux C Library        "$(NF-1)"."$NF}'
+echo -n "Linux C Library        "
+sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps
 
 ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
 'NR==1{print "Dynamic linker (ldd)  ", $NF}'



  reply	other threads:[~2007-08-22  1:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21  7:19 [PATCH] ver_linux is [censored] Alexey Dobriyan
2007-08-21  9:56 ` Jesper Juhl
2007-08-21 23:15   ` Al Viro
2007-08-22  0:02     ` Jesper Juhl
2007-08-22  0:52       ` Al Viro
2007-08-22  1:11         ` Jesper Juhl [this message]
2007-08-28 19:21           ` Sam Ravnborg
2007-08-22  9:28         ` Dick Streefland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200708220311.56736.jesper.juhl@gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=adobriyan@sw.ru \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox