Skip to content

Commit

Permalink
libudev: import hwdb and export lookup interface
Browse files Browse the repository at this point in the history
  • Loading branch information
kaysievers committed Oct 27, 2012
1 parent 19e6561 commit 2001208
Show file tree
Hide file tree
Showing 12 changed files with 516 additions and 306 deletions.
11 changes: 6 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ SUBDIRS = . po
# remove targets if the command fails
.DELETE_ON_ERROR:

LIBUDEV_CURRENT=2
LIBUDEV_REVISION=6
LIBUDEV_AGE=1
LIBUDEV_CURRENT=3
LIBUDEV_REVISION=0
LIBUDEV_AGE=2

LIBGUDEV_CURRENT=1
LIBGUDEV_REVISION=2
Expand Down Expand Up @@ -1688,7 +1688,9 @@ libudev_la_SOURCES =\
src/libudev/libudev-device.c \
src/libudev/libudev-enumerate.c \
src/libudev/libudev-monitor.c \
src/libudev/libudev-queue.c
src/libudev/libudev-queue.c \
src/libudev/libudev-hwdb-def.h \
src/libudev/libudev-hwdb.c

libudev_la_CFLAGS = \
$(AM_CFLAGS) \
Expand Down Expand Up @@ -1833,7 +1835,6 @@ noinst_LTLIBRARIES += \

libudev_core_la_SOURCES = \
src/udev/udev.h \
src/udev/udev-hwdb.h \
src/udev/udev-event.c \
src/udev/udev-watch.c \
src/udev/udev-node.c \
Expand Down
2 changes: 1 addition & 1 deletion docs/libudev/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ EXTRA_HFILES=

# Header files to ignore when scanning. Use base file name, no paths
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
IGNORE_HFILES = libudev-private.h
IGNORE_HFILES = libudev-private.h libudev-hwdb-def.h

# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
Expand Down
1 change: 1 addition & 0 deletions docs/libudev/libudev-docs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<xi:include href="xml/libudev-monitor.xml"/>
<xi:include href="xml/libudev-enumerate.xml"/>
<xi:include href="xml/libudev-queue.xml"/>
<xi:include href="xml/libudev-hwdb.xml"/>
<xi:include href="xml/libudev-util.xml"/>
<xi:include href="xml/api-index-deprecated.xml"/>
</chapter>
Expand Down
10 changes: 10 additions & 0 deletions docs/libudev/libudev-sections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ udev_queue_get_kernel_seqnum
udev_queue_get_udev_seqnum
</SECTION>

<SECTION>
<FILE>libudev-hwdb</FILE>
<TITLE>udev_hwdb</TITLE>
udev_hwdb
udev_hwdb_ref
udev_hwdb_unref
udev_hwdb_new
udev_hwdb_get_properties_list_entry
</SECTION>

<SECTION>
<FILE>libudev-util</FILE>
<TITLE>udev_util</TITLE>
Expand Down
5 changes: 5 additions & 0 deletions src/udev/udev-hwdb.h → src/libudev/libudev-hwdb-def.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#ifndef _LIBUDEV_HWDB_DEF_H_
#define _LIBUDEV_HWDB_DEF_H_

#include "sparse-endian.h"

#define HWDB_SIG { 'K', 'S', 'L', 'P', 'H', 'H', 'R', 'H' }
Expand Down Expand Up @@ -67,3 +70,5 @@ _packed_ struct trie_value_entry_f {
le64_t key_off;
le64_t value_off;
};

#endif
Loading

0 comments on commit 2001208

Please sign in to comment.