Lines Matching refs:node
34 struct discover_class_node *node = discover_class_cache;
36 for (; node != NULL && strcmp(s,node->name) != 0; node = node->next);
38 return node;
43 struct discover_class_node *node = discover_class_cache;
45 for (; node != NULL && c != node->value; node = node->next);
47 return node;
59 struct discover_class_node *node;
66 /* allocate a node */
67 node = malloc(sizeof(struct discover_class_node));
68 if (node == NULL)
72 node->perms = calloc(MAXVECTORS,sizeof(char*));
73 if (node->perms == NULL)
77 node->name = strdup(s);
78 if (node->name == NULL)
93 if (sscanf(buf, "%hu", &node->value) != 1)
135 node->perms[value-1] = strdup(dentry->d_name);
136 if (node->perms[value-1] == NULL)
143 node->next = discover_class_cache;
144 discover_class_cache = node;
146 return node;
151 free(node->perms[i]);
153 free(node->name);
155 free(node->perms);
157 free(node);
163 struct discover_class_node *node;
165 node = get_class_cache_entry_name(s);
166 if (node == NULL) {
167 node = discover_class(s);
169 if (node == NULL) {
175 return map_class(node->value);
180 struct discover_class_node *node;
183 node = get_class_cache_entry_value(kclass);
184 if (node != NULL) {
186 for (i=0; i<MAXVECTORS && node->perms[i] != NULL; i++)
187 if (strcmp(node->perms[i],s) == 0)
197 struct discover_class_node *node;
201 node = get_class_cache_entry_value(tclass);
202 if (node)
203 return node->name;
210 struct discover_class_node *node;
216 node = get_class_cache_entry_value(tclass);
217 if (av && node)
220 return node->perms[i];