{
char *fn;
int err, nmatch = 0, i;
- struct index_file *index;
+ struct index_file *idx;
struct index_value *realnames, *realname;
struct kmod_list *l;
DBG(ctx, "file=%s name=%s\n", fn, name);
- index = index_file_open(fn);
- if (index == NULL) {
+ idx = index_file_open(fn);
+ if (idx == NULL) {
free(fn);
return -ENOSYS;
}
- realnames = index_searchwild(index, name);
+ realnames = index_searchwild(idx, name);
for (realname = realnames; realname; realname = realnames->next) {
struct kmod_module *mod;
}
index_values_free(realnames);
- index_file_close(index);
+ index_file_close(idx);
free(fn);
return nmatch;
struct kmod_list **list)
{
char *fn, *line, *p;
- struct index_file *index;
+ struct index_file *idx;
int n = 0;
/*
DBG(ctx, "file=%s modname=%s\n", fn, name);
- index = index_file_open(fn);
- if (index == NULL) {
+ idx = index_file_open(fn);
+ if (idx == NULL) {
free(fn);
return -ENOSYS;
}
- line = index_search(index, name);
+ line = index_search(idx, name);
if (line != NULL) {
struct kmod_module *mod;
finish:
free(line);
- index_file_close(index);
+ index_file_close(idx);
free(fn);
return n;