Lines Matching defs:entry
38 * Opaque object representing one entry in a list. An entry contains
76 void udev_list_node_remove(struct udev_list_node *entry)
78 struct udev_list_node *prev = entry->prev;
79 struct udev_list_node *next = entry->next;
84 entry->prev = NULL;
85 entry->next = NULL;
88 /* return list entry which embeds this node */
102 /* insert entry into a list as the last element */
110 /* insert entry into a list, before a given existing entry */
111 static void udev_list_entry_insert_before(struct udev_list_entry *new, struct udev_list_entry *entry)
113 udev_list_node_insert_between(&new->node, entry->node.prev, &entry->node);
114 new->list = entry->list;
144 struct udev_list_entry *entry;
151 entry = list->entries[i];
153 free(entry->value);
155 entry->value = NULL;
156 return entry;
158 entry->value = strdup(value);
159 if (entry->value == NULL)
161 return entry;
166 entry = new0(struct udev_list_entry, 1);
167 if (entry == NULL)
169 entry->name = strdup(name);
170 if (entry->name == NULL) {
171 free(entry);
175 entry->value = strdup(value);
176 if (entry->value == NULL) {
177 free(entry->name);
178 free(entry);
194 free(entry->name);
195 free(entry->value);
196 free(entry);
208 udev_list_entry_insert_before(entry, list->entries[i]);
210 udev_list_entry_append(entry, list);
215 list->entries[i] = entry;
218 udev_list_entry_append(entry, list);
221 return entry;
224 void udev_list_entry_delete(struct udev_list_entry *entry)
226 if (entry->list->entries != NULL) {
228 struct udev_list *list = entry->list;
230 /* remove entry from sorted array */
231 i = list_search(list, entry->name);
239 udev_list_node_remove(&entry->node);
240 free(entry->name);
241 free(entry->value);
242 free(entry);
266 * @list_entry: current entry
268 * Get the next entry from the list.
287 * @list_entry: current entry
290 * Lookup an entry in the list with a certain name.
292 * Returns: udev_list_entry, #NULL if no matching entry is found.
312 * @list_entry: current entry
314 * Get the name of a list entry.
316 * Returns: the name string of this entry.
327 * @list_entry: current entry
329 * Get the value of list entry.
331 * Returns: the value string of this entry.