[kexec-tools/f18] revert explictly handling of PIPESTATUS

Dave Young yangrr at fedoraproject.org
Fri Dec 21 03:38:41 UTC 2012


commit 8770ac2d6f3f910e9f759a4a359adbd6942ebead
Author: Dave Young <dyoung at redhat.com>
Date:   Wed Dec 19 17:27:40 2012 +0800

    revert explictly handling of PIPESTATUS
    
    To simplify the code logic, remove the previous PIPESTATUS handling because
    previous patch "enable pipefail bash option" added pipefail option which will
    also resolve this issue.
    
    This is a reverting of below commit:
    commit 3111ff74c9f877968dd92fafd08b84664a587e1c
    Author: Chao Wang <chaowang at redhat.com>
    Date:   Mon Aug 6 14:49:52 2012 +0800
    
        Change return value to indicate the result of dump_raw() correctly.
    
        Resolves bz845916.
        For raw dump code below:
        $CORE_COLLECTOR /proc/vmcore | dd of=$1 bs=$DD_BLKSIZE >> /tmp/dd_progress_f
        in case pipe fails it will still return 0, Fix this by return the PIPESTATUS
    
        Signed-off-by: Chao Wang <chaowang at redhat.com>
        Acked-by: Dave Young <dyoung at redhat.com>
    
    Signed-off-by: Dave Young <dyoung at redhat.com>
    Acked-by: Baoquan He <bhe at redhat.com>

 dracut-kdump.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index 3ced67a..fc6e750 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -88,7 +88,7 @@ dump_raw()
     monitor_dd_progress $_src_size_mb &
 
     $CORE_COLLECTOR /proc/vmcore | dd of=$1 bs=$DD_BLKSIZE >> /tmp/dd_progress_file 2>&1 || return 1
-    return ${PIPESTATUS[0]}
+    return 0
 }
 
 dump_rootfs()


More information about the scm-commits mailing list