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 3111ff74c9
Author: Chao Wang <chaowang@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@redhat.com>
    Acked-by: Dave Young <dyoung@redhat.com>

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
This commit is contained in:
Dave Young 2012-12-19 17:27:40 +08:00
parent e36d4ab60d
commit 8770ac2d6f
1 changed files with 1 additions and 1 deletions

View File

@ -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()