udevadm-hwdb.c revision ee623f0d0c04a9c8da4953ddc29862c8c4945458
3988N/A along with systemd; If not, see <http://www.gnu.org/licenses/>.
3988N/A#include "conf-files.h"
3988N/A#include "libudev-hwdb-def.h"
3988N/Astatic const char * const conf_file_dirs[] = {
3988N/Astruct trie_child_entry {
3988N/Astruct trie_value_entry {
3988N/Astatic int node_add_child(struct trie *trie, struct trie_node *node, struct trie_node *node_child, uint8_t c) {
3988N/A child = realloc(node->children, (node->children_count + 1) * sizeof(struct trie_child_entry));
3988N/A qsort(node->children, node->children_count, sizeof(struct trie_child_entry), trie_children_cmp);
4001N/A child = bsearch(&search, node->children, node->children_count, sizeof(struct trie_child_entry), trie_children_cmp);
3988N/A val = xbsearch_r(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
3988N/A qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
3988N/A struct trie_node_f n = {
3988N/A struct trie_value_entry_f v = {
3988N/A char *filename_tmp;
struct trie_header_f h = {
int err;
if (err < 0)
return err;
if (err)
fclose(t.f);
goto out;
(unsigned long long)t.children_count * sizeof(struct trie_child_entry_f), (unsigned long long)t.children_count);
(unsigned long long)t.values_count * sizeof(struct trie_value_entry_f), (unsigned long long)t.values_count);
out:
return err;
FILE *f;
if (f == NULL)
return -errno;
char *value;
if (!value)
value++;
fclose(f);
static void help(void) {
bool update = false;
int err;
int option;
switch (option) {
update = true;
help();
return EXIT_SUCCESS;
help();
return EXIT_SUCCESS;
if (update) {
char **files, **f;
if (!trie) {
goto out;
goto out;
goto out;
if (err < 0) {
goto out;
if (err < 0) {
if (test) {
if (hwdb) {
out:
if (trie) {
return rc;