Home | History | Annotate | Download | only in testsuite

Lines Matching refs:mod

37 struct mod {
38 struct mod *next;
44 static struct mod *modules;
47 static void parse_retcodes(struct mod **_modules, const char *s)
55 struct mod *mod;
89 mod = malloc(sizeof(*mod) + modnamelen + 1);
90 if (mod == NULL)
93 memcpy(mod->name, modname, modnamelen);
94 mod->name[modnamelen] = '\0';
95 mod->ret = ret;
96 mod->errcode = errcode;
97 mod->next = *_modules;
98 *_modules = mod;
102 static struct mod *find_module(struct mod *_modules, const char *modname)
104 struct mod *mod;
106 for (mod = _modules; mod != NULL; mod = mod->next) {
107 if (streq(mod->name, modname))
108 return mod;
117 struct mod *mod;
131 for (mod = modules; mod != NULL; mod = mod->next) {
134 mod->name, mod->ret, mod->errcode);
148 struct mod *mod;
151 mod = find_module(modules, modname);
152 if (mod == NULL)
155 errno = mod->errcode;
156 return mod->ret;
164 struct mod *mod = modules->next;
166 modules = mod;