summaryrefslogtreecommitdiff
path: root/src/grp-udev
diff options
context:
space:
mode:
Diffstat (limited to 'src/grp-udev')
-rw-r--r--src/grp-udev/Makefile3
-rw-r--r--src/grp-udev/ata_id/ata_id.c4
-rw-r--r--src/grp-udev/cdrom_id/cdrom_id.c2
-rw-r--r--src/grp-udev/collect/collect.c8
-rw-r--r--src/grp-udev/libudev-core/Makefile10
l---------src/grp-udev/libudev-core/logind-acl.c1
l---------src/grp-udev/libudev-core/logind-acl.h1
-rw-r--r--src/grp-udev/libudev-core/net/Makefile30
-rw-r--r--src/grp-udev/libudev-core/net/ethtool-util.c8
-rw-r--r--src/grp-udev/libudev-core/net/ethtool-util.h2
-rw-r--r--src/grp-udev/libudev-core/net/link-config.c30
-rw-r--r--src/grp-udev/libudev-core/net/link-config.h2
l---------src/grp-udev/libudev-core/sd-login.c1
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-blkid.c6
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-btrfs.c6
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-hwdb.c6
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-input_id.c8
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-keyboard.c8
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-kmod.c2
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-net_id.c8
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-net_setup_link.c6
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-path_id.c4
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-uaccess.c4
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-usb_id.c6
-rw-r--r--src/grp-udev/libudev-core/udev-builtin.c2
-rw-r--r--src/grp-udev/libudev-core/udev-ctrl.c8
-rw-r--r--src/grp-udev/libudev-core/udev-event.c14
-rw-r--r--src/grp-udev/libudev-core/udev-node.c12
-rw-r--r--src/grp-udev/libudev-core/udev-rules.c28
-rw-r--r--src/grp-udev/libudev-core/udev-watch.c2
-rw-r--r--src/grp-udev/mtd_probe/Makefile2
-rw-r--r--src/grp-udev/mtd_probe/mtd_probe.h2
-rw-r--r--src/grp-udev/scsi_id/scsi_id.c4
-rw-r--r--src/grp-udev/scsi_id/scsi_serial.c4
-rw-r--r--src/grp-udev/systemd-udevd/udevd.c37
-rw-r--r--src/grp-udev/udevadm/Makefile2
-rw-r--r--src/grp-udev/udevadm/udevadm-hwdb.c18
-rw-r--r--src/grp-udev/udevadm/udevadm-info.c4
-rw-r--r--src/grp-udev/udevadm/udevadm-monitor.c4
-rw-r--r--src/grp-udev/udevadm/udevadm-settle.c4
-rw-r--r--src/grp-udev/udevadm/udevadm-test-builtin.c2
-rw-r--r--src/grp-udev/udevadm/udevadm-test.c2
-rw-r--r--src/grp-udev/udevadm/udevadm-trigger.c4
-rw-r--r--src/grp-udev/udevadm/udevadm-util.c2
-rw-r--r--src/grp-udev/udevadm/udevadm.c4
-rw-r--r--src/grp-udev/v4l_id/v4l_id.c4
46 files changed, 188 insertions, 143 deletions
diff --git a/src/grp-udev/Makefile b/src/grp-udev/Makefile
index cc85f0317f..f6c3b1ceb4 100644
--- a/src/grp-udev/Makefile
+++ b/src/grp-udev/Makefile
@@ -69,4 +69,7 @@ SYSINIT_TARGET_WANTS += \
systemd-udevd.service \
systemd-udev-trigger.service
+at.subdirs += systemd-udevd udevadm
+at.subdirs += ata_id cdrom_id collect mtd_probe scsi_id v4l_id
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-udev/ata_id/ata_id.c b/src/grp-udev/ata_id/ata_id.c
index 1e414664ce..28e11118dc 100644
--- a/src/grp-udev/ata_id/ata_id.c
+++ b/src/grp-udev/ata_id/ata_id.c
@@ -39,9 +39,9 @@
#include "libudev.h"
-#include "fd-util.h"
+#include "basic/fd-util.h"
#include "libudev-private.h"
-#include "log.h"
+#include "basic/log.h"
#include "udev-util.h"
#define COMMAND_TIMEOUT_MSEC (30 * 1000)
diff --git a/src/grp-udev/cdrom_id/cdrom_id.c b/src/grp-udev/cdrom_id/cdrom_id.c
index 72f284f710..1e9c75acfd 100644
--- a/src/grp-udev/cdrom_id/cdrom_id.c
+++ b/src/grp-udev/cdrom_id/cdrom_id.c
@@ -37,7 +37,7 @@
#include "libudev.h"
#include "libudev-private.h"
-#include "random-util.h"
+#include "basic/random-util.h"
/* device info */
static unsigned int cd_cd_rom;
diff --git a/src/grp-udev/collect/collect.c b/src/grp-udev/collect/collect.c
index 349585b634..0ad6c4ca43 100644
--- a/src/grp-udev/collect/collect.c
+++ b/src/grp-udev/collect/collect.c
@@ -24,11 +24,11 @@
#include <stddef.h>
#include <stdio.h>
-#include "alloc-util.h"
+#include "basic/alloc-util.h"
#include "libudev-private.h"
-#include "macro.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "basic/macro.h"
+#include "basic/stdio-util.h"
+#include "basic/string-util.h"
#define BUFSIZE 16
#define UDEV_ALARM_TIMEOUT 180
diff --git a/src/grp-udev/libudev-core/Makefile b/src/grp-udev/libudev-core/Makefile
index e95d53120a..d47fbe3257 100644
--- a/src/grp-udev/libudev-core/Makefile
+++ b/src/grp-udev/libudev-core/Makefile
@@ -38,7 +38,7 @@ $(outdir)/keyboard-keys-from-name.h: $(outdir)/keyboard-keys-from-name.gperf
gperf_txt_sources += \
src/udev/keyboard-keys-list.txt
-libudev_core_la_SOURCES = \
+_libudev_core_la_SOURCES = \
src/udev/udev.h \
src/udev/udev-event.c \
src/udev/udev-watch.c \
@@ -59,7 +59,7 @@ libudev_core_la_SOURCES = \
src/udev/net/ethtool-util.h \
src/udev/net/ethtool-util.c
-nodist_libudev_core_la_SOURCES = \
+_nodist_libudev_core_la_SOURCES = \
src/udev/keyboard-keys-from-name.h \
src/udev/net/link-config-gperf.c
@@ -98,4 +98,10 @@ libudev_core_la_SOURCES += \
src/systemd/sd-login.h
endif # HAVE_ACL
+libudev-core.la.SOURCES = $(patsubst src/udev/%,%,$(filter %.c,$(_libudev_core_la_SOURCES) $(_nodist_libudev_core_la_SOURCES)))
+libudev-core.la.DEPENDS = $(addprefix $(outdir)/,$(libudev-core.la.SOURCES:.c=.lo))
+at.subdirs += net
+$(outdir)/udev-builtin-keyboard.lo: $(outdir)/keyboard-keys-from-name.h
+systemd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-udev/libudev-core/logind-acl.c b/src/grp-udev/libudev-core/logind-acl.c
new file mode 120000
index 0000000000..9dd626440f
--- /dev/null
+++ b/src/grp-udev/libudev-core/logind-acl.c
@@ -0,0 +1 @@
+../../grp-login/liblogind-core/logind-acl.c \ No newline at end of file
diff --git a/src/grp-udev/libudev-core/logind-acl.h b/src/grp-udev/libudev-core/logind-acl.h
new file mode 120000
index 0000000000..60f96cbe0a
--- /dev/null
+++ b/src/grp-udev/libudev-core/logind-acl.h
@@ -0,0 +1 @@
+../../grp-login/liblogind-core/logind-acl.h \ No newline at end of file
diff --git a/src/grp-udev/libudev-core/net/Makefile b/src/grp-udev/libudev-core/net/Makefile
new file mode 100644
index 0000000000..153afd5089
--- /dev/null
+++ b/src/grp-udev/libudev-core/net/Makefile
@@ -0,0 +1,30 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemd.CPPFLAGS += $(libshared.CPPFLAGS)
+systemd.CPPFLAGS += $(libsystemd-network.CPPFLAGS)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-udev/libudev-core/net/ethtool-util.c b/src/grp-udev/libudev-core/net/ethtool-util.c
index c00ff79123..2b5ba10ae2 100644
--- a/src/grp-udev/libudev-core/net/ethtool-util.c
+++ b/src/grp-udev/libudev-core/net/ethtool-util.c
@@ -24,10 +24,10 @@
#include "conf-parser.h"
#include "ethtool-util.h"
-#include "log.h"
-#include "string-table.h"
-#include "strxcpyx.h"
-#include "util.h"
+#include "basic/log.h"
+#include "basic/string-table.h"
+#include "basic/strxcpyx.h"
+#include "basic/util.h"
static const char* const duplex_table[_DUP_MAX] = {
[DUP_FULL] = "full",
diff --git a/src/grp-udev/libudev-core/net/ethtool-util.h b/src/grp-udev/libudev-core/net/ethtool-util.h
index 7716516e76..7d103d9f2f 100644
--- a/src/grp-udev/libudev-core/net/ethtool-util.h
+++ b/src/grp-udev/libudev-core/net/ethtool-util.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <macro.h>
+#include "basic/macro.h"
/* we can't use DUPLEX_ prefix, as it
* clashes with <linux/ethtool.h> */
diff --git a/src/grp-udev/libudev-core/net/link-config.c b/src/grp-udev/libudev-core/net/link-config.c
index 350cd24e9c..7f37adc75d 100644
--- a/src/grp-udev/libudev-core/net/link-config.c
+++ b/src/grp-udev/libudev-core/net/link-config.c
@@ -21,26 +21,26 @@
#include <systemd/sd-netlink.h>
-#include "alloc-util.h"
-#include "conf-files.h"
+#include "basic/alloc-util.h"
+#include "basic/conf-files.h"
#include "conf-parser.h"
#include "ethtool-util.h"
-#include "fd-util.h"
+#include "basic/fd-util.h"
#include "libudev-private.h"
#include "link-config.h"
-#include "log.h"
-#include "missing.h"
-#include "netlink-util.h"
+#include "basic/log.h"
+#include "basic/missing.h"
+#include "sd-netlink/netlink-util.h"
#include "network-internal.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "proc-cmdline.h"
-#include "random-util.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "basic/parse-util.h"
+#include "basic/path-util.h"
+#include "basic/proc-cmdline.h"
+#include "basic/random-util.h"
+#include "basic/stat-util.h"
+#include "basic/string-table.h"
+#include "basic/string-util.h"
+#include "basic/strv.h"
+#include "basic/util.h"
struct link_config_ctx {
LIST_HEAD(link_config, links);
diff --git a/src/grp-udev/libudev-core/net/link-config.h b/src/grp-udev/libudev-core/net/link-config.h
index 9df5529d05..54be667536 100644
--- a/src/grp-udev/libudev-core/net/link-config.h
+++ b/src/grp-udev/libudev-core/net/link-config.h
@@ -23,7 +23,7 @@
#include "condition.h"
#include "ethtool-util.h"
-#include "list.h"
+#include "basic/list.h"
typedef struct link_config_ctx link_config_ctx;
typedef struct link_config link_config;
diff --git a/src/grp-udev/libudev-core/sd-login.c b/src/grp-udev/libudev-core/sd-login.c
new file mode 120000
index 0000000000..913dcedc6a
--- /dev/null
+++ b/src/grp-udev/libudev-core/sd-login.c
@@ -0,0 +1 @@
+../../libsystemd/src/sd-login/sd-login.c \ No newline at end of file
diff --git a/src/grp-udev/libudev-core/udev-builtin-blkid.c b/src/grp-udev/libudev-core/udev-builtin-blkid.c
index 62cd93264b..e3dc26eb3e 100644
--- a/src/grp-udev/libudev-core/udev-builtin-blkid.c
+++ b/src/grp-udev/libudev-core/udev-builtin-blkid.c
@@ -29,11 +29,11 @@
#include <systemd/sd-id128.h>
-#include "alloc-util.h"
+#include "basic/alloc-util.h"
#include "efivars.h"
-#include "fd-util.h"
+#include "basic/fd-util.h"
#include "gpt.h"
-#include "string-util.h"
+#include "basic/string-util.h"
#include "udev.h"
static void print_property(struct udev_device *dev, bool test, const char *name, const char *value) {
diff --git a/src/grp-udev/libudev-core/udev-builtin-btrfs.c b/src/grp-udev/libudev-core/udev-builtin-btrfs.c
index cfaa463804..333229de55 100644
--- a/src/grp-udev/libudev-core/udev-builtin-btrfs.c
+++ b/src/grp-udev/libudev-core/udev-builtin-btrfs.c
@@ -25,9 +25,9 @@
#include <linux/btrfs.h>
#endif
-#include "fd-util.h"
-#include "missing.h"
-#include "string-util.h"
+#include "basic/fd-util.h"
+#include "basic/missing.h"
+#include "basic/string-util.h"
#include "udev.h"
static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test) {
diff --git a/src/grp-udev/libudev-core/udev-builtin-hwdb.c b/src/grp-udev/libudev-core/udev-builtin-hwdb.c
index b96f39ba20..2bf65e1ec6 100644
--- a/src/grp-udev/libudev-core/udev-builtin-hwdb.c
+++ b/src/grp-udev/libudev-core/udev-builtin-hwdb.c
@@ -24,9 +24,9 @@
#include <systemd/sd-hwdb.h>
-#include "alloc-util.h"
-#include "hwdb-util.h"
-#include "string-util.h"
+#include "basic/alloc-util.h"
+#include "sd-hwdb/hwdb-util.h"
+#include "basic/string-util.h"
#include "udev-util.h"
#include "udev.h"
diff --git a/src/grp-udev/libudev-core/udev-builtin-input_id.c b/src/grp-udev/libudev-core/udev-builtin-input_id.c
index 51a55cdbc4..ba2c819bfa 100644
--- a/src/grp-udev/libudev-core/udev-builtin-input_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-input_id.c
@@ -30,11 +30,11 @@
#include <linux/limits.h>
#include <linux/input.h>
-#include "fd-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "basic/fd-util.h"
+#include "basic/stdio-util.h"
+#include "basic/string-util.h"
#include "udev.h"
-#include "util.h"
+#include "basic/util.h"
/* we must use this kernel-compatible implementation */
#define BITS_PER_LONG (sizeof(unsigned long) * 8)
diff --git a/src/grp-udev/libudev-core/udev-builtin-keyboard.c b/src/grp-udev/libudev-core/udev-builtin-keyboard.c
index aa10beafb0..f3ea583134 100644
--- a/src/grp-udev/libudev-core/udev-builtin-keyboard.c
+++ b/src/grp-udev/libudev-core/udev-builtin-keyboard.c
@@ -23,10 +23,10 @@
#include <sys/ioctl.h>
#include <linux/input.h>
-#include "fd-util.h"
-#include "parse-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "basic/fd-util.h"
+#include "basic/parse-util.h"
+#include "basic/stdio-util.h"
+#include "basic/string-util.h"
#include "udev.h"
static const struct key *keyboard_lookup_key(const char *str, unsigned len);
diff --git a/src/grp-udev/libudev-core/udev-builtin-kmod.c b/src/grp-udev/libudev-core/udev-builtin-kmod.c
index 9665f678fd..15d23c0f0e 100644
--- a/src/grp-udev/libudev-core/udev-builtin-kmod.c
+++ b/src/grp-udev/libudev-core/udev-builtin-kmod.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "string-util.h"
+#include "basic/string-util.h"
#include "udev.h"
static struct kmod_ctx *ctx = NULL;
diff --git a/src/grp-udev/libudev-core/udev-builtin-net_id.c b/src/grp-udev/libudev-core/udev-builtin-net_id.c
index a7be2a4eed..3441f844be 100644
--- a/src/grp-udev/libudev-core/udev-builtin-net_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-net_id.c
@@ -98,10 +98,10 @@
#include <unistd.h>
#include <linux/pci_regs.h>
-#include "fd-util.h"
-#include "fileio.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "basic/fd-util.h"
+#include "basic/fileio.h"
+#include "basic/stdio-util.h"
+#include "basic/string-util.h"
#include "udev.h"
#define ONBOARD_INDEX_MAX (16*1024-1)
diff --git a/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c b/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c
index 8e47775135..4a32bac98a 100644
--- a/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c
+++ b/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "link-config.h"
-#include "log.h"
+#include "basic/alloc-util.h"
+#include "net/link-config.h"
+#include "basic/log.h"
#include "udev.h"
static link_config_ctx *ctx = NULL;
diff --git a/src/grp-udev/libudev-core/udev-builtin-path_id.c b/src/grp-udev/libudev-core/udev-builtin-path_id.c
index 6e9adc6e96..4476b90c72 100644
--- a/src/grp-udev/libudev-core/udev-builtin-path_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-path_id.c
@@ -30,8 +30,8 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "string-util.h"
+#include "basic/alloc-util.h"
+#include "basic/string-util.h"
#include "udev.h"
_printf_(2,3)
diff --git a/src/grp-udev/libudev-core/udev-builtin-uaccess.c b/src/grp-udev/libudev-core/udev-builtin-uaccess.c
index 2c27116ae9..f15f07ad95 100644
--- a/src/grp-udev/libudev-core/udev-builtin-uaccess.c
+++ b/src/grp-udev/libudev-core/udev-builtin-uaccess.c
@@ -24,10 +24,10 @@
#include <systemd/sd-login.h>
-#include "login-util.h"
+#include "basic/login-util.h"
#include "logind-acl.h"
#include "udev.h"
-#include "util.h"
+#include "basic/util.h"
static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool test) {
int r;
diff --git a/src/grp-udev/libudev-core/udev-builtin-usb_id.c b/src/grp-udev/libudev-core/udev-builtin-usb_id.c
index 587649eff0..fcaf8551d8 100644
--- a/src/grp-udev/libudev-core/udev-builtin-usb_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-usb_id.c
@@ -29,9 +29,9 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "string-util.h"
+#include "basic/alloc-util.h"
+#include "basic/fd-util.h"
+#include "basic/string-util.h"
#include "udev.h"
static void set_usb_iftype(char *to, int if_class_num, size_t len) {
diff --git a/src/grp-udev/libudev-core/udev-builtin.c b/src/grp-udev/libudev-core/udev-builtin.c
index e6b36f124f..13d3cd4ee0 100644
--- a/src/grp-udev/libudev-core/udev-builtin.c
+++ b/src/grp-udev/libudev-core/udev-builtin.c
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <string.h>
-#include "string-util.h"
+#include "basic/string-util.h"
#include "udev.h"
static bool initialized;
diff --git a/src/grp-udev/libudev-core/udev-ctrl.c b/src/grp-udev/libudev-core/udev-ctrl.c
index f68a09d7a8..4336aa58ab 100644
--- a/src/grp-udev/libudev-core/udev-ctrl.c
+++ b/src/grp-udev/libudev-core/udev-ctrl.c
@@ -18,10 +18,10 @@
#include <sys/un.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "socket-util.h"
+#include "basic/alloc-util.h"
+#include "basic/fd-util.h"
+#include "basic/formats-util.h"
+#include "basic/socket-util.h"
#include "udev.h"
/* wire protocol magic must match */
diff --git a/src/grp-udev/libudev-core/udev-event.c b/src/grp-udev/libudev-core/udev-event.c
index 8d601c9c2c..6825863c86 100644
--- a/src/grp-udev/libudev-core/udev-event.c
+++ b/src/grp-udev/libudev-core/udev-event.c
@@ -30,13 +30,13 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "netlink-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "string-util.h"
+#include "basic/alloc-util.h"
+#include "basic/fd-util.h"
+#include "basic/formats-util.h"
+#include "sd-netlink/netlink-util.h"
+#include "basic/process-util.h"
+#include "basic/signal-util.h"
+#include "basic/string-util.h"
#include "udev.h"
typedef struct Spawn {
diff --git a/src/grp-udev/libudev-core/udev-node.c b/src/grp-udev/libudev-core/udev-node.c
index 5d2997fd8f..3a2daa89ad 100644
--- a/src/grp-udev/libudev-core/udev-node.c
+++ b/src/grp-udev/libudev-core/udev-node.c
@@ -25,12 +25,12 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "formats-util.h"
-#include "fs-util.h"
-#include "selinux-util.h"
-#include "smack-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "basic/formats-util.h"
+#include "basic/fs-util.h"
+#include "basic/selinux-util.h"
+#include "basic/smack-util.h"
+#include "basic/stdio-util.h"
+#include "basic/string-util.h"
#include "udev.h"
static int node_symlink(struct udev_device *dev, const char *node, const char *slink) {
diff --git a/src/grp-udev/libudev-core/udev-rules.c b/src/grp-udev/libudev-core/udev-rules.c
index 26fa52cf6c..71eaf8ae5f 100644
--- a/src/grp-udev/libudev-core/udev-rules.c
+++ b/src/grp-udev/libudev-core/udev-rules.c
@@ -29,22 +29,22 @@
#include <time.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "glob-util.h"
-#include "path-util.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "strbuf.h"
-#include "string-util.h"
-#include "strv.h"
+#include "basic/alloc-util.h"
+#include "basic/conf-files.h"
+#include "basic/escape.h"
+#include "basic/fd-util.h"
+#include "basic/fs-util.h"
+#include "basic/glob-util.h"
+#include "basic/path-util.h"
+#include "basic/stat-util.h"
+#include "basic/stdio-util.h"
+#include "basic/strbuf.h"
+#include "basic/string-util.h"
+#include "basic/strv.h"
#include "sysctl-util.h"
#include "udev.h"
-#include "user-util.h"
-#include "util.h"
+#include "basic/user-util.h"
+#include "basic/util.h"
#define PREALLOC_TOKEN 2048
diff --git a/src/grp-udev/libudev-core/udev-watch.c b/src/grp-udev/libudev-core/udev-watch.c
index 9ce5e975de..7dcc71556e 100644
--- a/src/grp-udev/libudev-core/udev-watch.c
+++ b/src/grp-udev/libudev-core/udev-watch.c
@@ -24,7 +24,7 @@
#include <sys/inotify.h>
#include <unistd.h>
-#include "stdio-util.h"
+#include "basic/stdio-util.h"
#include "udev.h"
static int inotify_fd = -1;
diff --git a/src/grp-udev/mtd_probe/Makefile b/src/grp-udev/mtd_probe/Makefile
index d7392a8a3b..50703dddda 100644
--- a/src/grp-udev/mtd_probe/Makefile
+++ b/src/grp-udev/mtd_probe/Makefile
@@ -34,4 +34,6 @@ dist_udevrules_DATA += \
udevlibexec_PROGRAMS += \
mtd_probe
+mtd_probe_LDADD += libbasic.la
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-udev/mtd_probe/mtd_probe.h b/src/grp-udev/mtd_probe/mtd_probe.h
index 68e4954537..83f241ac94 100644
--- a/src/grp-udev/mtd_probe/mtd_probe.h
+++ b/src/grp-udev/mtd_probe/mtd_probe.h
@@ -21,7 +21,7 @@
#include <mtd/mtd-user.h>
-#include "macro.h"
+#include "basic/macro.h"
/* Full oob structure as written on the flash */
struct sm_oob {
diff --git a/src/grp-udev/scsi_id/scsi_id.c b/src/grp-udev/scsi_id/scsi_id.c
index 4655691642..1ba35d79a1 100644
--- a/src/grp-udev/scsi_id/scsi_id.c
+++ b/src/grp-udev/scsi_id/scsi_id.c
@@ -31,10 +31,10 @@
#include "libudev.h"
-#include "fd-util.h"
+#include "basic/fd-util.h"
#include "libudev-private.h"
#include "scsi_id.h"
-#include "string-util.h"
+#include "basic/string-util.h"
#include "udev-util.h"
static const struct option options[] = {
diff --git a/src/grp-udev/scsi_id/scsi_serial.c b/src/grp-udev/scsi_id/scsi_serial.c
index e079e28698..a7d76d0ab7 100644
--- a/src/grp-udev/scsi_id/scsi_serial.c
+++ b/src/grp-udev/scsi_id/scsi_serial.c
@@ -36,10 +36,10 @@
#include "libudev.h"
#include "libudev-private.h"
-#include "random-util.h"
+#include "basic/random-util.h"
#include "scsi.h"
#include "scsi_id.h"
-#include "string-util.h"
+#include "basic/string-util.h"
/*
* A priority based list of id, naa, and binary/ascii for the identifier
diff --git a/src/grp-udev/systemd-udevd/udevd.c b/src/grp-udev/systemd-udevd/udevd.c
index 89006e6e3a..8262cf5a0b 100644
--- a/src/grp-udev/systemd-udevd/udevd.c
+++ b/src/grp-udev/systemd-udevd/udevd.c
@@ -43,28 +43,27 @@
#include <systemd/sd-daemon.h>
#include <systemd/sd-event.h>
-#include "alloc-util.h"
-#include "cgroup-util.h"
-#include "cpu-set-util.h"
+#include "basic/alloc-util.h"
+#include "basic/cgroup-util.h"
+#include "basic/cpu-set-util.h"
#include "dev-setup.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "io-util.h"
-#include "netlink-util.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "process-util.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "terminal-util.h"
+#include "basic/fd-util.h"
+#include "basic/fileio.h"
+#include "basic/formats-util.h"
+#include "basic/fs-util.h"
+#include "basic/hashmap.h"
+#include "basic/io-util.h"
+#include "basic/parse-util.h"
+#include "basic/proc-cmdline.h"
+#include "basic/process-util.h"
+#include "basic/selinux-util.h"
+#include "basic/signal-util.h"
+#include "basic/socket-util.h"
+#include "basic/string-util.h"
+#include "basic/terminal-util.h"
#include "udev-util.h"
#include "udev.h"
-#include "user-util.h"
+#include "basic/user-util.h"
static bool arg_debug = false;
static int arg_daemonize = false;
diff --git a/src/grp-udev/udevadm/Makefile b/src/grp-udev/udevadm/Makefile
index ba3b466935..ef173b234b 100644
--- a/src/grp-udev/udevadm/Makefile
+++ b/src/grp-udev/udevadm/Makefile
@@ -42,4 +42,6 @@ udevadm_SOURCES = \
udevadm_LDADD = \
libudev-core.la
+systemd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-udev/udevadm/udevadm-hwdb.c b/src/grp-udev/udevadm/udevadm-hwdb.c
index 948ad0f5a5..264e8027e2 100644
--- a/src/grp-udev/udevadm/udevadm-hwdb.c
+++ b/src/grp-udev/udevadm/udevadm-hwdb.c
@@ -22,16 +22,16 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hwdb-internal.h"
-#include "hwdb-util.h"
-#include "strbuf.h"
-#include "string-util.h"
+#include "basic/alloc-util.h"
+#include "basic/conf-files.h"
+#include "basic/fileio.h"
+#include "basic/fs-util.h"
+#include "sd-hwdb/hwdb-internal.h"
+#include "sd-hwdb/hwdb-util.h"
+#include "basic/strbuf.h"
+#include "basic/string-util.h"
#include "udev.h"
-#include "util.h"
+#include "basic/util.h"
/*
* Generic udev properties, key/value database based on modalias strings.
diff --git a/src/grp-udev/udevadm/udevadm-info.c b/src/grp-udev/udevadm/udevadm-info.c
index 7182668f23..45d2de99d7 100644
--- a/src/grp-udev/udevadm/udevadm-info.c
+++ b/src/grp-udev/udevadm/udevadm-info.c
@@ -26,8 +26,8 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "string-util.h"
+#include "basic/fd-util.h"
+#include "basic/string-util.h"
#include "udev-util.h"
#include "udev.h"
#include "udevadm-util.h"
diff --git a/src/grp-udev/udevadm/udevadm-monitor.c b/src/grp-udev/udevadm/udevadm-monitor.c
index c0ef073476..202cea6385 100644
--- a/src/grp-udev/udevadm/udevadm-monitor.c
+++ b/src/grp-udev/udevadm/udevadm-monitor.c
@@ -25,8 +25,8 @@
#include <sys/time.h>
#include <time.h>
-#include "fd-util.h"
-#include "formats-util.h"
+#include "basic/fd-util.h"
+#include "basic/formats-util.h"
#include "udev-util.h"
#include "udev.h"
diff --git a/src/grp-udev/udevadm/udevadm-settle.c b/src/grp-udev/udevadm/udevadm-settle.c
index 6a5dc6e9e4..8b32e58a0c 100644
--- a/src/grp-udev/udevadm/udevadm-settle.c
+++ b/src/grp-udev/udevadm/udevadm-settle.c
@@ -26,9 +26,9 @@
#include <string.h>
#include <unistd.h>
-#include "parse-util.h"
+#include "basic/parse-util.h"
#include "udev.h"
-#include "util.h"
+#include "basic/util.h"
static void help(void) {
printf("%s settle OPTIONS\n\n"
diff --git a/src/grp-udev/udevadm/udevadm-test-builtin.c b/src/grp-udev/udevadm/udevadm-test-builtin.c
index 0b180d03eb..a3a66e05d7 100644
--- a/src/grp-udev/udevadm/udevadm-test-builtin.c
+++ b/src/grp-udev/udevadm/udevadm-test-builtin.c
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "string-util.h"
+#include "basic/string-util.h"
#include "udev.h"
static void help(struct udev *udev) {
diff --git a/src/grp-udev/udevadm/udevadm-test.c b/src/grp-udev/udevadm/udevadm-test.c
index 702dbe5282..396e08fb5d 100644
--- a/src/grp-udev/udevadm/udevadm-test.c
+++ b/src/grp-udev/udevadm/udevadm-test.c
@@ -25,7 +25,7 @@
#include <sys/signalfd.h>
#include <unistd.h>
-#include "string-util.h"
+#include "basic/string-util.h"
#include "udev-util.h"
#include "udev.h"
diff --git a/src/grp-udev/udevadm/udevadm-trigger.c b/src/grp-udev/udevadm/udevadm-trigger.c
index 9d52345d92..97f28f6163 100644
--- a/src/grp-udev/udevadm/udevadm-trigger.c
+++ b/src/grp-udev/udevadm/udevadm-trigger.c
@@ -23,11 +23,11 @@
#include <string.h>
#include <unistd.h>
-#include "string-util.h"
+#include "basic/string-util.h"
#include "udev-util.h"
#include "udev.h"
#include "udevadm-util.h"
-#include "util.h"
+#include "basic/util.h"
static int verbose;
static int dry_run;
diff --git a/src/grp-udev/udevadm/udevadm-util.c b/src/grp-udev/udevadm/udevadm-util.c
index 3539c1d6ab..4ae5e6c7ef 100644
--- a/src/grp-udev/udevadm/udevadm-util.c
+++ b/src/grp-udev/udevadm/udevadm-util.c
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "string-util.h"
+#include "basic/string-util.h"
#include "udevadm-util.h"
struct udev_device *find_device(struct udev *udev,
diff --git a/src/grp-udev/udevadm/udevadm.c b/src/grp-udev/udevadm/udevadm.c
index a6a873e5de..555d269275 100644
--- a/src/grp-udev/udevadm/udevadm.c
+++ b/src/grp-udev/udevadm/udevadm.c
@@ -20,8 +20,8 @@
#include <stddef.h>
#include <stdio.h>
-#include "selinux-util.h"
-#include "string-util.h"
+#include "basic/selinux-util.h"
+#include "basic/string-util.h"
#include "udev.h"
static int adm_version(struct udev *udev, int argc, char *argv[]) {
diff --git a/src/grp-udev/v4l_id/v4l_id.c b/src/grp-udev/v4l_id/v4l_id.c
index aec6676a33..4779cf34f3 100644
--- a/src/grp-udev/v4l_id/v4l_id.c
+++ b/src/grp-udev/v4l_id/v4l_id.c
@@ -26,8 +26,8 @@
#include <unistd.h>
#include <linux/videodev2.h>
-#include "fd-util.h"
-#include "util.h"
+#include "basic/fd-util.h"
+#include "basic/util.h"
int main(int argc, char *argv[]) {
static const struct option options[] = {