From: Jo-Philipp Wich Date: Sat, 4 Apr 2015 21:41:56 +0000 (+0200) Subject: Support comments in fs config X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmake_ext4fs.git;a=commitdiff_plain;h=af498dbd68b9b1e51b8c8ec1ff07f4def0ee5504 Support comments in fs config Signed-off-by: Jo-Philipp Wich --- diff --git a/canned_fs_config.c b/canned_fs_config.c index 6898ea2..a034005 100644 --- a/canned_fs_config.c +++ b/canned_fs_config.c @@ -53,6 +53,10 @@ int load_canned_fs_config(const char* fn) { } Path* p = canned_data + canned_used; p->path = strdup(strtok(line, " \t")); + + if (!p->path || !*p->path || *p->path == '#') + continue; + p->uid = atoi(strtok(NULL, " \t")); p->gid = atoi(strtok(NULL, " \t")); p->mode = strtol(strtok(NULL, " \t"), NULL, 8); // mode is in octal