X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=extras%2Ffstab_import%2Ffstab_import.c;h=98ee75f1749dd780f1d99e7267914bdd972b34cd;hp=71ab5d34ee8868e9add0b324a5e41320640c0d5e;hb=59d93adb29fae25220955d44a5cd25f0d99e3528;hpb=38f27948cdafd8a4b90a6b4f1f54b89891983506 diff --git a/extras/fstab_import/fstab_import.c b/extras/fstab_import/fstab_import.c index 71ab5d34e..98ee75f17 100644 --- a/extras/fstab_import/fstab_import.c +++ b/extras/fstab_import/fstab_import.c @@ -24,7 +24,8 @@ #include #include -#include "../../udev/udev.h" +#include "libudev.h" +#include "libudev-private.h" static int debug; @@ -66,9 +67,9 @@ int main(int argc, char *argv[]) { struct udev *udev; static const struct option options[] = { - { "export", 0, NULL, 'x' }, - { "debug", 0, NULL, 'd' }, - { "help", 0, NULL, 'h' }, + { "export", no_argument, NULL, 'x' }, + { "debug", no_argument, NULL, 'd' }, + { "help", no_argument, NULL, 'h' }, {} }; char **devices; @@ -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; }