From: Quirin Gylstorff <Quirin.Gylstorff@siemens.com>
To: isar-users@googlegroups.com, felix.moessbauer@siemens.com
Subject: [PATCH] installer/deploy-image: Add disk size to image
Date: Mon, 25 Mar 2024 16:33:29 +0100 [thread overview]
Message-ID: <20240325153430.2099016-1-Quirin.Gylstorff@siemens.com> (raw)
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
next reply other threads:[~2024-03-25 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 15:33 Quirin Gylstorff [this message]
2024-04-09 5:23 ` Uladzimir Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240325153430.2099016-1-Quirin.Gylstorff@siemens.com \
--to=quirin.gylstorff@siemens.com \
--cc=felix.moessbauer@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox