X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmake_ext4fs.git;a=blobdiff_plain;f=canned_fs_config.c;h=a034005a57545079e8dfbab11ace7606550bb9ae;hp=6898ea217138f62ffda0f4c5f7cae4e02c8a3637;hb=af498dbd68b9b1e51b8c8ec1ff07f4def0ee5504;hpb=5bb3a9e3deb7c3a69bca977eb6f438d2e972e70c 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