From: <romuald.jeanne@st.com>
To: <openembedded-core@lists.openembedded.org>
Cc: Romuald JEANNE <romuald.jeanne@st.com>
Subject: [PATCH] image_types: fix vname var init in multiubi_mkfs() function
Date: Thu, 9 Mar 2023 08:54:52 +0100 [thread overview]
Message-ID: <20230309075452.6463-1-romuald.jeanne@st.com> (raw)
From: Romuald JEANNE <romuald.jeanne@st.com>
As vname var is needed in multiubi_mkfs() function, we need to keep it
defined and use it as parameter to the new write_ubi_config() function.
See [YOCTO #15027]
Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
---
meta/classes-recipe/image_types.bbclass | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass
index 764e6a5574..c6cb8f5336 100644
--- a/meta/classes-recipe/image_types.bbclass
+++ b/meta/classes-recipe/image_types.bbclass
@@ -157,11 +157,7 @@ UBI_VOLTYPE ?= "dynamic"
UBI_IMGTYPE ?= "ubifs"
write_ubi_config() {
- if [ -z "$1" ]; then
- local vname=""
- else
- local vname="_$1"
- fi
+ local vname="$1"
cat <<EOF > ubinize${vname}-${IMAGE_NAME}.cfg
[ubifs]
@@ -183,7 +179,12 @@ multiubi_mkfs() {
bbfatal "MKUBIFS_ARGS and UBINIZE_ARGS have to be set, see http://www.linux-mtd.infradead.org/faq/ubifs.html for details"
fi
- write_ubi_config "$3"
+ if [ -z "$3" ]; then
+ local vname=""
+ else
+ local vname="_$3"
+ fi
+ write_ubi_config "${vname}"
if [ -n "$vname" ]; then
mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
--
2.17.1
next reply other threads:[~2023-03-09 7:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 7:54 romuald.jeanne [this message]
2023-03-09 8:30 ` [OE-core] [PATCH] image_types: fix vname var init in multiubi_mkfs() function Martin Jansa
2023-03-09 9:28 ` Romuald JEANNE
2023-03-09 9:46 ` Martin Jansa
2023-03-09 9:50 ` Martin Jansa
-- strict thread matches above, loose matches on Subject: below --
2023-03-03 10:54 romuald.jeanne
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=20230309075452.6463-1-romuald.jeanne@st.com \
--to=romuald.jeanne@st.com \
--cc=openembedded-core@lists.openembedded.org \
/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