summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-11-24 17:11:29 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-11-24 17:11:29 +0100
commit4c94e25ba6544a43f13679616577175f045c332c (patch)
treee82949262a98f59e49700a67ae7a2a382dc4100b /src
parent6c02327fffc01f95d0bed62b36cf2a9c26ea642e (diff)
downloadconnman-4c94e25ba6544a43f13679616577175f045c332c.tar.gz
connman-4c94e25ba6544a43f13679616577175f045c332c.tar.bz2
connman-4c94e25ba6544a43f13679616577175f045c332c.zip
Add skeleton for udev support
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am14
-rw-r--r--src/udev.c29
2 files changed, 38 insertions, 5 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index f49e18e4..c3a811c1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,7 +15,11 @@ connmand_SOURCES = main.c connman.h log.c error.c plugin.c profile.c \
element.c device.c network.c security.c resolver.c \
storage.c manager.c agent.c rtnl.c dbus.c
-connmand_LDADD = @GDBUS_LIBS@ @GLIB_LIBS@ -ldl
+if UDEV
+connmand_SOURCES += udev.c
+endif
+
+connmand_LDADD = @GDBUS_LIBS@ @GLIB_LIBS@ @UDEV_LIBS@ -ldl
connmand_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=connman.ver
@@ -33,10 +37,10 @@ else
plugindir = $(libdir)/connman/plugins
endif
-AM_CFLAGS = @GLIB_CFLAGS@ @GDBUS_CFLAGS@ \
- -DSTATEDIR=\""$(statedir)"\" \
- -DSTORAGEDIR=\""$(storagedir)\"" \
- -DPLUGINDIR=\""$(plugindir)"\"
+AM_CFLAGS = @UDEV_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ \
+ -DSTATEDIR=\""$(statedir)"\" \
+ -DSTORAGEDIR=\""$(storagedir)\"" \
+ -DPLUGINDIR=\""$(plugindir)"\"
INCLUDES = -I$(top_builddir)/include
diff --git a/src/udev.c b/src/udev.c
new file mode 100644
index 00000000..0eba6398
--- /dev/null
+++ b/src/udev.c
@@ -0,0 +1,29 @@
+/*
+ *
+ * Connection Manager
+ *
+ * Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE
+#include <libudev.h>
+
+#include "connman.h"