From 48a9b173e88738ff4eefb3519f1d27711b417c8d Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Mon, 8 Jun 2009 21:36:06 +0200 Subject: [PATCH] libudev: move to top-level directory --- Makefile.am | 1 + Makefile.am.inc | 4 +-- configure.ac | 4 +-- extras/ata_id/Makefile.am | 8 +++--- extras/cdrom_id/Makefile.am | 8 +++--- extras/collect/Makefile.am | 8 +++--- extras/collect/collect.c | 4 +-- extras/edd_id/Makefile.am | 8 +++--- extras/floppy/Makefile.am | 12 ++++----- extras/fstab_import/Makefile.am | 8 +++--- extras/path_id/Makefile.am | 12 ++++----- extras/path_id/path_id.c | 6 ++--- extras/scsi_id/Makefile.am | 8 +++--- extras/usb_id/Makefile.am | 12 ++++----- {udev/lib => libudev}/.gitignore | 0 {udev/lib => libudev}/Makefile.am | 2 +- {udev/lib => libudev}/exported_symbols | 0 {udev/lib => libudev}/libudev-ctrl.c | 0 .../lib => libudev}/libudev-device-db-write.c | 0 {udev/lib => libudev}/libudev-device.c | 0 {udev/lib => libudev}/libudev-enumerate.c | 0 {udev/lib => libudev}/libudev-list.c | 0 {udev/lib => libudev}/libudev-monitor.c | 0 {udev/lib => libudev}/libudev-private.h | 0 {udev/lib => libudev}/libudev-queue-export.c | 0 {udev/lib => libudev}/libudev-queue.c | 0 {udev/lib => libudev}/libudev-util.c | 0 {udev/lib => libudev}/libudev.c | 0 {udev/lib => libudev}/libudev.h | 5 ---- {udev/lib => libudev}/libudev.pc.in | 0 {udev/lib => libudev}/test-libudev.c | 0 udev/Makefile.am | 27 +++++++++---------- udev/udev.h | 4 +-- 33 files changed, 67 insertions(+), 74 deletions(-) rename {udev/lib => libudev}/.gitignore (100%) rename {udev/lib => libudev}/Makefile.am (96%) rename {udev/lib => libudev}/exported_symbols (100%) rename {udev/lib => libudev}/libudev-ctrl.c (100%) rename {udev/lib => libudev}/libudev-device-db-write.c (100%) rename {udev/lib => libudev}/libudev-device.c (100%) rename {udev/lib => libudev}/libudev-enumerate.c (100%) rename {udev/lib => libudev}/libudev-list.c (100%) rename {udev/lib => libudev}/libudev-monitor.c (100%) rename {udev/lib => libudev}/libudev-private.h (100%) rename {udev/lib => libudev}/libudev-queue-export.c (100%) rename {udev/lib => libudev}/libudev-queue.c (100%) rename {udev/lib => libudev}/libudev-util.c (100%) rename {udev/lib => libudev}/libudev.c (100%) rename {udev/lib => libudev}/libudev.h (96%) rename {udev/lib => libudev}/libudev.pc.in (100%) rename {udev/lib => libudev}/test-libudev.c (100%) diff --git a/Makefile.am b/Makefile.am index 1bb2d7773b..678a3e426a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/Makefile.am.inc SUBDIRS = \ + libudev \ udev \ rules \ extras diff --git a/Makefile.am.inc b/Makefile.am.inc index 7ecd55de78..802143bb6b 100644 --- a/Makefile.am.inc +++ b/Makefile.am.inc @@ -1,8 +1,8 @@ AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ + -I$(top_builddir)/libudev \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION + -DUDEV_PREFIX=\""$(udev_prefix)"\" AM_CFLAGS = diff --git a/configure.ac b/configure.ac index 9857d52e4e..e9c949647a 100644 --- a/configure.ac +++ b/configure.ac @@ -70,9 +70,9 @@ fi AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([ Makefile + libudev/Makefile + libudev/libudev.pc udev/Makefile - udev/lib/Makefile - udev/lib/libudev.pc rules/Makefile extras/Makefile extras/ata_id/Makefile diff --git a/extras/ata_id/Makefile.am b/extras/ata_id/Makefile.am index d31fd2c93c..ffbdba32f2 100644 --- a/extras/ata_id/Makefile.am +++ b/extras/ata_id/Makefile.am @@ -6,10 +6,10 @@ udevhome_PROGRAMS = \ ata_id_SOURCES = \ ata_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../udev/udev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_man_MANS = \ ata_id.8 diff --git a/extras/cdrom_id/Makefile.am b/extras/cdrom_id/Makefile.am index 51b6a20ee2..8e1968e6e1 100644 --- a/extras/cdrom_id/Makefile.am +++ b/extras/cdrom_id/Makefile.am @@ -10,10 +10,10 @@ dist_udevrules_DATA = \ cdrom_id_SOURCES = \ cdrom_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_man_MANS = \ cdrom_id.8 diff --git a/extras/collect/Makefile.am b/extras/collect/Makefile.am index d9792b89eb..7ad2937f5d 100644 --- a/extras/collect/Makefile.am +++ b/extras/collect/Makefile.am @@ -6,7 +6,7 @@ udevhome_PROGRAMS = \ collect_SOURCES = \ collect.c \ - ../../udev/lib/libudev-private.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-util.c \ - ../../udev/lib/libudev-list.c + ../../libudev/libudev-private.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-util.c \ + ../../libudev/libudev-list.c diff --git a/extras/collect/collect.c b/extras/collect/collect.c index 3a7e826e4d..3284c3df40 100644 --- a/extras/collect/collect.c +++ b/extras/collect/collect.c @@ -31,8 +31,8 @@ #include #include -#include "../../udev/lib/libudev.h" -#include "../../udev/lib/libudev-private.h" +#include "libudev.h" +#include "libudev-private.h" #define TMPFILE UDEV_PREFIX "/dev/.udev/collect" #define BUFSIZE 16 diff --git a/extras/edd_id/Makefile.am b/extras/edd_id/Makefile.am index 9bfe43231f..7c562d3c31 100644 --- a/extras/edd_id/Makefile.am +++ b/extras/edd_id/Makefile.am @@ -10,10 +10,10 @@ dist_udevrules_DATA = \ edd_id_SOURCES = \ edd_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_man_MANS = \ edd_id.8 diff --git a/extras/floppy/Makefile.am b/extras/floppy/Makefile.am index 8cb9cbd47d..2baaa10f02 100644 --- a/extras/floppy/Makefile.am +++ b/extras/floppy/Makefile.am @@ -6,12 +6,12 @@ udevhome_PROGRAMS = \ create_floppy_devices_SOURCES = \ create_floppy_devices.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c \ - ../../udev/lib/libudev-device.c \ - ../../udev/lib/libudev-enumerate.c \ + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c \ + ../../libudev/libudev-device.c \ + ../../libudev/libudev-enumerate.c \ ../../udev/udev-util.c if USE_SELINUX diff --git a/extras/fstab_import/Makefile.am b/extras/fstab_import/Makefile.am index c63dc7cf17..42acfd15cf 100644 --- a/extras/fstab_import/Makefile.am +++ b/extras/fstab_import/Makefile.am @@ -10,8 +10,8 @@ dist_udevrules_DATA = \ fstab_import_SOURCES = \ fstab_import.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c diff --git a/extras/path_id/Makefile.am b/extras/path_id/Makefile.am index 5d4bf6283d..867ad5ef8e 100644 --- a/extras/path_id/Makefile.am +++ b/extras/path_id/Makefile.am @@ -6,12 +6,12 @@ udevhome_PROGRAMS = \ path_id_SOURCES = \ path_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-device.c \ - ../../udev/lib/libudev-enumerate.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-device.c \ + ../../libudev/libudev-enumerate.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_man_MANS = \ path_id.8 diff --git a/extras/path_id/path_id.c b/extras/path_id/path_id.c index 08b7e150c9..dbb52bad21 100644 --- a/extras/path_id/path_id.c +++ b/extras/path_id/path_id.c @@ -28,8 +28,8 @@ #include #include -#include <../../udev/lib/libudev.h> -#include <../../udev/udev.h> +#include "libudev.h" +#include "../../udev/udev.h" int debug; @@ -366,7 +366,7 @@ int main(int argc, char **argv) if (udev == NULL) goto exit; - logging_init("usb_id"); + logging_init("path_id"); udev_set_log_fn(udev, log_fn); while (1) { diff --git a/extras/scsi_id/Makefile.am b/extras/scsi_id/Makefile.am index 29d5fe7344..ffebc38e20 100644 --- a/extras/scsi_id/Makefile.am +++ b/extras/scsi_id/Makefile.am @@ -10,10 +10,10 @@ scsi_id_SOURCES = \ scsi.h \ scsi_id.h \ bsg.h \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c dist_sysconf_DATA = \ scsi_id.config diff --git a/extras/usb_id/Makefile.am b/extras/usb_id/Makefile.am index 07b286d61f..a9bd407031 100644 --- a/extras/usb_id/Makefile.am +++ b/extras/usb_id/Makefile.am @@ -6,12 +6,12 @@ udevhome_PROGRAMS = \ usb_id_SOURCES = \ usb_id.c \ - ../../udev/lib/libudev.h \ - ../../udev/lib/libudev.c \ - ../../udev/lib/libudev-list.c \ - ../../udev/lib/libudev-util.c \ - ../../udev/lib/libudev-device.c \ - ../../udev/lib/libudev-enumerate.c + ../../libudev/libudev.h \ + ../../libudev/libudev.c \ + ../../libudev/libudev-list.c \ + ../../libudev/libudev-util.c \ + ../../libudev/libudev-device.c \ + ../../libudev/libudev-enumerate.c dist_man_MANS = \ usb_id.8 diff --git a/udev/lib/.gitignore b/libudev/.gitignore similarity index 100% rename from udev/lib/.gitignore rename to libudev/.gitignore diff --git a/udev/lib/Makefile.am b/libudev/Makefile.am similarity index 96% rename from udev/lib/Makefile.am rename to libudev/Makefile.am index 7cd883302c..1f0bf2f3ad 100644 --- a/udev/lib/Makefile.am +++ b/libudev/Makefile.am @@ -28,7 +28,7 @@ libudev_la_SOURCES =\ libudev_la_LDFLAGS = \ -version-info $(LIBUDEV_LT_CURRENT):$(LIBUDEV_LT_REVISION):$(LIBUDEV_LT_AGE) \ - -export-symbols $(top_srcdir)/udev/lib/exported_symbols + -export-symbols $(top_srcdir)/libudev/exported_symbols pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig pkgconfig_DATA = libudev.pc diff --git a/udev/lib/exported_symbols b/libudev/exported_symbols similarity index 100% rename from udev/lib/exported_symbols rename to libudev/exported_symbols diff --git a/udev/lib/libudev-ctrl.c b/libudev/libudev-ctrl.c similarity index 100% rename from udev/lib/libudev-ctrl.c rename to libudev/libudev-ctrl.c diff --git a/udev/lib/libudev-device-db-write.c b/libudev/libudev-device-db-write.c similarity index 100% rename from udev/lib/libudev-device-db-write.c rename to libudev/libudev-device-db-write.c diff --git a/udev/lib/libudev-device.c b/libudev/libudev-device.c similarity index 100% rename from udev/lib/libudev-device.c rename to libudev/libudev-device.c diff --git a/udev/lib/libudev-enumerate.c b/libudev/libudev-enumerate.c similarity index 100% rename from udev/lib/libudev-enumerate.c rename to libudev/libudev-enumerate.c diff --git a/udev/lib/libudev-list.c b/libudev/libudev-list.c similarity index 100% rename from udev/lib/libudev-list.c rename to libudev/libudev-list.c diff --git a/udev/lib/libudev-monitor.c b/libudev/libudev-monitor.c similarity index 100% rename from udev/lib/libudev-monitor.c rename to libudev/libudev-monitor.c diff --git a/udev/lib/libudev-private.h b/libudev/libudev-private.h similarity index 100% rename from udev/lib/libudev-private.h rename to libudev/libudev-private.h diff --git a/udev/lib/libudev-queue-export.c b/libudev/libudev-queue-export.c similarity index 100% rename from udev/lib/libudev-queue-export.c rename to libudev/libudev-queue-export.c diff --git a/udev/lib/libudev-queue.c b/libudev/libudev-queue.c similarity index 100% rename from udev/lib/libudev-queue.c rename to libudev/libudev-queue.c diff --git a/udev/lib/libudev-util.c b/libudev/libudev-util.c similarity index 100% rename from udev/lib/libudev-util.c rename to libudev/libudev-util.c diff --git a/udev/lib/libudev.c b/libudev/libudev.c similarity index 100% rename from udev/lib/libudev.c rename to libudev/libudev.c diff --git a/udev/lib/libudev.h b/libudev/libudev.h similarity index 96% rename from udev/lib/libudev.h rename to libudev/libudev.h index 241091c37d..ffeb80f8d3 100644 --- a/udev/lib/libudev.h +++ b/libudev/libudev.h @@ -16,11 +16,6 @@ #include #include -/* this will stay as long as the DeviceKit integration of udev is work in progress */ -#if !defined _LIBUDEV_COMPILATION && !defined LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE -#error "#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE is needed to use this experimental library version" -#endif - /* * udev - library context * diff --git a/udev/lib/libudev.pc.in b/libudev/libudev.pc.in similarity index 100% rename from udev/lib/libudev.pc.in rename to libudev/libudev.pc.in diff --git a/udev/lib/test-libudev.c b/libudev/test-libudev.c similarity index 100% rename from udev/lib/test-libudev.c rename to libudev/test-libudev.c diff --git a/udev/Makefile.am b/udev/Makefile.am index 94989e64bf..ca5b4fae59 100644 --- a/udev/Makefile.am +++ b/udev/Makefile.am @@ -1,8 +1,5 @@ include $(top_srcdir)/Makefile.am.inc -SUBDIRS = \ - lib - sbin_PROGRAMS = \ udevd \ udevadm @@ -19,18 +16,18 @@ common_files = \ udev-node.c \ udev-rules.c \ udev-util.c \ - lib/libudev.h \ - lib/libudev-private.h \ - lib/libudev.c \ - lib/libudev-list.c \ - lib/libudev-util.c \ - lib/libudev-device.c \ - lib/libudev-device-db-write.c \ - lib/libudev-monitor.c \ - lib/libudev-enumerate.c \ - lib/libudev-queue.c \ - lib/libudev-queue-export.c \ - lib/libudev-ctrl.c + ../libudev/libudev.h \ + ../libudev/libudev-private.h \ + ../libudev/libudev.c \ + ../libudev/libudev-list.c \ + ../libudev/libudev-util.c \ + ../libudev/libudev-device.c \ + ../libudev/libudev-device-db-write.c \ + ../libudev/libudev-monitor.c \ + ../libudev/libudev-enumerate.c \ + ../libudev/libudev-queue.c \ + ../libudev/libudev-queue-export.c \ + ../libudev/libudev-ctrl.c if USE_SELINUX common_files += \ diff --git a/udev/udev.h b/udev/udev.h index 7187975390..8926dee932 100644 --- a/udev/udev.h +++ b/udev/udev.h @@ -22,8 +22,8 @@ #include #include -#include "lib/libudev.h" -#include "lib/libudev-private.h" +#include "libudev.h" +#include "libudev-private.h" #define DEFAULT_FAKE_PARTITIONS_COUNT 15 #define UDEV_EVENT_TIMEOUT 180