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);
185 struct discover_class_node *node;
187 node = get_class_cache_entry_name(s);
188 if (node == NULL) {
189 node = discover_class(s);
191 if (node == NULL) {
197 return map_class(node->value);
223 struct discover_class_node *node;
226 node = get_class_cache_entry_value(kclass);
227 if (node != NULL) {
229 for (i=0; i<MAXVECTORS && node->perms[i] != NULL; i++)
230 if (strcmp(node->perms[i],s) == 0)
240 struct discover_class_node *node;
244 node = get_class_cache_entry_value(tclass);
245 if (node == NULL)
248 return node->name;
254 struct discover_class_node *node;
260 node = get_class_cache_entry_value(tclass);
261 if (av && node)
264 return node->perms[i];