* [Buildroot] [PATCH] fs/ext2: fix namespace for variables
@ 2021-09-17 20:19 Yann E. MORIN
2021-10-05 13:43 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2021-09-17 20:19 UTC (permalink / raw)
To: buildroot; +Cc: Kory Maincent, Yann E. MORIN
In filesystems, variables must be prefixed with ROOTFS_, to avoid
ckashing with packages of the same name.
We do not have a package named 'ext2', so we currently have no clash,
but it is still ebtter that the variables be properly namespaced.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Kory Maincent <kory.maincent@bootlin.com>
---
fs/ext2/ext2.mk | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
index 74c99bd7b1..0b797f315f 100644
--- a/fs/ext2/ext2.mk
+++ b/fs/ext2/ext2.mk
@@ -4,32 +4,32 @@
#
################################################################################
-EXT2_SIZE = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_SIZE))
-ifeq ($(BR2_TARGET_ROOTFS_EXT2)-$(EXT2_SIZE),y-)
+ROOTFS_EXT2_SIZE = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_SIZE))
+ifeq ($(BR2_TARGET_ROOTFS_EXT2)-$(ROOTFS_EXT2_SIZE),y-)
$(error BR2_TARGET_ROOTFS_EXT2_SIZE cannot be empty)
endif
-EXT2_MKFS_OPTS = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS))
+ROOTFS_EXT2_MKFS_OPTS = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS))
# qstrip results in stripping consecutive spaces into a single one. So the
# variable is not qstrip-ed to preserve the integrity of the string value.
-EXT2_LABEL = $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL))
+ROOTFS_EXT2_LABEL = $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL))
#" Syntax highlighting... :-/ )
-EXT2_OPTS = \
+ROOTFS_EXT2_OPTS = \
-d $(TARGET_DIR) \
-r $(BR2_TARGET_ROOTFS_EXT2_REV) \
-N $(BR2_TARGET_ROOTFS_EXT2_INODES) \
-m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) \
-L "$(EXT2_LABEL)" \
- $(EXT2_MKFS_OPTS)
+ $(ROOTFS_EXT2_MKFS_OPTS)
ROOTFS_EXT2_DEPENDENCIES = host-e2fsprogs
define ROOTFS_EXT2_CMD
rm -f $@
- $(HOST_DIR)/sbin/mkfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN) $(EXT2_OPTS) $@ \
- "$(EXT2_SIZE)" \
+ $(HOST_DIR)/sbin/mkfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN) $(ROOTFS_EXT2_OPTS) $@ \
+ "$(ROOTFS_EXT2_SIZE)" \
|| { ret=$$?; \
echo "*** Maybe you need to increase the filesystem size (BR2_TARGET_ROOTFS_EXT2_SIZE)" 1>&2; \
exit $$ret; \
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] fs/ext2: fix namespace for variables
2021-09-17 20:19 [Buildroot] [PATCH] fs/ext2: fix namespace for variables Yann E. MORIN
@ 2021-10-05 13:43 ` Peter Korsgaard
2021-10-05 15:27 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2021-10-05 13:43 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: Kory Maincent, buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> In filesystems, variables must be prefixed with ROOTFS_, to avoid
> ckashing with packages of the same name.
> We do not have a package named 'ext2', so we currently have no clash,
> but it is still ebtter that the variables be properly namespaced.
s/ebtter/better/ ;)
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Kory Maincent <kory.maincent@bootlin.com>
Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] fs/ext2: fix namespace for variables
2021-10-05 13:43 ` Peter Korsgaard
@ 2021-10-05 15:27 ` Yann E. MORIN
2021-10-05 16:57 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2021-10-05 15:27 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: Kory Maincent, buildroot
Peter
On 2021-10-05 15:43 +0200, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> > In filesystems, variables must be prefixed with ROOTFS_, to avoid
> > ckashing with packages of the same name.
^^^^^^^^
> > We do not have a package named 'ext2', so we currently have no clash,
> > but it is still ebtter that the variables be properly namespaced.
> s/ebtter/better/ ;)
Lol. But you missed s/ckashing/clashing/ above. ;-)
> > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> > Cc: Kory Maincent <kory.maincent@bootlin.com>
> Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.
Thanks for the backports! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] fs/ext2: fix namespace for variables
2021-10-05 15:27 ` Yann E. MORIN
@ 2021-10-05 16:57 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2021-10-05 16:57 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: Kory Maincent, buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> Peter
> On 2021-10-05 15:43 +0200, Peter Korsgaard spake thusly:
>> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
>> > In filesystems, variables must be prefixed with ROOTFS_, to avoid
>> > ckashing with packages of the same name.
> ^^^^^^^^
>> > We do not have a package named 'ext2', so we currently have no clash,
>> > but it is still ebtter that the variables be properly namespaced.
>> s/ebtter/better/ ;)
> Lol. But you missed s/ckashing/clashing/ above. ;-)
Grr, indeed ;)
>> > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
>> > Cc: Kory Maincent <kory.maincent@bootlin.com>
>> Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.
> Thanks for the backports! :-)
You're welcome!
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-05 16:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 20:19 [Buildroot] [PATCH] fs/ext2: fix namespace for variables Yann E. MORIN
2021-10-05 13:43 ` Peter Korsgaard
2021-10-05 15:27 ` Yann E. MORIN
2021-10-05 16:57 ` Peter Korsgaard
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.