From 340af407d52669b9c9a8fa3d0a3592ae248b77d1 Mon Sep 17 00:00:00 2001 From: Mirza Krak Date: Mon, 20 May 2019 13:23:11 +0200 Subject: [PATCH] do not fail conversion in disk_image_shrink_rootfs That is if it fails, proceed with conversion without it. The current logic only supports shrinking a rootfs on BBB and RPi devices (this is deducted from $raw_disk_counts) and calling 'disk_image_shrink_rootfs' would fail on 'qemux86_64' device. Shrinking the rootfs is not a hard-requirement and is only an optimization (mainly for RPi devices). Changelog: None Signed-off-by: Mirza Krak --- mender-convert | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mender-convert b/mender-convert index 4b582c2..e2813c4 100755 --- a/mender-convert +++ b/mender-convert @@ -150,8 +150,8 @@ do_raw_disk_image_shrink_rootfs() { elif [[ $raw_disk_counts -eq 2 ]]; then sudo losetup $loopdevice $raw_disk_image -o $((${raw_disk_sizes[prootfs_start]} * $sector_size)) else - log "Error: invalid/unsupported embedded raw disk image. Aborting." - return 1 + log "Warning: invalid/unsupported embedded raw disk image. Skipping resize..." + return 0 fi block_size=($(sudo dumpe2fs -h $loopdevice | grep 'Block size' | tr -s ' ' | cut -d ' ' -f3))