chiark / gitweb /
udevd: control - no not delete socket file when --daemon is used
[elogind.git] / udev / udevadm-settle.c
index d40c8c8d5e05c9503537f021f99eac71f525bfda..a59d7c39e5b283e71288ff68ed8c6b3f38d0630e 100644 (file)
@@ -96,7 +96,9 @@ static int adm_settle(struct udev *udev, int argc, char *argv[])
                               "  --exit-if-exists=<file> stop waiting if file exists\n"
                               "  --quiet                 do not print list after timeout\n"
                               "  --help\n\n");
-                       exit(0);
+                       exit(EXIT_SUCCESS);
+               default:
+                       exit(EXIT_FAILURE);
                }
        }
 
@@ -136,7 +138,7 @@ static int adm_settle(struct udev *udev, int argc, char *argv[])
        if (getuid() == 0) {
                struct udev_ctrl *uctrl;
 
-               uctrl = udev_ctrl_new_from_socket(udev, UDEV_CTRL_SOCK_PATH);
+               uctrl = udev_ctrl_new(udev);
                if (uctrl != NULL) {
                        if (udev_ctrl_send_ping(uctrl, timeout) < 0) {
                                info(udev, "no connection to daemon\n");