Skip to content

Commit

Permalink
Merge pull request #772 from dirkmueller/cleanup_dd
Browse files Browse the repository at this point in the history
avoid printing transfer output
  • Loading branch information
adrianschroeter committed Jan 31, 2022
2 parents 55756f2 + ef6d904 commit 035ae4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build-vm
Expand Up @@ -358,7 +358,7 @@ vm_img_create() {

mkdir -p "${img%/*}" || cleanup_and_exit 4
# truncate file to the desired size
dd if=/dev/zero of="$img" bs=1M count=0 seek="$size" || cleanup_and_exit 4
dd if=/dev/zero of="$img" bs=1M count=0 seek="$size" status=noxfer || cleanup_and_exit 4
echo "$size" > "${img}.size"
# allocate blocks
if type -p fallocate > /dev/null ; then
Expand Down Expand Up @@ -750,7 +750,7 @@ vm_setup_swap() {
fi
if test -n "$VM_SWAP" ; then
vm_attach_swap
dd if=/dev/zero of="$VM_SWAP" bs=1024 count=1 conv=notrunc 2>/dev/null || cleanup_and_exit 4
dd if=/dev/zero of="$VM_SWAP" bs=1024 count=1 conv=notrunc status=noxfer || cleanup_and_exit 4
if test "$VM_SWAPDEV" != "${VM_SWAPDEV#LABEL=}"; then
# call mkswap to set a label
mkswap -L "${VM_SWAPDEV#LABEL=}" "$VM_SWAP" || cleanup_and_exit 4
Expand Down Expand Up @@ -1071,7 +1071,7 @@ vm_first_stage() {
vm_attach_root
if test -n "$VM_SWAP" -a -z "$RUN_SHELL" ; then
vm_attach_swap
BUILDSTATUS=$(dd if="$VM_SWAP" bs=12 count=1 2>/dev/null | tr '\0' a)
BUILDSTATUS=$(dd if="$VM_SWAP" bs=12 count=1 status=noxfer | tr '\0' a)
case $BUILDSTATUS in
BUILDSTATUS[029])
mkdir -p $BUILD_ROOT/.build.packages
Expand Down

0 comments on commit 035ae4e

Please sign in to comment.