]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
kbuild: propagate errors from find in scripts/gen_initramfs_list.sh
authorMichael Ellerman <michael@ellerman.id.au>
Mon, 30 Apr 2007 05:34:15 +0000 (15:34 +1000)
committerSam Ravnborg <sam@ravnborg.org>
Wed, 2 May 2007 18:58:11 +0000 (20:58 +0200)
If the find(1) in scripts/gen_initramfs_list.sh generates any errors, it
will cause gen_initramfs_list.sh to fail (because of "set -e"), however
the errors from find are not printed to the user. This is rather confusing:

~/src/powerpc$ make O=~/build/powerpc-cell32/
make[2]: *** [usr/initramfs_data.cpio.gz] Error 1
make[1]: *** [usr] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes.  Stop.
make: *** [_all] Error 2

It is much easier to work out what the problem is if we let the errors
from find hit the console, eg:

~/src/powerpc$ make O=~/build/powerpc-cell32/
find: /home/michael/initramfs-source/home: Permission denied
find: /home/michael/initramfs-source/lost+found: Permission denied
find: /home/michael/initramfs-source/opt: Permission denied
find: /home/michael/initramfs-source/root: Permission denied
make[2]: *** [usr/initramfs_data.cpio.gz] Error 1
make[1]: *** [usr] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes.  Stop.
make: *** [_all] Error 2

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/gen_initramfs_list.sh

index 3111f4ac23c4e67ed9c87ee90f209dd4c810c49c..683eb12babbb3a46730cd39aadb03166a7cf2648 100644 (file)
@@ -171,7 +171,7 @@ dir_filelist() {
        ${dep_list}header "$1"
 
        srcdir=$(echo "$1" | sed -e 's://*:/:g')
-       dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" 2>/dev/null)
+       dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n")
 
        # If $dirlist is only one line, then the directory is empty
        if [  "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then