trie               86 src/udev/udevadm-hwdb.c static int node_add_child(struct trie *trie, struct trie_node *node, struct trie_node *node_child, uint8_t c) {
trie               95 src/udev/udevadm-hwdb.c         trie->children_count++;
trie              100 src/udev/udevadm-hwdb.c         trie->nodes_count++;
trie              129 src/udev/udevadm-hwdb.c         struct trie *trie = arg;
trie              131 src/udev/udevadm-hwdb.c         return strcmp(trie->strings->buf + val1->key_off,
trie              132 src/udev/udevadm-hwdb.c                       trie->strings->buf + val2->key_off);
trie              135 src/udev/udevadm-hwdb.c static int trie_node_add_value(struct trie *trie, struct trie_node *node,
trie              140 src/udev/udevadm-hwdb.c         k = strbuf_add_string(trie->strings, key, strlen(key));
trie              143 src/udev/udevadm-hwdb.c         v = strbuf_add_string(trie->strings, value, strlen(value));
trie              153 src/udev/udevadm-hwdb.c                 val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
trie              165 src/udev/udevadm-hwdb.c         trie->values_count++;
trie              170 src/udev/udevadm-hwdb.c         qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
trie              174 src/udev/udevadm-hwdb.c static int trie_insert(struct trie *trie, struct trie_node *node, const char *search,
trie              184 src/udev/udevadm-hwdb.c                 for (p = 0; (c = trie->strings->buf[node->prefix_off + p]); p++) {
trie              205 src/udev/udevadm-hwdb.c                         s = strndup(trie->strings->buf + node->prefix_off, p);
trie              209 src/udev/udevadm-hwdb.c                         off = strbuf_add_string(trie->strings, s, p);
trie              218 src/udev/udevadm-hwdb.c                         err = node_add_child(trie, node, new_child, c);
trie              229 src/udev/udevadm-hwdb.c                         return trie_node_add_value(trie, node, key, value);
trie              240 src/udev/udevadm-hwdb.c                         off = strbuf_add_string(trie->strings, search + i+1, strlen(search + i+1));
trie              247 src/udev/udevadm-hwdb.c                         err = node_add_child(trie, node, child, c);
trie              253 src/udev/udevadm-hwdb.c                         return trie_node_add_value(trie, child, key, value);
trie              263 src/udev/udevadm-hwdb.c         struct trie *trie;
trie              272 src/udev/udevadm-hwdb.c static void trie_store_nodes_size(struct trie_f *trie, struct trie_node *node) {
trie              276 src/udev/udevadm-hwdb.c                 trie_store_nodes_size(trie, node->children[i].child);
trie              278 src/udev/udevadm-hwdb.c         trie->strings_off += sizeof(struct trie_node_f);
trie              280 src/udev/udevadm-hwdb.c                 trie->strings_off += sizeof(struct trie_child_entry_f);
trie              282 src/udev/udevadm-hwdb.c                 trie->strings_off += sizeof(struct trie_value_entry_f);
trie              285 src/udev/udevadm-hwdb.c static int64_t trie_store_nodes(struct trie_f *trie, struct trie_node *node) {
trie              288 src/udev/udevadm-hwdb.c                 .prefix_off = htole64(trie->strings_off + node->prefix_off),
trie              305 src/udev/udevadm-hwdb.c                 child_off = trie_store_nodes(trie, node->children[i].child);
trie              315 src/udev/udevadm-hwdb.c         node_off = ftello(trie->f);
trie              316 src/udev/udevadm-hwdb.c         fwrite(&n, sizeof(struct trie_node_f), 1, trie->f);
trie              317 src/udev/udevadm-hwdb.c         trie->nodes_count++;
trie              321 src/udev/udevadm-hwdb.c                 fwrite(children, sizeof(struct trie_child_entry_f), node->children_count, trie->f);
trie              322 src/udev/udevadm-hwdb.c                 trie->children_count += node->children_count;
trie              329 src/udev/udevadm-hwdb.c                         .key_off = htole64(trie->strings_off + node->values[i].key_off),
trie              330 src/udev/udevadm-hwdb.c                         .value_off = htole64(trie->strings_off + node->values[i].value_off),
trie              333 src/udev/udevadm-hwdb.c                 fwrite(&v, sizeof(struct trie_value_entry_f), 1, trie->f);
trie              334 src/udev/udevadm-hwdb.c                 trie->values_count++;
trie              340 src/udev/udevadm-hwdb.c static int trie_store(struct trie *trie, const char *filename) {
trie              342 src/udev/udevadm-hwdb.c                 .trie = trie,
trie              360 src/udev/udevadm-hwdb.c         trie_store_nodes_size(&t, trie->root);
trie              374 src/udev/udevadm-hwdb.c         root_off = trie_store_nodes(&t, trie->root);
trie              380 src/udev/udevadm-hwdb.c         fwrite(trie->strings->buf, trie->strings->len, 1, t.f);
trie              381 src/udev/udevadm-hwdb.c         h.strings_len = htole64(trie->strings->len);
trie              411 src/udev/udevadm-hwdb.c         log_debug("string store:     %8zu bytes", trie->strings->len);
trie              417 src/udev/udevadm-hwdb.c static int insert_data(struct trie *trie, struct udev_list *match_list,
trie              441 src/udev/udevadm-hwdb.c                 trie_insert(trie, trie->root, udev_list_entry_get_name(entry), line, value);
trie              446 src/udev/udevadm-hwdb.c static int import_file(struct udev *udev, struct trie *trie, const char *filename) {
trie              512 src/udev/udevadm-hwdb.c                         insert_data(trie, &match_list, line, filename);
trie              530 src/udev/udevadm-hwdb.c                         insert_data(trie, &match_list, line, filename);
trie              566 src/udev/udevadm-hwdb.c         struct trie *trie = NULL;
trie              602 src/udev/udevadm-hwdb.c                 trie = new0(struct trie, 1);
trie              603 src/udev/udevadm-hwdb.c                 if (!trie) {
trie              609 src/udev/udevadm-hwdb.c                 trie->strings = strbuf_new();
trie              610 src/udev/udevadm-hwdb.c                 if (!trie->strings) {
trie              616 src/udev/udevadm-hwdb.c                 trie->root = new0(struct trie_node, 1);
trie              617 src/udev/udevadm-hwdb.c                 if (!trie->root) {
trie              621 src/udev/udevadm-hwdb.c                 trie->nodes_count++;
trie              631 src/udev/udevadm-hwdb.c                         import_file(udev, trie, *f);
trie              635 src/udev/udevadm-hwdb.c                 strbuf_complete(trie->strings);
trie              639 src/udev/udevadm-hwdb.c                           trie->nodes_count * sizeof(struct trie_node), trie->nodes_count);
trie              641 src/udev/udevadm-hwdb.c                           trie->children_count * sizeof(struct trie_child_entry), trie->children_count);
trie              643 src/udev/udevadm-hwdb.c                           trie->values_count * sizeof(struct trie_value_entry), trie->values_count);
trie              645 src/udev/udevadm-hwdb.c                           trie->strings->len);
trie              647 src/udev/udevadm-hwdb.c                           trie->strings->in_len, trie->strings->in_count);
trie              649 src/udev/udevadm-hwdb.c                           trie->strings->dedup_len, trie->strings->dedup_count);
trie              657 src/udev/udevadm-hwdb.c                 err = trie_store(trie, hwdb_bin);
trie              676 src/udev/udevadm-hwdb.c         if (trie) {
trie              677 src/udev/udevadm-hwdb.c                 if (trie->root)
trie              678 src/udev/udevadm-hwdb.c                         trie_node_cleanup(trie->root);
trie              679 src/udev/udevadm-hwdb.c                 strbuf_cleanup(trie->strings);
trie              680 src/udev/udevadm-hwdb.c                 free(trie);