chiark / gitweb /
move syslog wrapper to libudev
[elogind.git] / extras / fstab_import / fstab_import.c
index e793604faa2e2e9019c340d2df157c4df8b384b5..98ee75f1749dd780f1d99e7267914bdd972b34cd 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) {
@@ -144,7 +145,7 @@ int main(int argc, char *argv[])
                        if (label[0] == '"' || label[0] == '\'') {
                                char *pos;
 
-                               util_strlcpy(str, &label[1], sizeof(str));
+                               util_strscpy(str, sizeof(str), &label[1]);
                                pos = strrchr(str, label[0]);
                                if (pos == NULL)
                                        continue;
@@ -168,7 +169,7 @@ int main(int argc, char *argv[])
                        if (uuid[0] == '"' || uuid[0] == '\'') {
                                char *pos;
 
-                               util_strlcpy(str, &uuid[1], sizeof(str));
+                               util_strscpy(str, sizeof(str), &uuid[1]);
                                pos = strrchr(str, uuid[0]);
                                if (pos == NULL)
                                        continue;
@@ -197,6 +198,6 @@ int main(int argc, char *argv[])
 
 exit:
        udev_unref(udev);
-       logging_close();
+       udev_log_close();
        return rc;
 }