chiark / gitweb /
silence a bunch of gcc warnings
[elogind.git] / src / udev / udevadm-settle.c
index d7fbc9e5605ac12c00d9d3d93015f34a94879347..e70b351eb90690d43aa971c00b7d4e42660ca718 100644 (file)
@@ -53,7 +53,7 @@ static int adm_settle(struct udev *udev, int argc, char *argv[])
         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;
 
@@ -152,8 +152,8 @@ static int adm_settle(struct udev *udev, int argc, char *argv[])
         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;
                 }