[kexec-tools] Change return value to indicate the result of dump_raw() correctly.

Dave Young yangrr at fedoraproject.org
Tue Aug 7 05:26:35 UTC 2012


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_file 2>&1 || return 1
    in case pipe fails it will still return 0, Fix this by return the PIPESTATUS[0] at the end of this fuction.
    
    Signed-off-by: Chao Wang <chaowang at redhat.com>
    Acked-by: Dave Young <dyoung 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 397c468..75c4a4e 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -115,7 +115,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 0
+    return ${PIPESTATUS[0]}
 }
 
 dump_rootfs()


More information about the scm-commits mailing list