projects
/
project
/
make_ext4fs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bb3a9e
)
Support comments in fs config
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 4 Apr 2015 21:41:56 +0000
(23:41 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 8 Apr 2015 05:51:39 +0000
(07:51 +0200)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
canned_fs_config.c
patch
|
blob
|
history
diff --git
a/canned_fs_config.c
b/canned_fs_config.c
index 6898ea217138f62ffda0f4c5f7cae4e02c8a3637..a034005a57545079e8dfbab11ace7606550bb9ae 100644
(file)
--- 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