X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=drm-lease-manager%2Fmain.c;h=5ac3600480b6fed1dae401b662918928e5a92d51;hb=refs%2Ftags%2F13.93.0;hp=ff69e7528b79ffa24126e31a28c8c5625655b739;hpb=e9e5cf1f67a45e4d409dc9e1caa6ce8151579c88;p=src%2Fdrm-lease-manager.git diff --git a/drm-lease-manager/main.c b/drm-lease-manager/main.c index ff69e75..5ac3600 100644 --- a/drm-lease-manager/main.c +++ b/drm-lease-manager/main.c @@ -13,6 +13,7 @@ * limitations under the License. */ +#include "config.h" #include "lease-config.h" #include "lease-manager.h" #include "lease-server.h" @@ -23,6 +24,10 @@ #include #include +#ifdef HAVE_SYSTEMD_DAEMON +#include +#endif + static void usage(const char *progname) { printf("Usage: %s [OPTIONS] []\n\n" @@ -48,7 +53,7 @@ const struct option options[] = { int main(int argc, char **argv) { - char *device = "/dev/dri/card0"; + char *device = NULL; char *config_file = "/etc/drm-lease-manager.toml"; bool debug_log = false; @@ -107,6 +112,10 @@ int main(int argc, char **argv) return EXIT_FAILURE; } +#ifdef HAVE_SYSTEMD_DAEMON + sd_notify(1, "READY=1"); +#endif + struct ls_req req; while (ls_get_request(ls, &req)) { switch (req.type) {