Output DD results

This commit is contained in:
Joshua Boniface 2023-09-01 15:41:57 -04:00
parent df9b6e4dc6
commit afc125bf83
1 changed files with 4 additions and 3 deletions

View File

@ -518,10 +518,11 @@ blockcheck() {
echo -n "Checking if block device '${target_disk}' is already wiped... "
if ! cmp --silent --bytes ${blockdev_size_bytes} /dev/zero ${target_disk}; then
echo "false."
echo -n "Wiping block device '${target_disk}' (${count} blocks of ${size} bytes)... "
dd if=/dev/zero of=${target_disk} bs=${size} count=${count} oflag=direct &>/dev/null
fi
echo "Wiping block device '${target_disk}' (${count} blocks of ${size} bytes)..."
dd if=/dev/zero of=${target_disk} bs=${size} count=${count} oflag=direct status=progress
else
echo "done."
fi
}
blockcheck