From af498dbd68b9b1e51b8c8ec1ff07f4def0ee5504 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 4 Apr 2015 23:41:56 +0200 Subject: [PATCH] Support comments in fs config Signed-off-by: Jo-Philipp Wich --- canned_fs_config.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.11.0