diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-12-17 11:23:59 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-02-15 11:43:08 +0100 |
commit | fa1db955e988012b8916c86bf8fc1d098d44c433 (patch) | |
tree | 5977ac3e1713a2541f0c090125cf0b3e338e2856 | |
parent | d5211c023cf6f2b2dc508cdfbf5f66f44d2e8d01 (diff) | |
download | genimage-fa1db955e988012b8916c86bf8fc1d098d44c433.tar.gz genimage-fa1db955e988012b8916c86bf8fc1d098d44c433.tar.xz |
image-ext2: rename option mke2fs_conf -> mke2fs-conf
Alle other multi word options use '-' as well.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | image-ext2.c | 9 | ||||
-rw-r--r-- | test/mke2fs.config | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/image-ext2.c b/image-ext2.c index 5b3790e..272198d 100644 --- a/image-ext2.c +++ b/image-ext2.c @@ -119,9 +119,15 @@ static int ext2_generate(struct image *image) static int ext2_setup(struct image *image, cfg_t *cfg) { struct ext *ext = xzalloc(sizeof(*ext)); - const char *conf = cfg_getstr(image->imagesec, "mke2fs_conf"); + const char *conf = cfg_getstr(image->imagesec, "mke2fs-conf"); const char *usage_type = cfg_getstr(image->imagesec, "usage-type"); + if (!conf) { + conf = cfg_getstr(image->imagesec, "mke2fs_conf"); + if (conf) + image_info(image, "option 'mke2fs_conf' is deprecated, use mke2fs-conf instead.\n"); + } + if (!image->size) { image_error(image, "no size given or must not be zero\n"); return -EINVAL; @@ -190,6 +196,7 @@ static cfg_opt_t ext_opts[] = { CFG_STR("fs-timestamp", NULL, CFGF_NONE), CFG_BOOL("use-mke2fs", cfg_false, CFGF_NONE), CFG_STR("usage-type", NULL, CFGF_NONE), + CFG_STR("mke2fs-conf", 0, CFGF_NONE), CFG_STR("mke2fs_conf", 0, CFGF_NONE), CFG_END() }; diff --git a/test/mke2fs.config b/test/mke2fs.config index 8b3aa43..877b4d5 100644 --- a/test/mke2fs.config +++ b/test/mke2fs.config @@ -3,7 +3,7 @@ image mke2fs.ext4 { label = "mke2fs" fs-timestamp = "20000101000000" use-mke2fs = true - mke2fs_conf = "mke2fs.conf" + mke2fs-conf = "mke2fs.conf" extraargs = "-U 12345678-1234-1234-1234-1234567890ab" } size = 32M |