diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-06-09 22:47:48 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-06-09 22:47:48 +0200 |
commit | 9060b066d9e7aaca9795010ac5fff61018947f87 (patch) | |
tree | e79743bf9b075b10e2de962579e63a30ce36202e /extras | |
parent | 119f66fc36b4f5164fb4a9ece247938e97609a05 (diff) |
move syslog wrapper to libudev
Diffstat (limited to 'extras')
-rw-r--r-- | extras/ata_id/Makefile.am | 3 | ||||
-rw-r--r-- | extras/ata_id/ata_id.c | 7 | ||||
-rw-r--r-- | extras/cdrom_id/Makefile.am | 1 | ||||
-rw-r--r-- | extras/cdrom_id/cdrom_id.c | 7 | ||||
-rw-r--r-- | extras/edd_id/edd_id.c | 7 | ||||
-rw-r--r-- | extras/floppy/Makefile.am | 1 | ||||
-rw-r--r-- | extras/floppy/create_floppy_devices.c | 5 | ||||
-rw-r--r-- | extras/fstab_import/fstab_import.c | 7 | ||||
-rw-r--r-- | extras/path_id/path_id.c | 6 | ||||
-rw-r--r-- | extras/scsi_id/scsi_id.c | 7 | ||||
-rw-r--r-- | extras/scsi_id/scsi_serial.c | 3 | ||||
-rw-r--r-- | extras/usb_id/usb_id.c | 7 |
12 files changed, 37 insertions, 24 deletions
diff --git a/extras/ata_id/Makefile.am b/extras/ata_id/Makefile.am index ffbdba32f2..0c37d8029a 100644 --- a/extras/ata_id/Makefile.am +++ b/extras/ata_id/Makefile.am @@ -6,7 +6,8 @@ udevhome_PROGRAMS = \ ata_id_SOURCES = \ ata_id.c \ - ../../udev/udev.h \ + ../../libudev/libudev.h \ + ../../libudev/libudev-private.h \ ../../libudev/libudev.c \ ../../libudev/libudev-list.c \ ../../libudev/libudev-util.c diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c index dd28d91f4a..d976467817 100644 --- a/extras/ata_id/ata_id.c +++ b/extras/ata_id/ata_id.c @@ -35,7 +35,8 @@ #include <linux/types.h> #include <linux/hdreg.h> -#include "../../udev/udev.h" +#include "libudev.h" +#include "libudev-private.h" static void log_fn(struct udev *udev, int priority, const char *file, int line, const char *fn, @@ -66,7 +67,7 @@ int main(int argc, char *argv[]) if (udev == NULL) goto exit; - logging_init("ata_id"); + udev_log_init("ata_id"); udev_set_log_fn(udev, log_fn); while (1) { @@ -164,6 +165,6 @@ close: close(fd); exit: udev_unref(udev); - logging_close(); + udev_log_close(); return rc; } diff --git a/extras/cdrom_id/Makefile.am b/extras/cdrom_id/Makefile.am index 8e1968e6e1..bfdfdd3735 100644 --- a/extras/cdrom_id/Makefile.am +++ b/extras/cdrom_id/Makefile.am @@ -11,6 +11,7 @@ dist_udevrules_DATA = \ cdrom_id_SOURCES = \ cdrom_id.c \ ../../libudev/libudev.h \ + ../../libudev/libudev-private.h \ ../../libudev/libudev.c \ ../../libudev/libudev-list.c \ ../../libudev/libudev-util.c diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c index 2306d9ad71..d4156ce7ac 100644 --- a/extras/cdrom_id/cdrom_id.c +++ b/extras/cdrom_id/cdrom_id.c @@ -37,7 +37,8 @@ #include <sys/ioctl.h> #include <linux/cdrom.h> -#include "../../udev/udev.h" +#include "libudev.h" +#include "libudev-private.h" static int debug; @@ -528,7 +529,7 @@ int main(int argc, char *argv[]) if (udev == NULL) goto exit; - logging_init("cdrom_id"); + udev_log_init("cdrom_id"); udev_set_log_fn(udev, log_fn); while (1) { @@ -706,7 +707,7 @@ exit: if (fd >= 0) close(fd); udev_unref(udev); - logging_close(); + udev_log_close(); return rc; } diff --git a/extras/edd_id/edd_id.c b/extras/edd_id/edd_id.c index 90656b4411..15295ed31f 100644 --- a/extras/edd_id/edd_id.c +++ b/extras/edd_id/edd_id.c @@ -23,7 +23,8 @@ #include <dirent.h> #include <stdint.h> -#include "../../udev/udev.h" +#include "libudev.h" +#include "libudev-private.h" static void log_fn(struct udev *udev, int priority, const char *file, int line, const char *fn, @@ -52,7 +53,7 @@ int main(int argc, char *argv[]) if (udev == NULL) goto exit; - logging_init("edd_id"); + udev_log_init("edd_id"); udev_set_log_fn(udev, log_fn); for (i = 1 ; i < argc; i++) { @@ -181,6 +182,6 @@ closedir: closedir(dir); exit: udev_unref(udev); - logging_close(); + udev_log_close(); return rc; } diff --git a/extras/floppy/Makefile.am b/extras/floppy/Makefile.am index 2baaa10f02..365ece9ee9 100644 --- a/extras/floppy/Makefile.am +++ b/extras/floppy/Makefile.am @@ -12,6 +12,7 @@ create_floppy_devices_SOURCES = \ ../../libudev/libudev-util.c \ ../../libudev/libudev-device.c \ ../../libudev/libudev-enumerate.c \ + ../../udev/udev.h \ ../../udev/udev-util.c if USE_SELINUX diff --git a/extras/floppy/create_floppy_devices.c b/extras/floppy/create_floppy_devices.c index 0698fcd3e8..b0d7b0bc85 100644 --- a/extras/floppy/create_floppy_devices.c +++ b/extras/floppy/create_floppy_devices.c @@ -24,6 +24,8 @@ #include <pwd.h> #include <grp.h> +#include "libudev.h" +#include "libudev-private.h" #include "../../udev/udev.h" static char *table[] = { @@ -66,7 +68,7 @@ int main(int argc, char **argv) if (udev == NULL) goto exit; - logging_init("create_floppy_devices"); + udev_log_init("create_floppy_devices"); udev_set_log_fn(udev, log_fn); udev_selinux_init(udev); @@ -164,6 +166,7 @@ int main(int argc, char **argv) udev_selinux_exit(udev); udev_unref(udev); + udev_log_close(); exit: return 0; } diff --git a/extras/fstab_import/fstab_import.c b/extras/fstab_import/fstab_import.c index e46ba7ec44..98ee75f174 100644 --- a/extras/fstab_import/fstab_import.c +++ b/extras/fstab_import/fstab_import.c @@ -24,7 +24,8 @@ #include <mntent.h> #include <sys/stat.h> -#include "../../udev/udev.h" +#include "libudev.h" +#include "libudev-private.h" static int debug; @@ -80,7 +81,7 @@ int main(int argc, char *argv[]) if (udev == NULL) goto exit; - logging_init("fstab_id"); + udev_log_init("fstab_id"); udev_set_log_fn(udev, log_fn); while (1) { @@ -197,6 +198,6 @@ int main(int argc, char *argv[]) exit: udev_unref(udev); - logging_close(); + udev_log_close(); return rc; } diff --git a/extras/path_id/path_id.c b/extras/path_id/path_id.c index dbb52bad21..4b57dec0d3 100644 --- a/extras/path_id/path_id.c +++ b/extras/path_id/path_id.c @@ -29,7 +29,7 @@ #include <getopt.h> #include "libudev.h" -#include "../../udev/udev.h" +#include "libudev-private.h" int debug; @@ -366,7 +366,7 @@ int main(int argc, char **argv) if (udev == NULL) goto exit; - logging_init("path_id"); + udev_log_init("path_id"); udev_set_log_fn(udev, log_fn); while (1) { @@ -465,6 +465,6 @@ out: udev_device_unref(dev); exit: udev_unref(udev); - logging_close(); + udev_log_close(); return rc; } diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c index 213a267afa..7cf2f3765d 100644 --- a/extras/scsi_id/scsi_id.c +++ b/extras/scsi_id/scsi_id.c @@ -27,7 +27,8 @@ #include <getopt.h> #include <sys/stat.h> -#include "../../udev/udev.h" +#include "libudev.h" +#include "libudev-private.h" #include "scsi_id.h" static const struct option options[] = { @@ -613,7 +614,7 @@ int main(int argc, char **argv) if (udev == NULL) goto exit; - logging_init("scsi_id"); + udev_log_init("scsi_id"); udev_set_log_fn(udev, log_fn); /* @@ -649,6 +650,6 @@ int main(int argc, char **argv) exit: udev_unref(udev); - logging_close(); + udev_log_close(); return retval; } diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c index cbacf379fe..c47712d859 100644 --- a/extras/scsi_id/scsi_serial.c +++ b/extras/scsi_id/scsi_serial.c @@ -30,7 +30,8 @@ /* #include <linux/bsg.h> */ #include "bsg.h" -#include "../../udev/udev.h" +#include "libudev.h" +#include "libudev-private.h" #include "scsi.h" #include "scsi_id.h" diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c index 4679f94fde..b412598d35 100644 --- a/extras/usb_id/usb_id.c +++ b/extras/usb_id/usb_id.c @@ -21,7 +21,8 @@ #include <errno.h> #include <getopt.h> -#include "../../udev/udev.h" +#include "libudev.h" +#include "libudev-private.h" int debug; @@ -464,7 +465,7 @@ int main(int argc, char **argv) if (udev == NULL) goto exit; - logging_init("usb_id"); + udev_log_init("usb_id"); udev_set_log_fn(udev, log_fn); while (1) { @@ -558,6 +559,6 @@ int main(int argc, char **argv) exit: udev_device_unref(dev); udev_unref(udev); - logging_close(); + udev_log_close(); return retval; } |