X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-libudev.c;h=2b004fdfb10d7192041de3584c0c65334b7fac2f;hb=e0952d9d021234e79f3a70f33a9e5d201872a417;hp=a51814df95f99d3e202ecdd2be626012b1bb91cf;hpb=bdf7026e9557349cd3eeb291c01655d5f2a55db8;p=elogind.git diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c index a51814df9..2b004fdfb 100644 --- a/src/test/test-libudev.c +++ b/src/test/test-libudev.c @@ -19,13 +19,8 @@ ***/ #include -#include -#include #include -#include -#include #include -#include #include #include "libudev.h" @@ -34,14 +29,6 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -_printf_(6,0) -static void log_fn(struct udev *udev, - int priority, const char *file, int line, const char *fn, - const char *format, va_list args) { - printf("test-libudev: %s %s:%d ", fn, file, line); - vprintf(format, args); -} - static void print_device(struct udev_device *device) { const char *str; dev_t devnum; @@ -431,9 +418,6 @@ int main(int argc, char *argv[]) { printf("no context\n"); return 1; } - udev_set_log_fn(udev, log_fn); - printf("set log: %p\n", log_fn); - while ((c = getopt_long(argc, argv, "p:s:dhV", options, NULL)) >= 0) switch (c) { @@ -447,8 +431,8 @@ int main(int argc, char *argv[]) { break; case 'd': - if (udev_get_log_priority(udev) < LOG_INFO) - udev_set_log_priority(udev, LOG_INFO); + if (log_get_max_level() < LOG_INFO) + log_set_max_level(LOG_INFO); break; case 'h':