package/mke2img: specifying zero inodes means auto
Currently, leaving the number of inodes to be autocalculated requires the user to not specify the -i option at all. Also accept zero as meaning auto; this will help simplify the ext2.mk code a little bit. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
12a9fb947c
commit
9b5df8f2c3
@ -59,7 +59,7 @@ main() {
|
||||
esac
|
||||
|
||||
# calculate needed inodes
|
||||
if [ -z "${nb_inodes}" ]; then
|
||||
if [ ${nb_inodes:-0} -eq 0 ]; then
|
||||
nb_inodes=$(find "${root_dir}" | wc -l)
|
||||
nb_inodes=$((nb_inodes+400))
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user