summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-02-15 10:53:49 +0000
committerGitHub <noreply@github.com>2019-02-15 10:53:49 +0000
commit67a24410a76f0b3cd1da0ffa083b5eb174b6efcc (patch)
tree5977ac3e1713a2541f0c090125cf0b3e338e2856
parentd5211c023cf6f2b2dc508cdfbf5f66f44d2e8d01 (diff)
parentfa1db955e988012b8916c86bf8fc1d098d44c433 (diff)
downloadgenimage-67a24410a76f0b3cd1da0ffa083b5eb174b6efcc.tar.gz
genimage-67a24410a76f0b3cd1da0ffa083b5eb174b6efcc.tar.xz
Merge pull request #53 from michaelolbrich/ext
image-ext2: rename option mke2fs_conf -> mke2fs-conf
-rw-r--r--image-ext2.c9
-rw-r--r--test/mke2fs.config2
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