Avoid introducing null bytes in module list in bug reports

Since the module taint string includes parentheses if is non-empty, I
originally set cut to use an empty output delimiter so that this
string would immediately follow the module name.  But currently this
results in a null byte between them, which unsurprisingly has led to
some slightly mangled bug reports.  For now, use sed to delete the
space.

svn path=/dists/trunk/linux-2.6/; revision=18512
This commit is contained in:
Ben Hutchings 2012-01-13 00:24:24 +00:00
parent 44aa912907
commit fc0c481b24
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,9 @@
add_modules() {
echo '** Loaded modules:' >&3
# List modules along with any taint flags
cut -d' ' --output-delimiter='' -f1,7 /proc/modules >&3
# List modules along with any taint flags.
# We should be able to tell cut to use an empty output delimiter, but
# currently (coreutils 8.13-3) this results in null bytes in the output.
cut -d' ' -f1,7 /proc/modules | sed 's/ //' >&3
echo >&3
}