int quiet = 0;
const char *exists = NULL;
unsigned int timeout = 120;
- struct pollfd pfd[1];
+ struct pollfd pfd[1] = { {.fd = -1}, };
struct udev_queue *udev_queue = NULL;
int rc = EXIT_FAILURE;
if (pfd[0].fd < 0) {
log_error("inotify_init failed: %m\n");
} else {
- if (inotify_add_watch(pfd[0].fd, udev_get_run_path(udev), IN_MOVED_TO) < 0) {
- log_error("watching '%s' failed\n", udev_get_run_path(udev));
+ if (inotify_add_watch(pfd[0].fd, "/run/udev" , IN_MOVED_TO) < 0) {
+ log_error("watching /run/udev failed\n");
close(pfd[0].fd);
pfd[0].fd = -1;
}