From 387dc85cce28b88c92c36627f618610cf4856ece Mon Sep 17 00:00:00 2001 From: Toni Magni Date: Tue, 1 Jan 2019 17:11:23 +0000 Subject: [PATCH] Fixed issue that would cause zxfer to fail with error when run from Linux with -D flag: replaced obs=1m with obs=1048576 (same for bs=) to be compatible with both BSD and Linux versions of dd. --- zxfer | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zxfer b/zxfer index 3102833..79dfbeb 100755 --- a/zxfer +++ b/zxfer @@ -409,7 +409,7 @@ copy_snap() { echo "Estimated size is: ${SIZE_EST}" PROGRESS_DIALOG=$( echo "$option_D" | sed "s#%%size%%#$SIZE_EST#g" | \ sed "s#%%title%%#$copysrc#g" ) - $LZFS send "$copysrc" | dd obs=1m | dd bs=1m | $PROGRESS_DIALOG | \ + $LZFS send "$copysrc" | dd obs=1048576 | dd bs=1048576 | $PROGRESS_DIALOG | \ $RZFS receive $option_F "$copydest" || \ { echo "Error when zfs send/receiving."; beep; exit 1; } else @@ -420,7 +420,7 @@ copy_snap() { PROGRESS_DIALOG=$( echo $option_D | sed "s#%%size%%#$SIZE_EST#g" | \ sed "s#%%title%%#$copysrc#g" ) $LZFS send -nv "$copysrc" - echo "$LZFS send $copysrc | dd obs=1m | dd bs=1m | $PROGRESS_DIALOG | + echo "$LZFS send $copysrc | dd obs=1048576 | dd bs=1048576 | $PROGRESS_DIALOG | $RZFS receive $option_F $copydest" fi else @@ -441,7 +441,7 @@ copy_snap() { echo "Estimated size is: ${SIZE_EST}" PROGRESS_DIALOG=$( echo $option_D | sed "s#%%size%%#$SIZE_EST#g" | \ sed "s#%%title%%#$copysrc#g" ) - $LZFS send -i "$copyprev" "$copysrc" | dd obs=1m | dd bs=1m | \ + $LZFS send -i "$copyprev" "$copysrc" | dd obs=1048576 | dd bs=1048576 | \ $PROGRESS_DIALOG | $RZFS receive $option_F "$copydest" || \ { echo "Error when zfs send/receiving."; beep; exit 1; } else @@ -452,7 +452,7 @@ copy_snap() { PROGRESS_DIALOG=$( echo $option_D | sed "s#%%size%%#$SIZE_EST#g" | \ sed "s#%%title%%#$copysrc#g" ) $LZFS send -nv -i "$copyprev" "$copysrc" - echo "$LZFS send -i $copyprev $copysrc | dd obs=1m | dd bs=1m | \ + echo "$LZFS send -i $copyprev $copysrc | dd obs=1048576 | dd bs=1048576 | \ $PROGRESS_DIALOG | $RZFS receive $option_F $copydest" fi else