allow parse_depline to be called when already initialized as it may be
called from libkmod.c and at that point there is no way to check
mod->init.dep
char *path;
struct kmod_list *dep;
int refcount;
+ int n_dep;
struct {
bool dep : 1;
} init;
int err, n = 0;
size_t dirnamelen;
- assert(!mod->init.dep && mod->dep == NULL);
+ if (mod->init.dep)
+ return mod->n_dep;
+ assert(mod->dep == NULL);
mod->init.dep = true;
p = strchr(line, ':');
DBG(ctx, "%d dependencies for %s\n", n, mod->name);
mod->dep = list;
+ mod->n_dep = n;
return n;
fail: