[Buildroot] [PATCH 1/2] ext2.mk: ensure file system block count is not zero (0)

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Apr 29 19:03:58 UTC 2017


Hello,

On Sat, 29 Apr 2017 17:01:21 +0100, J Evans wrote:

> -ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
> +ifeq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
> +$(error BR2_TARGET_ROOTFS_EXT2_BLOCKS cannot be zero (0))
> +else
>  EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
>  endif

What is the motivation for checking that the size is not zero? Zero is
like any other size too small to contain the target directory contents,
so I don't see why we would add a specific check for it.

Your commit log unfortunately only explains *what* the commit is doing
(which is obvious by reading the code) but not *why* this change is
necessary.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the buildroot mailing list