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@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
Chao Wang 2012-08-06 14:49:52 +08:00 committed by Dave Young
parent d1d0feddf9
commit 3111ff74c9

View File

@ -115,7 +115,7 @@ dump_raw()
monitor_dd_progress $_src_size_mb & monitor_dd_progress $_src_size_mb &
$CORE_COLLECTOR /proc/vmcore | dd of=$1 bs=$DD_BLKSIZE >> /tmp/dd_progress_file 2>&1 || return 1 $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() dump_rootfs()