public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] installer/deploy-image: Add disk size to image
@ 2024-03-25 15:33 Quirin Gylstorff
  2024-04-09  5:23 ` Uladzimir Bely
  0 siblings, 1 reply; 2+ messages in thread
From: Quirin Gylstorff @ 2024-03-25 15:33 UTC (permalink / raw)
  To: isar-users, felix.moessbauer

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

This allows the user to check if the correct image was selected.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .../deploy-image/files/deploy-image-wic.sh                 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh
index 6a28f6ef..8043aff1 100644
--- a/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh
+++ b/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh
@@ -77,7 +77,8 @@ fi
 if [ "$(echo "$target_device_list" | wc -w)" -gt 1 ]; then
     array=()
     for target in $target_device_list; do
-        array+=("$target" "/dev/$target")
+        target_size=$(lsblk --nodeps --noheadings -o SIZE /dev/"$target")
+        array+=("$target" "/dev/$target $target_size")
     done
     TARGET_DEVICE=$(dialog --clear \
                 --no-tags --menu "Select device to install $DISK_IMAGE" 10 60 3 \
@@ -86,8 +87,8 @@ if [ "$(echo "$target_device_list" | wc -w)" -gt 1 ]; then
 else
     TARGET_DEVICE=$(echo "$target_device_list" | tr -d " ")
 fi
-
-dialog --msgbox "Start installing '$DISK_IMAGE' to '$TARGET_DEVICE'." 7 60
+TARGET_DEVICE_SIZE=$(lsblk --nodeps --noheadings -o SIZE /dev/"$TARGET_DEVICE")
+dialog --msgbox "Start installing '$DISK_IMAGE' to '$TARGET_DEVICE'(Size: '$TARGET_DEVICE_SIZE' )." 7 60
 
 set -e
 bmap_options=""
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] installer/deploy-image: Add disk size to image
  2024-03-25 15:33 [PATCH] installer/deploy-image: Add disk size to image Quirin Gylstorff
@ 2024-04-09  5:23 ` Uladzimir Bely
  0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2024-04-09  5:23 UTC (permalink / raw)
  To: Quirin Gylstorff, isar-users, felix.moessbauer

On Mon, 2024-03-25 at 16:33 +0100, 'Quirin Gylstorff' via isar-users
wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> This allows the user to check if the correct image was selected.
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>  .../deploy-image/files/deploy-image-wic.sh                 | 7 ++++-
> --
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 

-- 
Applied to next, thanks.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-09  5:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 15:33 [PATCH] installer/deploy-image: Add disk size to image Quirin Gylstorff
2024-04-09  5:23 ` Uladzimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox