diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-03-01 18:06:29 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-03-01 18:06:29 +0000 |
commit | e9e2333d5cf13041176315f565a4997e1acdc77a (patch) | |
tree | bece1cb1962b85fcfaa9e3f9991fcca2cde1bdf2 /sys-devel | |
parent | Initial import - see Bug #41001 (Manifest recommit) (diff) | |
download | gentoo-2-e9e2333d5cf13041176315f565a4997e1acdc77a.tar.gz gentoo-2-e9e2333d5cf13041176315f565a4997e1acdc77a.tar.bz2 gentoo-2-e9e2333d5cf13041176315f565a4997e1acdc77a.zip |
Add support to detect corrupted filesystem/bad hardware, patch by
Carter Smithhart <derheld42@derheld.net>.
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/gcc/ChangeLog | 6 | ||||
-rw-r--r-- | sys-devel/gcc/files/awk/scanforssp.awk | 19 |
2 files changed, 20 insertions, 5 deletions
diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog index 0961f5467232..1a0b8addeb9f 100644 --- a/sys-devel/gcc/ChangeLog +++ b/sys-devel/gcc/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-devel/gcc # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.186 2004/03/01 10:30:02 aliz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.187 2004/03/01 18:06:29 azarah Exp $ + + 01 Mar 2004; Martin Schlemmer <azarah@gentoo.org> files/awk/scanforssp.awk: + Add support to detect corrupted filesystem/bad hardware, patch by + Carter Smithhart <derheld42@derheld.net>. 26 Feb 2004; Alexander Gabert <pappy@gentoo.org> gcc-3.3.3-r1.ebuild: added IUSE hardened flag (thx swtaylor) diff --git a/sys-devel/gcc/files/awk/scanforssp.awk b/sys-devel/gcc/files/awk/scanforssp.awk index 915729a2a7dd..3016f244fffe 100644 --- a/sys-devel/gcc/files/awk/scanforssp.awk +++ b/sys-devel/gcc/files/awk/scanforssp.awk @@ -3,7 +3,8 @@ # Author: Martin Schlemmer <azarah@gentoo.org> # Contributor: Ned Ludd <solar@gentoo.org> # Contributor: Natanael Copa <nat@c2i.net> -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/scanforssp.awk,v 1.5 2003/12/31 18:21:42 solar Exp $ +# Contributor: Carter Smithhart <derheld42@derheld.net> +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/scanforssp.awk,v 1.6 2004/03/01 18:06:29 azarah Exp $ # Does not seem to be used in this script. @@ -157,6 +158,7 @@ BEGIN { pipe = ("find " DIRLIST[x] "/ -type f -perm -1 2>/dev/null") while ( (pipe | getline scan_files) > 0) { + #print scan_files # Do nothing if the file is located in gcc's internal lib path ... if (scan_files ~ GCCLIBPREFIX) continue # Or if its hardend files ... @@ -164,11 +166,11 @@ BEGIN { # Or not a elf image ... if (iself(scan_files)) continue - scan_file_pipe = ("readelf -s " scan_files " 2>/dev/null") + scan_file_pipe = ("readelf -s " scan_files " 2>&1") while (((scan_file_pipe) | getline scan_data) > 0) { - + bad = 0; if (scan_data ~ /__guard@GCC/ || scan_data ~ /__guard@@GCC/) { - + bad = 1; print # 194: 00000000 32 OBJECT GLOBAL DEFAULT UND __guard@GCC_3.0 (3) @@ -176,6 +178,15 @@ BEGIN { split(scan_data, scan_data_nodes) ewarn("Found " scan_data_nodes[8] " in " scan_files "!") print + } + if (scan_data ~ /readelf: Error: Unable to seek/) { + bad = 1; + print + ewarn("Error executing readelf. Bad block? Filesystem error? in " scan_files) + print + } + + if (bad) { if (auto_etcat) { |