All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] image_types: fix vname var init in multiubi_mkfs() function
@ 2023-03-03 10:54 romuald.jeanne
  2023-03-03 21:29 ` [OE-core] " Alexandre Belloni
  0 siblings, 1 reply; 6+ messages in thread
From: romuald.jeanne @ 2023-03-03 10:54 UTC (permalink / raw)
  To: openembedded-core; +Cc: Romuald JEANNE

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..77cb22cf9c 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 "$1" ]; 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



^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] image_types: fix vname var init in multiubi_mkfs() function
@ 2023-03-09  7:54 romuald.jeanne
  2023-03-09  8:30 ` [OE-core] " Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: romuald.jeanne @ 2023-03-09  7:54 UTC (permalink / raw)
  To: openembedded-core; +Cc: Romuald JEANNE

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



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

end of thread, other threads:[~2023-03-09  9:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-03 10:54 [PATCH] image_types: fix vname var init in multiubi_mkfs() function romuald.jeanne
2023-03-03 21:29 ` [OE-core] " Alexandre Belloni
  -- strict thread matches above, loose matches on Subject: below --
2023-03-09  7:54 romuald.jeanne
2023-03-09  8:30 ` [OE-core] " Martin Jansa
2023-03-09  9:28   ` Romuald JEANNE
2023-03-09  9:46     ` Martin Jansa
2023-03-09  9:50       ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.