chiark / gitweb /
Merge libudev, udev, and the unconditional extras in a single Makefile.am.
[elogind.git] / extras / path_id / path_id.c
index dbb52bad2141ffc06308bbd45f5e5fe6ee980f8c..2d70b6373df8ad0f2b58f11711b502202fb53b87 100644 (file)
@@ -3,6 +3,8 @@
  *
  * Copyright (C) 2009 Kay Sievers <kay.sievers@vrfy.org>
  *
+ * Logic based on Hannes Reinecke's shell script.
+ *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 2 of the License, or
@@ -29,9 +31,9 @@
 #include <getopt.h>
 
 #include "libudev.h"
-#include "../../udev/udev.h"
+#include "libudev-private.h"
 
-int debug;
+static int debug;
 
 static void log_fn(struct udev *udev, int priority,
                   const char *file, int line, const char *fn,
@@ -366,7 +368,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 +467,6 @@ out:
        udev_device_unref(dev);
 exit:
        udev_unref(udev);
-       logging_close();
+       udev_log_close();
        return rc;
 }