#define _GNU_SOURCE 1
#endif
-#include "config.h"
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <mntent.h>
#include <sys/stat.h>
-#include "../../udev/udev.h"
+#include "libudev.h"
+#include "libudev-private.h"
static int debug;
{
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;
if (udev == NULL)
goto exit;
- logging_init("fstab_id");
+ udev_log_init("fstab_id");
udev_set_log_fn(udev, log_fn);
while (1) {
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;
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;
exit:
udev_unref(udev);
- logging_close();
+ udev_log_close();
return rc;
}