diff options
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 50 | ||||
-rw-r--r-- | docs/gudev/Makefile.am | 5 | ||||
-rw-r--r-- | docs/gudev/version.xml | 1 | ||||
-rw-r--r-- | docs/libudev/version.xml | 1 | ||||
-rw-r--r-- | hwdb/Makefile.am | 1 | ||||
-rw-r--r-- | src/Makefile.am | 17 | ||||
-rw-r--r-- | src/accelerometer/Makefile.am (renamed from src/udev/accelerometer/Makefile.am) | 7 | ||||
-rw-r--r-- | src/accelerometer/accelerometer.c (renamed from src/udev/accelerometer/accelerometer.c) | 0 | ||||
-rw-r--r-- | src/ata_id/Makefile.am (renamed from src/udev/ata_id/Makefile.am) | 8 | ||||
-rw-r--r-- | src/ata_id/ata_id.c (renamed from src/udev/ata_id/ata_id.c) | 0 | ||||
-rw-r--r-- | src/cdrom_id/Makefile.am (renamed from src/udev/cdrom_id/Makefile.am) | 8 | ||||
-rw-r--r-- | src/cdrom_id/cdrom_id.c (renamed from src/udev/cdrom_id/cdrom_id.c) | 0 | ||||
-rw-r--r-- | src/collect/Makefile.am (renamed from src/udev/collect/Makefile.am) | 8 | ||||
-rw-r--r-- | src/collect/collect.c (renamed from src/udev/collect/collect.c) | 0 | ||||
-rw-r--r-- | src/gudev/Makefile.am | 2 | ||||
-rw-r--r-- | src/gudev/gudevenumtypes.c | 30 | ||||
-rw-r--r-- | src/gudev/gudevenumtypes.h | 19 | ||||
-rw-r--r-- | src/gudev/gudevmarshal.c | 89 | ||||
-rw-r--r-- | src/gudev/gudevmarshal.h | 20 | ||||
-rw-r--r-- | src/include/Makefile.am | 33 | ||||
-rw-r--r-- | src/keymap/Makefile.am (renamed from src/udev/keymap/Makefile.am) | 0 | ||||
-rw-r--r-- | src/keymap/README.keymap.txt (renamed from src/udev/keymap/README.keymap.txt) | 0 | ||||
-rwxr-xr-x | src/keymap/check-keymaps.sh (renamed from src/udev/keymap/check-keymaps.sh) | 0 | ||||
-rwxr-xr-x | src/keymap/findkeyboards (renamed from src/udev/keymap/findkeyboards) | 0 | ||||
-rwxr-xr-x | src/keymap/keyboard-force-release.sh.in (renamed from src/udev/keymap/keyboard-force-release.sh.in) | 0 | ||||
-rw-r--r-- | src/keymap/keymap.c (renamed from src/udev/keymap/keymap.c) | 0 | ||||
-rw-r--r-- | src/libudev/Makefile.am | 15 | ||||
-rw-r--r-- | src/libudev/libudev-hwdb-def.h (renamed from src/include/libudev-hwdb-def.h) | 0 | ||||
-rw-r--r-- | src/libudev/libudev-private.h (renamed from src/include/libudev-private.h) | 0 | ||||
-rw-r--r-- | src/libudev/libudev.h (renamed from src/include/libudev.h) | 0 | ||||
-rw-r--r-- | src/mtd_probe/Makefile.am | 12 | ||||
-rw-r--r-- | src/mtd_probe/mtd_probe.c (renamed from src/udev/mtd_probe/mtd_probe.c) | 0 | ||||
-rw-r--r-- | src/mtd_probe/mtd_probe.h (renamed from src/udev/mtd_probe/mtd_probe.h) | 0 | ||||
-rw-r--r-- | src/mtd_probe/probe_smartmedia.c (renamed from src/udev/mtd_probe/probe_smartmedia.c) | 0 | ||||
-rw-r--r-- | src/scsi_id/Makefile.am (renamed from src/udev/scsi_id/Makefile.am) | 9 | ||||
-rw-r--r-- | src/scsi_id/README (renamed from src/udev/scsi_id/README) | 0 | ||||
-rw-r--r-- | src/scsi_id/scsi.h (renamed from src/udev/scsi_id/scsi.h) | 0 | ||||
-rw-r--r-- | src/scsi_id/scsi_id.c (renamed from src/udev/scsi_id/scsi_id.c) | 0 | ||||
-rw-r--r-- | src/scsi_id/scsi_id.h (renamed from src/udev/scsi_id/scsi_id.h) | 0 | ||||
-rw-r--r-- | src/scsi_id/scsi_serial.c (renamed from src/udev/scsi_id/scsi_serial.c) | 0 | ||||
-rw-r--r-- | src/test/Makefile.am | 22 | ||||
-rw-r--r-- | src/udev/Makefile.am | 53 | ||||
-rw-r--r-- | src/udev/acl-util.h (renamed from src/include/acl-util.h) | 0 | ||||
-rw-r--r-- | src/udev/cgroup-util.h (renamed from src/include/cgroup-util.h) | 0 | ||||
-rw-r--r-- | src/udev/conf-files.h (renamed from src/include/conf-files.h) | 0 | ||||
-rw-r--r-- | src/udev/def.h (renamed from src/include/def.h) | 0 | ||||
-rw-r--r-- | src/udev/dev-setup.h (renamed from src/include/dev-setup.h) | 0 | ||||
-rw-r--r-- | src/udev/exit-status.h (renamed from src/include/exit-status.h) | 0 | ||||
-rw-r--r-- | src/udev/hashmap.h (renamed from src/include/hashmap.h) | 0 | ||||
-rw-r--r-- | src/udev/ioprio.h (renamed from src/include/ioprio.h) | 0 | ||||
-rw-r--r-- | src/udev/label.h (renamed from src/include/label.h) | 0 | ||||
-rw-r--r-- | src/udev/log.h (renamed from src/include/log.h) | 0 | ||||
-rw-r--r-- | src/udev/logind-acl.h (renamed from src/include/logind-acl.h) | 0 | ||||
-rw-r--r-- | src/udev/macro.h (renamed from src/include/macro.h) | 0 | ||||
-rw-r--r-- | src/udev/missing.h (renamed from src/include/missing.h) | 0 | ||||
-rw-r--r-- | src/udev/mkdir.h (renamed from src/include/mkdir.h) | 0 | ||||
-rw-r--r-- | src/udev/mtd_probe/Makefile.am | 23 | ||||
-rw-r--r-- | src/udev/path-util.h (renamed from src/include/path-util.h) | 0 | ||||
-rw-r--r-- | src/udev/sd-daemon.h (renamed from src/include/sd-daemon.h) | 0 | ||||
-rw-r--r-- | src/udev/sd-login.h (renamed from src/include/sd-login.h) | 0 | ||||
-rw-r--r-- | src/udev/set.h (renamed from src/include/set.h) | 0 | ||||
-rw-r--r-- | src/udev/socket-util.h (renamed from src/include/socket-util.h) | 0 | ||||
-rw-r--r-- | src/udev/sparse-endian.h (renamed from src/include/sparse-endian.h) | 0 | ||||
-rw-r--r-- | src/udev/strbuf.h (renamed from src/include/strbuf.h) | 0 | ||||
-rw-r--r-- | src/udev/strv.h (renamed from src/include/strv.h) | 0 | ||||
-rw-r--r-- | src/udev/udev.h (renamed from src/include/udev.h) | 0 | ||||
-rw-r--r-- | src/udev/util.h (renamed from src/include/util.h) | 0 | ||||
-rw-r--r-- | src/v4l_id/Makefile.am (renamed from src/udev/v4l_id/Makefile.am) | 4 | ||||
-rw-r--r-- | src/v4l_id/v4l_id.c (renamed from src/udev/v4l_id/v4l_id.c) | 0 |
70 files changed, 315 insertions, 128 deletions
diff --git a/Makefile.am b/Makefile.am index 489ec9e115..7ad8ec07ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,11 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + SUBDIRS = \ src \ - docs \ + rules \ + hwdb \ keymaps \ keymaps-force-release \ + docs \ man \ - rules \ test diff --git a/configure.ac b/configure.ac index 0d9ba4cd1c..87385e406c 100644 --- a/configure.ac +++ b/configure.ac @@ -41,8 +41,10 @@ fi # Checks for header files. AC_CHECK_HEADERS( - [arpa/inet.h fcntl.h inttypes.h limits.h netinet/in.h stddef.h stdint.h stdlib.h string.h \ - sys/ioctl.h sys/mount.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h], + [arpa/inet.h fcntl.h inttypes.h langinfo.h limits.h locale.h malloc.h \ + netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/mount.h \ + sys/param.h sys/socket.h sys/statvfs.h sys/time.h sys/vfs.h syslog.h \ + termios.h unistd.h], [], [AC_MSG_ERROR([*** POSIX header not found])] ) @@ -74,18 +76,21 @@ AC_FUNC_ALLOCA AC_FUNC_CHOWN AC_FUNC_FORK AC_FUNC_FSEEKO +AC_FUNC_GETGROUPS AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_HEADER_MAJOR AC_FUNC_MALLOC +AC_FUNC_MKTIME AC_FUNC_MMAP AC_FUNC_REALLOC AC_FUNC_STRNLEN AC_FUNC_STRTOD + AC_CHECK_FUNCS( - [alarm dup2 ftruncate memmove mempcpy memset \ - mkdir munmap rmdir socket strcasecmp strchr strcspn \ - strdup strerror strndup strpbrk strrchr strspn strstr \ - strtol strtoul strtoull uname], + [alarm dup2 ftruncate localtime_r memchr memmove mempcpy memset \ + mkdir munmap nl_langinfo rmdir setlocale socket stpcpy strcasecmp \ + strchr strcspn strdup strerror strndup strpbrk strrchr strspn \ + strstr strtol strtoul strtoull uname], [], [AC_MSG_ERROR([*** POSIX function not found])] ) @@ -262,32 +267,33 @@ AC_SUBST([rootlibdir], [$with_rootlibdir]) AC_CONFIG_FILES([Makefile docs/Makefile docs/gudev/Makefile + docs/gudev/version.xml docs/libudev/Makefile + docs/libudev/version.xml hwdb/Makefile keymaps-force-release/Makefile keymaps/Makefile man/Makefile rules/Makefile src/Makefile + src/accelerometer/Makefile + src/ata_id/Makefile + src/cdrom_id/Makefile + src/collect/Makefile + src/mtd_probe/Makefile + src/scsi_id/Makefile + src/v4l_id/Makefile src/gudev/Makefile - src/include/Makefile + src/gudev/gudev-1.0.pc src/libudev/Makefile - src/test/Makefile + src/libudev/libudev.pc src/udev/Makefile - src/udev/accelerometer/Makefile - src/udev/ata_id/Makefile - src/udev/cdrom_id/Makefile - src/udev/collect/Makefile - src/udev/keymap/Makefile - src/udev/mtd_probe/Makefile - src/udev/scsi_id/Makefile - src/udev/v4l_id/Makefile - test/Makefile src/udev/udev.pc - src/gudev/gudev-1.0.pc - src/libudev/libudev.pc - docs/gudev/version.xml - docs/libudev/version.xml - src/udev/keymap/keyboard-force-release.sh]) + src/test/Makefile + test/Makefile]) + +# src/keymap/Makefile +# src/keymap/keyboard-force-release.sh +# AC_OUTPUT diff --git a/docs/gudev/Makefile.am b/docs/gudev/Makefile.am index 57334b6ddc..3fba8ea479 100644 --- a/docs/gudev/Makefile.am +++ b/docs/gudev/Makefile.am @@ -21,7 +21,7 @@ DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. # e.g. DOC_SOURCE_DIR=../../../gtk -DOC_SOURCE_DIR=$(top_srcdir)/src/gudev $(top_builddir)/src/gudev +DOC_SOURCE_DIR=$(top_srcdir)/src/gudev # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS= @@ -92,7 +92,8 @@ GTKDOC_CFLAGS = \ GTKDOC_LIBS = \ $(GLIB_LIBS) \ - $(top_builddir)/libgudev-1.0.la + $(top_builddir)/src/gudev/libgudev-1.0.la \ + $(top_builddir)/src/udev/libudev-core.la # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/docs/gtk-doc.make diff --git a/docs/gudev/version.xml b/docs/gudev/version.xml new file mode 100644 index 0000000000..49d59571fb --- /dev/null +++ b/docs/gudev/version.xml @@ -0,0 +1 @@ +0.1 diff --git a/docs/libudev/version.xml b/docs/libudev/version.xml new file mode 100644 index 0000000000..49d59571fb --- /dev/null +++ b/docs/libudev/version.xml @@ -0,0 +1 @@ +0.1 diff --git a/hwdb/Makefile.am b/hwdb/Makefile.am index d4dc30d3ad..833b494ac0 100644 --- a/hwdb/Makefile.am +++ b/hwdb/Makefile.am @@ -3,6 +3,7 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} rootprefix=@rootprefix@ udevlibexecdir=$(rootprefix)/lib/udev udevhwdbdir = $(udevlibexecdir)/hwdb.d + dist_udevhwdb_DATA = \ 20-pci-vendor-product.hwdb \ 20-pci-classes.hwdb \ diff --git a/src/Makefile.am b/src/Makefile.am index e39260f020..8b5821fa19 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,6 +4,19 @@ SUBDIRS = \ libudev \ udev \ gudev \ - include + test -# test +# Helper programs +SUBDIRS += \ + accelerometer \ + ata_id \ + cdrom_id \ + collect \ + mtd_probe \ + scsi_id \ + v4l_id + +#if ENABLE_KEYMAP +#SUBDIRS += \ +# keymap +#endif diff --git a/src/udev/accelerometer/Makefile.am b/src/accelerometer/Makefile.am index dc06d4f747..5bb7ee4a58 100644 --- a/src/udev/accelerometer/Makefile.am +++ b/src/accelerometer/Makefile.am @@ -3,6 +3,10 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} rootprefix=@rootprefix@ udevlibexecdir=$(rootprefix)/lib/udev +AM_CPPFLAGS = \ + -I $(top_srcdir)/src/libudev \ + -I $(top_srcdir)/src/udev + udevlibexec_PROGRAMS = \ accelerometer @@ -10,5 +14,6 @@ accelerometer_SOURCES = \ accelerometer.c accelerometer_LDADD = \ - $(top_srcdir)/src/libudev/libudev.la \ + $(top_builddir)/src/libudev/libudev-private.la \ + $(top_builddir)/src/udev/libudev-core.la \ -lm diff --git a/src/udev/accelerometer/accelerometer.c b/src/accelerometer/accelerometer.c index 67fed27c5e..67fed27c5e 100644 --- a/src/udev/accelerometer/accelerometer.c +++ b/src/accelerometer/accelerometer.c diff --git a/src/udev/ata_id/Makefile.am b/src/ata_id/Makefile.am index 50cb070344..a93d93f256 100644 --- a/src/udev/ata_id/Makefile.am +++ b/src/ata_id/Makefile.am @@ -3,6 +3,10 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} rootprefix=@rootprefix@ udevlibexecdir=$(rootprefix)/lib/udev +AM_CPPFLAGS = \ + -I $(top_srcdir)/src/libudev \ + -I $(top_srcdir)/src/udev + udevlibexec_PROGRAMS = \ ata_id @@ -10,5 +14,5 @@ ata_id_SOURCES = \ ata_id.c ata_id_LDADD = \ - $(top_srcdir)/src/libudev/libudev-private.la \ - $(top_srcdir)/src/udev/libudev-core.la + $(top_builddir)/src/libudev/libudev-private.la \ + $(top_builddir)/src/udev/libudev-core.la diff --git a/src/udev/ata_id/ata_id.c b/src/ata_id/ata_id.c index 488fed4ac4..488fed4ac4 100644 --- a/src/udev/ata_id/ata_id.c +++ b/src/ata_id/ata_id.c diff --git a/src/udev/cdrom_id/Makefile.am b/src/cdrom_id/Makefile.am index b08faeb77a..d5168b29cc 100644 --- a/src/udev/cdrom_id/Makefile.am +++ b/src/cdrom_id/Makefile.am @@ -3,6 +3,10 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} rootprefix=@rootprefix@ udevlibexecdir=$(rootprefix)/lib/udev +AM_CPPFLAGS = \ + -I $(top_srcdir)/src/libudev \ + -I $(top_srcdir)/src/udev + udevlibexec_PROGRAMS = \ cdrom_id @@ -10,5 +14,5 @@ cdrom_id_SOURCES = \ cdrom_id.c cdrom_id_LDADD = \ - $(top_srcdir)/src/libudev/libudev-private.la \ - $(top_srcdir)/src/udev/libudev-core.la + $(top_builddir)/src/libudev/libudev-private.la \ + $(top_builddir)/src/udev/libudev-core.la diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/cdrom_id/cdrom_id.c index 1056536b7d..1056536b7d 100644 --- a/src/udev/cdrom_id/cdrom_id.c +++ b/src/cdrom_id/cdrom_id.c diff --git a/src/udev/collect/Makefile.am b/src/collect/Makefile.am index 4c954b99a9..58bc818475 100644 --- a/src/udev/collect/Makefile.am +++ b/src/collect/Makefile.am @@ -3,6 +3,10 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} rootprefix=@rootprefix@ udevlibexecdir=$(rootprefix)/lib/udev +AM_CPPFLAGS = \ + -I $(top_srcdir)/src/libudev \ + -I $(top_srcdir)/src/udev + udevlibexec_PROGRAMS = \ collect @@ -10,5 +14,5 @@ collect_SOURCES = \ collect.c collect_LDADD = \ - $(top_srcdir)/src/libudev/libudev-private.la \ - $(top_srcdir)/src/udev/libudev-core.la + $(top_builddir)/src/libudev/libudev-private.la \ + $(top_builddir)/src/udev/libudev-core.la diff --git a/src/udev/collect/collect.c b/src/collect/collect.c index 3c46e40de1..3c46e40de1 100644 --- a/src/udev/collect/collect.c +++ b/src/collect/collect.c diff --git a/src/gudev/Makefile.am b/src/gudev/Makefile.am index c09e44d25d..7248e5b713 100644 --- a/src/gudev/Makefile.am +++ b/src/gudev/Makefile.am @@ -65,7 +65,7 @@ libgudev_1_0_la_CFLAGS = \ $(GLIB_CFLAGS) libgudev_1_0_la_LIBADD = \ - $(top_srcdir)/src/libudev/libudev.la \ + $(top_builddir)/src/libudev/libudev.la \ $(GLIB_LIBS) libgudev_1_0_la_LDFLAGS = \ diff --git a/src/gudev/gudevenumtypes.c b/src/gudev/gudevenumtypes.c new file mode 100644 index 0000000000..bcf633614a --- /dev/null +++ b/src/gudev/gudevenumtypes.c @@ -0,0 +1,30 @@ + +/* Generated data (by glib-mkenums) */ + +#include <gudev.h> + +/* enumerations from "gudevenums.h" */ +GType +g_udev_device_type_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const GEnumValue values[] = { + { G_UDEV_DEVICE_TYPE_NONE, "G_UDEV_DEVICE_TYPE_NONE", "none" }, + { G_UDEV_DEVICE_TYPE_BLOCK, "G_UDEV_DEVICE_TYPE_BLOCK", "block" }, + { G_UDEV_DEVICE_TYPE_CHAR, "G_UDEV_DEVICE_TYPE_CHAR", "char" }, + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_enum_register_static (g_intern_static_string ("GUdevDeviceType"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + + +/* Generated data ends here */ + diff --git a/src/gudev/gudevenumtypes.h b/src/gudev/gudevenumtypes.h new file mode 100644 index 0000000000..8b431401f3 --- /dev/null +++ b/src/gudev/gudevenumtypes.h @@ -0,0 +1,19 @@ + +/* Generated data (by glib-mkenums) */ + +#ifndef __GUDEV_ENUM_TYPES_H__ +#define __GUDEV_ENUM_TYPES_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +/* enumerations from "gudevenums.h" */ +GType g_udev_device_type_get_type (void) G_GNUC_CONST; +#define G_TYPE_UDEV_DEVICE_TYPE (g_udev_device_type_get_type ()) +G_END_DECLS + +#endif /* __GUDEV_ENUM_TYPES_H__ */ + +/* Generated data ends here */ + diff --git a/src/gudev/gudevmarshal.c b/src/gudev/gudevmarshal.c new file mode 100644 index 0000000000..26e747d172 --- /dev/null +++ b/src/gudev/gudevmarshal.c @@ -0,0 +1,89 @@ +#include "gudevmarshal.h" + +#include <glib-object.h> + + +#ifdef G_ENABLE_DEBUG +#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) +#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) +#define g_marshal_value_peek_int(v) g_value_get_int (v) +#define g_marshal_value_peek_uint(v) g_value_get_uint (v) +#define g_marshal_value_peek_long(v) g_value_get_long (v) +#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) +#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) +#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) +#define g_marshal_value_peek_enum(v) g_value_get_enum (v) +#define g_marshal_value_peek_flags(v) g_value_get_flags (v) +#define g_marshal_value_peek_float(v) g_value_get_float (v) +#define g_marshal_value_peek_double(v) g_value_get_double (v) +#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) +#define g_marshal_value_peek_param(v) g_value_get_param (v) +#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) +#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) +#define g_marshal_value_peek_object(v) g_value_get_object (v) +#define g_marshal_value_peek_variant(v) g_value_get_variant (v) +#else /* !G_ENABLE_DEBUG */ +/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. + * Do not access GValues directly in your code. Instead, use the + * g_value_get_*() functions + */ +#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int +#define g_marshal_value_peek_char(v) (v)->data[0].v_int +#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint +#define g_marshal_value_peek_int(v) (v)->data[0].v_int +#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint +#define g_marshal_value_peek_long(v) (v)->data[0].v_long +#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong +#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 +#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 +#define g_marshal_value_peek_enum(v) (v)->data[0].v_long +#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong +#define g_marshal_value_peek_float(v) (v)->data[0].v_float +#define g_marshal_value_peek_double(v) (v)->data[0].v_double +#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer +#endif /* !G_ENABLE_DEBUG */ + + +/* VOID:STRING,OBJECT (gudevmarshal.list:1) */ +void +g_udev_marshal_VOID__STRING_OBJECT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__STRING_OBJECT) (gpointer data1, + gpointer arg_1, + gpointer arg_2, + gpointer data2); + register GMarshalFunc_VOID__STRING_OBJECT callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_OBJECT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_string (param_values + 1), + g_marshal_value_peek_object (param_values + 2), + data2); +} + diff --git a/src/gudev/gudevmarshal.h b/src/gudev/gudevmarshal.h new file mode 100644 index 0000000000..0c059e3a04 --- /dev/null +++ b/src/gudev/gudevmarshal.h @@ -0,0 +1,20 @@ + +#ifndef __g_udev_marshal_MARSHAL_H__ +#define __g_udev_marshal_MARSHAL_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +/* VOID:STRING,OBJECT (gudevmarshal.list:1) */ +extern void g_udev_marshal_VOID__STRING_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +G_END_DECLS + +#endif /* __g_udev_marshal_MARSHAL_H__ */ + diff --git a/src/include/Makefile.am b/src/include/Makefile.am deleted file mode 100644 index 126d298a9e..0000000000 --- a/src/include/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 - -nodist_include_HEADERS = \ - acl-util.h \ - cgroup-util.h \ - conf-files.h \ - def.h \ - dev-setup.h \ - exit-status.h \ - hashmap.h \ - ioprio.h \ - label.h \ - libudev-hwdb-def.h \ - libudev-private.h \ - log.h \ - logind-acl.h \ - macro.h \ - Makefile.am \ - missing.h \ - mkdir.h \ - path-util.h \ - sd-daemon.h \ - sd-login.h \ - set.h \ - socket-util.h \ - sparse-endian.h \ - strbuf.h \ - strv.h \ - udev.h \ - util.h - -dist_include_HEADERS = \ - libudev.h diff --git a/src/udev/keymap/Makefile.am b/src/keymap/Makefile.am index 80f87f7344..80f87f7344 100644 --- a/src/udev/keymap/Makefile.am +++ b/src/keymap/Makefile.am diff --git a/src/udev/keymap/README.keymap.txt b/src/keymap/README.keymap.txt index 2cf2a4e88c..2cf2a4e88c 100644 --- a/src/udev/keymap/README.keymap.txt +++ b/src/keymap/README.keymap.txt diff --git a/src/udev/keymap/check-keymaps.sh b/src/keymap/check-keymaps.sh index c4572745e0..c4572745e0 100755 --- a/src/udev/keymap/check-keymaps.sh +++ b/src/keymap/check-keymaps.sh diff --git a/src/udev/keymap/findkeyboards b/src/keymap/findkeyboards index 9ce27429b2..9ce27429b2 100755 --- a/src/udev/keymap/findkeyboards +++ b/src/keymap/findkeyboards diff --git a/src/udev/keymap/keyboard-force-release.sh.in b/src/keymap/keyboard-force-release.sh.in index b82674840f..b82674840f 100755 --- a/src/udev/keymap/keyboard-force-release.sh.in +++ b/src/keymap/keyboard-force-release.sh.in diff --git a/src/udev/keymap/keymap.c b/src/keymap/keymap.c index 939407fd0b..939407fd0b 100644 --- a/src/udev/keymap/keymap.c +++ b/src/keymap/keymap.c diff --git a/src/libudev/Makefile.am b/src/libudev/Makefile.am index 0be84fc9ac..36647d13ed 100644 --- a/src/libudev/Makefile.am +++ b/src/libudev/Makefile.am @@ -5,7 +5,7 @@ LIBUDEV_REVISION=0 LIBUDEV_AGE=2 AM_CPPFLAGS = \ - -I $(top_srcdir)/src/include + -I $(top_srcdir)/src/udev lib_LTLIBRARIES = \ libudev.la @@ -20,6 +20,13 @@ libudev_la_SOURCES =\ libudev-queue.c \ libudev-hwdb.c +noinst_HEADERS = \ + libudev-hwdb-def.h \ + libudev-private.h + +include_HEADERS = \ + libudev.h + libudev_la_CFLAGS = \ $(AM_CFLAGS) \ -fvisibility=hidden @@ -28,8 +35,6 @@ libudev_la_LDFLAGS = \ $(AM_LDFLAGS) \ -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) -noinst_LTLIBRARIES = \ - libudev-private.la libudev_private_la_SOURCES =\ $(libudev_la_SOURCES) \ @@ -40,6 +45,10 @@ libudev_private_la_CFLAGS = \ $(AM_CFLAGS) \ -fvisibility=default +noinst_LTLIBRARIES = \ + libudev-private.la + + pkgconfiglibdir=$(libdir)/pkgconfig pkgconfiglib_DATA = \ libudev.pc diff --git a/src/include/libudev-hwdb-def.h b/src/libudev/libudev-hwdb-def.h index e167e2805b..e167e2805b 100644 --- a/src/include/libudev-hwdb-def.h +++ b/src/libudev/libudev-hwdb-def.h diff --git a/src/include/libudev-private.h b/src/libudev/libudev-private.h index ff1cc8cefd..ff1cc8cefd 100644 --- a/src/include/libudev-private.h +++ b/src/libudev/libudev-private.h diff --git a/src/include/libudev.h b/src/libudev/libudev.h index bb41532a21..bb41532a21 100644 --- a/src/include/libudev.h +++ b/src/libudev/libudev.h diff --git a/src/mtd_probe/Makefile.am b/src/mtd_probe/Makefile.am new file mode 100644 index 0000000000..2c6cca00ae --- /dev/null +++ b/src/mtd_probe/Makefile.am @@ -0,0 +1,12 @@ +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + +rootprefix=@rootprefix@ +udevlibexecdir=$(rootprefix)/lib/udev + +udevlibexec_PROGRAMS = \ + mtd_probe + +mtd_probe_SOURCES = \ + mtd_probe.c \ + mtd_probe.h \ + probe_smartmedia.c diff --git a/src/udev/mtd_probe/mtd_probe.c b/src/mtd_probe/mtd_probe.c index 70c04db40b..70c04db40b 100644 --- a/src/udev/mtd_probe/mtd_probe.c +++ b/src/mtd_probe/mtd_probe.c diff --git a/src/udev/mtd_probe/mtd_probe.h b/src/mtd_probe/mtd_probe.h index 2a37ede578..2a37ede578 100644 --- a/src/udev/mtd_probe/mtd_probe.h +++ b/src/mtd_probe/mtd_probe.h diff --git a/src/udev/mtd_probe/probe_smartmedia.c b/src/mtd_probe/probe_smartmedia.c index feadb5076c..feadb5076c 100644 --- a/src/udev/mtd_probe/probe_smartmedia.c +++ b/src/mtd_probe/probe_smartmedia.c diff --git a/src/udev/scsi_id/Makefile.am b/src/scsi_id/Makefile.am index 9628bc2670..6412692afe 100644 --- a/src/udev/scsi_id/Makefile.am +++ b/src/scsi_id/Makefile.am @@ -3,6 +3,11 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} rootprefix=@rootprefix@ udevlibexecdir=$(rootprefix)/lib/udev +AM_CPPFLAGS = \ + -DVERSION \ + -I $(top_srcdir)/src/libudev \ + -I $(top_srcdir)/src/udev + udevlibexec_PROGRAMS = \ scsi_id @@ -13,8 +18,8 @@ scsi_id_SOURCES =\ scsi_id.h scsi_id_LDADD = \ - $(top_srcdir)/src/libudev/libudev-private.la \ - $(top_srcdir)/src/udev/libudev-core.la + $(top_builddir)/src/libudev/libudev-private.la \ + $(top_builddir)/src/udev/libudev-core.la EXTRA_DIST = \ README diff --git a/src/udev/scsi_id/README b/src/scsi_id/README index 9cfe73991c..9cfe73991c 100644 --- a/src/udev/scsi_id/README +++ b/src/scsi_id/README diff --git a/src/udev/scsi_id/scsi.h b/src/scsi_id/scsi.h index c423cac574..c423cac574 100644 --- a/src/udev/scsi_id/scsi.h +++ b/src/scsi_id/scsi.h diff --git a/src/udev/scsi_id/scsi_id.c b/src/scsi_id/scsi_id.c index c90b6aa581..c90b6aa581 100644 --- a/src/udev/scsi_id/scsi_id.c +++ b/src/scsi_id/scsi_id.c diff --git a/src/udev/scsi_id/scsi_id.h b/src/scsi_id/scsi_id.h index 828a98305f..828a98305f 100644 --- a/src/udev/scsi_id/scsi_id.h +++ b/src/scsi_id/scsi_id.h diff --git a/src/udev/scsi_id/scsi_serial.c b/src/scsi_id/scsi_serial.c index 3c52dee62d..3c52dee62d 100644 --- a/src/udev/scsi_id/scsi_serial.c +++ b/src/scsi_id/scsi_serial.c diff --git a/src/test/Makefile.am b/src/test/Makefile.am index b2f8737cc1..ff45517cdf 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -1,5 +1,11 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} +AM_CPPFLAGS = \ + -DVERSION \ + -DCLONE_NEWNS \ + -I $(top_srcdir)/src/libudev \ + -I $(top_srcdir)/src/udev + noinst_PROGRAMS = \ test-libudev \ test-udev @@ -8,17 +14,21 @@ test_libudev_SOURCES = \ test-libudev.c test_libudev_LDADD = \ - $(top_srcdir)/src/libudev/libudev.la + $(top_builddir)/src/libudev/libudev-private.la \ + $(top_builddir)/src/udev/libudev-core.la test_libudev_CPPFLAGS = \ - -I $(top_srcdir)/src/include + -I $(top_srcdir)/src/libudev \ + $(AM_CPPFLAGS) test_udev_SOURCES = \ test-udev.c -test_udev_CPPFLAGS = \ - -I $(top_srcdir)/src/include - test_udev_LDADD = \ - $(top_srcdir)/src/udev/libudev-core.la \ + $(top_builddir)/src/libudev/libudev-private.la \ + $(top_builddir)/src/udev/libudev-core.la \ $(SELINUX_LIBS) + +test_udev_CPPFLAGS = \ + -I $(top_srcdir)/src/udev \ + $(AM_CPPFLAGS) diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am index 0607bea2e6..e373ce2183 100644 --- a/src/udev/Makefile.am +++ b/src/udev/Makefile.am @@ -8,9 +8,7 @@ AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ -DROOTPREFIX=\"$(rootprefix)\" \ -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \ - -I $(top_srcdir)/src/libudev \ - -I $(top_srcdir)/src/udev \ - -I $(top_srcdir)/src/include + -I $(top_srcdir)/src/libudev sbin_PROGRAMS = \ udevd \ @@ -71,11 +69,39 @@ libudev_core_la_SOURCES = \ strv.c \ util.c +noinst_HEADERS = \ + acl-util.h \ + cgroup-util.h \ + conf-files.h \ + def.h \ + dev-setup.h \ + exit-status.h \ + hashmap.h \ + ioprio.h \ + label.h \ + log.h \ + logind-acl.h \ + macro.h \ + missing.h \ + mkdir.h \ + path-util.h \ + sd-daemon.h \ + sd-login.h \ + set.h \ + socket-util.h \ + sparse-endian.h \ + strbuf.h \ + strv.h \ + util.h + +include_HEADERS = \ + udev.h + libudev_core_la_CFLAGS = \ $(AM_CFLAGS) libudev_core_la_LIBADD = \ - $(top_srcdir)/src/libudev/libudev-private.la + $(top_builddir)/src/libudev/libudev-private.la if HAVE_ACL libudev_core_la_SOURCES += \ @@ -106,22 +132,3 @@ EXTRA_DIST = \ CLEANFILES = \ udev.pc - -# ------------------------------------------------------------------------------ -# Helper programs below -# - -SUBDIR = \ - accelerometer \ - ata_id \ - cdrom_id \ - collect \ - mtd_probe \ - scsi_id \ - v4l_id - -if ENABLE_KEYMAP -SUBDIR += \ - keymap -endif - diff --git a/src/include/acl-util.h b/src/udev/acl-util.h index 31fbbcd510..31fbbcd510 100644 --- a/src/include/acl-util.h +++ b/src/udev/acl-util.h diff --git a/src/include/cgroup-util.h b/src/udev/cgroup-util.h index 697669deba..697669deba 100644 --- a/src/include/cgroup-util.h +++ b/src/udev/cgroup-util.h diff --git a/src/include/conf-files.h b/src/udev/conf-files.h index f37ee1f3db..f37ee1f3db 100644 --- a/src/include/conf-files.h +++ b/src/udev/conf-files.h diff --git a/src/include/def.h b/src/udev/def.h index 5ba170f965..5ba170f965 100644 --- a/src/include/def.h +++ b/src/udev/def.h diff --git a/src/include/dev-setup.h b/src/udev/dev-setup.h index 320c0b30ba..320c0b30ba 100644 --- a/src/include/dev-setup.h +++ b/src/udev/dev-setup.h diff --git a/src/include/exit-status.h b/src/udev/exit-status.h index d3b548fc96..d3b548fc96 100644 --- a/src/include/exit-status.h +++ b/src/udev/exit-status.h diff --git a/src/include/hashmap.h b/src/udev/hashmap.h index 6fd71cf519..6fd71cf519 100644 --- a/src/include/hashmap.h +++ b/src/udev/hashmap.h diff --git a/src/include/ioprio.h b/src/udev/ioprio.h index 9800fc2553..9800fc2553 100644 --- a/src/include/ioprio.h +++ b/src/udev/ioprio.h diff --git a/src/include/label.h b/src/udev/label.h index 1220b18965..1220b18965 100644 --- a/src/include/label.h +++ b/src/udev/label.h diff --git a/src/include/log.h b/src/udev/log.h index fd2285cb61..fd2285cb61 100644 --- a/src/include/log.h +++ b/src/udev/log.h diff --git a/src/include/logind-acl.h b/src/udev/logind-acl.h index ec09843a78..ec09843a78 100644 --- a/src/include/logind-acl.h +++ b/src/udev/logind-acl.h diff --git a/src/include/macro.h b/src/udev/macro.h index e930fdab53..e930fdab53 100644 --- a/src/include/macro.h +++ b/src/udev/macro.h diff --git a/src/include/missing.h b/src/udev/missing.h index 0c8ae7f381..0c8ae7f381 100644 --- a/src/include/missing.h +++ b/src/udev/missing.h diff --git a/src/include/mkdir.h b/src/udev/mkdir.h index ce1c35e9ba..ce1c35e9ba 100644 --- a/src/include/mkdir.h +++ b/src/udev/mkdir.h diff --git a/src/udev/mtd_probe/Makefile.am b/src/udev/mtd_probe/Makefile.am deleted file mode 100644 index 4b4db4f651..0000000000 --- a/src/udev/mtd_probe/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} - -rootprefix=@rootprefix@ -udevlibexecdir=$(rootprefix)/lib/udev - -AM_CPPFLAGS = \ - -include $(top_builddir)/config.h \ - -DROOTPREFIX=\"$(rootprefix)\" \ - -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \ - -I $(top_srcdir)/src/libudev \ - -I $(top_srcdir)/src/udev \ - -I $(top_srcdir)/src/include - -udevlibexec_PROGRAMS = \ - mtd_probe - -mtd_probe_SOURCES = \ - mtd_probe.c \ - mtd_probe.h \ - probe_smartmedia.c - -mtd_probe_CPPFLAGS = \ - $(AM_CPPFLAGS) diff --git a/src/include/path-util.h b/src/udev/path-util.h index e81821a28f..e81821a28f 100644 --- a/src/include/path-util.h +++ b/src/udev/path-util.h diff --git a/src/include/sd-daemon.h b/src/udev/sd-daemon.h index fb7456d50f..fb7456d50f 100644 --- a/src/include/sd-daemon.h +++ b/src/udev/sd-daemon.h diff --git a/src/include/sd-login.h b/src/udev/sd-login.h index 6bd1f2da4a..6bd1f2da4a 100644 --- a/src/include/sd-login.h +++ b/src/udev/sd-login.h diff --git a/src/include/set.h b/src/udev/set.h index 9162e2ae80..9162e2ae80 100644 --- a/src/include/set.h +++ b/src/udev/set.h diff --git a/src/include/socket-util.h b/src/udev/socket-util.h index 04cfb83f5a..04cfb83f5a 100644 --- a/src/include/socket-util.h +++ b/src/udev/socket-util.h diff --git a/src/include/sparse-endian.h b/src/udev/sparse-endian.h index eb4dbf3615..eb4dbf3615 100644 --- a/src/include/sparse-endian.h +++ b/src/udev/sparse-endian.h diff --git a/src/include/strbuf.h b/src/udev/strbuf.h index 2347fd4328..2347fd4328 100644 --- a/src/include/strbuf.h +++ b/src/udev/strbuf.h diff --git a/src/include/strv.h b/src/udev/strv.h index 45558d8960..45558d8960 100644 --- a/src/include/strv.h +++ b/src/udev/strv.h diff --git a/src/include/udev.h b/src/udev/udev.h index 23a04f766c..23a04f766c 100644 --- a/src/include/udev.h +++ b/src/udev/udev.h diff --git a/src/include/util.h b/src/udev/util.h index a148ebbc58..a148ebbc58 100644 --- a/src/include/util.h +++ b/src/udev/util.h diff --git a/src/udev/v4l_id/Makefile.am b/src/v4l_id/Makefile.am index 0cb18e8ad3..4569535d8d 100644 --- a/src/udev/v4l_id/Makefile.am +++ b/src/v4l_id/Makefile.am @@ -10,5 +10,5 @@ v4l_id_SOURCES = \ v4l_id.c v4l_id_LDADD = \ - $(top_srcdir)/src/libudev/libudev-private.la \ - $(top_srcdir)/src/udev/libudev-core.la + $(top_builddir)/src/libudev/libudev-private.la \ + $(top_builddir)/src/udev/libudev-core.la diff --git a/src/udev/v4l_id/v4l_id.c b/src/v4l_id/v4l_id.c index 8dcb645ed9..8dcb645ed9 100644 --- a/src/udev/v4l_id/v4l_id.c +++ b/src/v4l_id/v4l_id.c |