chiark / gitweb /
libudev: allow to store negative values in the udev database
[elogind.git] / extras / fstab_import / fstab_import.c
index e46ba7e..c66bffb 100644 (file)
@@ -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) {
@@ -151,7 +152,7 @@ int main(int argc, char *argv[])
                                pos[0] = '\0';
                                label = str;
                        }
-                       if (matches_device_list(udev, devices, str)) {
+                       if (matches_device_list(udev, devices, label)) {
                                print_fstab_entry(udev, mnt);
                                rc = 0;
                                break;
@@ -175,7 +176,7 @@ int main(int argc, char *argv[])
                                pos[0] = '\0';
                                uuid = str;
                        }
-                       if (matches_device_list(udev, devices, str)) {
+                       if (matches_device_list(udev, devices, uuid)) {
                                print_fstab_entry(udev, mnt);
                                rc = 0;
                                break;
@@ -197,6 +198,6 @@ int main(int argc, char *argv[])
 
 exit:
        udev_unref(udev);
-       logging_close();
+       udev_log_close();
        return rc;
 }