]>
git.proxmox.com Git - systemd.git/blob - src/libsystemd/sd-hwdb/hwdb-internal.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2012 Kay Sievers <kay@vrfy.org>
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 #include "sparse-endian.h"
26 #define HWDB_SIG { 'K', 'S', 'L', 'P', 'H', 'H', 'R', 'H' }
28 /* on-disk trie objects */
29 struct trie_header_f
{
32 /* version of tool which created the file */
36 /* size of structures to allow them to grow */
39 le64_t child_entry_size
;
40 le64_t value_entry_size
;
42 /* offset of the root trie node */
43 le64_t nodes_root_off
;
45 /* size of the nodes and string section */
51 /* prefix of lookup string, shared by all children */
53 /* size of children entry array appended to the node */
54 uint8_t children_count
;
56 /* size of value entry array appended to the node */
60 /* array of child entries, follows directly the node record */
61 struct trie_child_entry_f
{
62 /* index of the child node */
65 /* offset of the child node */
69 /* array of value entries, follows directly the node record/child array */
70 struct trie_value_entry_f
{
75 /* v2 extends v1 with filename and line-number */
76 struct trie_value_entry2_f
{