Skip to contentSkip to conversation

: incorrect e2fsprog data from ver_linux script

PATCH In review Albert Cranford 2 participants 3 messages Aug 31, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : incorrect e2fsprog data from ver_linux script

Hello Alan/Linus,
Ted suggested I pass this onto your for 2.2 and 2.4 Please apply small patch to both releases. Thanks,
Albert

-------- Original Message --------
Subject: incorrect e2fsprog data from ver_linux script
Date: Thu, 30 Aug 2001 10:08:27 -0400
From: Albert Cranford <[email protected]>
To: [email protected], [email protected]

Hello Ted,
I'm not sure when incorrect e2fsprog info started popping up from the linux/scripts/ver_linux script, but what do you think about submitting this patch to Linus? Later,
Albert

---BEFORE------------------------------
home1:~ /usr/src/linux/scripts/ver_linux
If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.

Linux home1 2.4.10-pre2 #1 Thu Aug 30 00:17:13 EDT 2001 i686 AuthenticAMD

Gnu C                  3.0.1
Gnu make               3.79
binutils               2.11.2
util-linux             2.11h
mount                  2.11h
modutils               2.4.8
e2fsprogs              tune2fs
PPP                    2.4.0

----AFTER-----------------------------
home1:~ /usr/local/bin/ver_linux
If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.

Linux home1 2.4.10-pre2 #1 Thu Aug 30 00:17:13 EDT 2001 i686 AuthenticAMD

Gnu C                  3.0.1
Gnu make               3.79
binutils               2.11.2
util-linux             2.11h
modutils               2.4.8
e2fsprogs              1.23
PPP                    2.4.0
----BEFORE-----------------------------
home1:/usr/src/e2fsprogs-1.23/misc# tune2fs 2>&1 | grep tune2fs | sed 's/,//' |
awk 'NR==1 {print "e2fsprogs             ", $2}'
e2fsprogs              tune2fs
----AFTER------------------------------
home1:/usr/src/e2fsprogs-1.23/misc# tune2fs 2>&1 | grep tune2fs | sed 's/,//' |
awk 'NR==2 {print "e2fsprogs             ", $2}'
e2fsprogs              1.23
----PATCH-----------------------------
--- linux/scripts/ver_linux.orig        Thu Aug 30 09:56:39 2001
+++ linux/scripts/ver_linux     Thu Aug 30 09:56:49 2001
@@ -27,7 +27,7 @@
 insmod -V  2>&1 | awk 'NR==1 {print "modutils              ",$NF}'

tune2fs 2>&1 | grep tune2fs | sed 's/,//' | awk \
-'NR==1 {print "e2fsprogs ", $2}'
+'NR==2 {print "e2fsprogs ", $2}'

reiserfsck 2>&1 | grep reiserfsprogs | awk \
'NR==1{print "reiserfsprogs ", $NF}'

Signature · 2 lines
Albert Cranford Deerfield Beach FL USA
[email protected]
#1 lore raw
Quoted 13 lines · Albert Cranford

Hello Alan/Linus,
Ted suggested I pass this onto your for 2.2 and 2.4 Please apply small patch to both releases. Thanks,
Albert

-------- Original Message --------
Subject: incorrect e2fsprog data from ver_linux script
Date: Thu, 30 Aug 2001 10:08:27 -0400
From: Albert Cranford <[email protected]>
To: [email protected], [email protected]

Quoted 7 lines

Hello Ted,
I'm not sure when incorrect e2fsprog info started popping up from the linux/scripts/ver_linux script, but what do you think about submitting this patch to Linus? Later,
Albert

Hmm, this worked for e2fsprogs 1.22, e2fsprogs 1.23 was released 8-15-01 according to Sourceforge.

I applied your fix, and yes it now works for 1.23:

[root@localhost linux]# sh scripts/ver_linux
[irrelevant stuff snipped]

modutils               2.4.3
e2fsprogs              1.23
reiserfsprogs          3.x.0i

Ok, so far so good. Now checking ver_linux shipped with 2.4.9-ac5 [root@localhost linux]# sh scripts/ver_linux.ac5 [irrelevant stuff snipped]

modutils               2.4.3
e2fsprogs              tune2fs
reiserfsprogs          3.x.0i

Yep, it's broken for e2fsprogs 1.23 all right.

Now, I installed e2fsprogs 1.22, and your new version breaks:

[root@localhost linux]# sh scripts/ver_linux <--- with your patch [irrelevant stuff snipped]

modutils               2.4.3
e2fsprogs              tune2fs
reiserfsprogs          3.x.0i

and the old version (old as in 2.4.9-ac5) works for e2fsprogs 1.22 [root@localhost linux]# sh scripts/ver_linux.ac5 [irrelevant stuff snipped]

modutils               2.4.3
e2fsprogs              1.22
reiserfsprogs          3.x.0i

So, this patch breaks the ver_linux script for 1.22, and 1.21 (I checked this too). If someone wants to fix this right, please jump in.

Steven

#2 lore raw
In reply to Albert Cranford

Good find Steven. Now I see the difference between 1.22 and 1.23. This patch is better than the last patch. Linus and Alan, please use this instead.
1.22 was "header then usage", while
1.23 is "usage then header".

home1:# ./tune2fs 2>&1 |grep tune2fs
tune2fs 1.22, 22-Jun-2001 for EXT2 FS 0.5b, 95/08/09
Usage: ./tune2fs [-c max-mounts-count] [-e errors-behavior] [-g group]

home1:# /sbin/tune2fs 2>&1 |grep tune2fs
Usage: /sbin/tune2fs [-c max-mounts-count] [-e errors-behavior] [-g group] tune2fs 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09

home1:# ./tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk 'NR==1 {print "e2fsprogs ", $2}'
e2fsprogs 1.22
home1:# /sbin/tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk 'NR==1 {print "e2fsprogs ", $2}'
e2fsprogs 1.23
--------PATCH--------------

scripts/ver_linux Fri Aug 31 01:17:47 2001 renamed from scripts/ver_linux.orig Fri Aug 31 01:15:22 2001 +1 -1
@@ -26,7 +26,7 @@
 
 insmod -V  2>&1 | awk 'NR==1 {print "modutils              ",$NF}'
 
-tune2fs 2>&1 | grep tune2fs | sed 's/,//' |  awk \
+tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' |  awk \
 'NR==1 {print "e2fsprogs             ", $2}'
 
 reiserfsck 2>&1 | grep reiserfsprogs | awk \

----------END PATCH-------

Quoted 10 lines · Steven Cole

So, this patch breaks the ver_linux script for 1.22, and 1.21 (I checked this too). If someone wants to fix this right, please jump in.

Steven
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 2 lines
Albert Cranford Deerfield Beach FL USA
[email protected]