Code Review
/
src
/
drm-lease-manager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add systemd notify support
[src/drm-lease-manager.git]
/
drm-lease-manager
/
main.c
diff --git
a/drm-lease-manager/main.c
b/drm-lease-manager/main.c
index
b4ad379
..
5ac3600
100644
(file)
--- a/
drm-lease-manager/main.c
+++ b/
drm-lease-manager/main.c
@@
-13,6
+13,7
@@
* limitations under the License.
*/
* limitations under the License.
*/
+#include "config.h"
#include "lease-config.h"
#include "lease-manager.h"
#include "lease-server.h"
#include "lease-config.h"
#include "lease-manager.h"
#include "lease-server.h"
@@
-23,6
+24,10
@@
#include <stdlib.h>
#include <unistd.h>
#include <stdlib.h>
#include <unistd.h>
+#ifdef HAVE_SYSTEMD_DAEMON
+#include <systemd/sd-daemon.h>
+#endif
+
static void usage(const char *progname)
{
printf("Usage: %s [OPTIONS] [<DRM device>]\n\n"
static void usage(const char *progname)
{
printf("Usage: %s [OPTIONS] [<DRM device>]\n\n"
@@
-107,6
+112,10
@@
int main(int argc, char **argv)
return EXIT_FAILURE;
}
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) {
struct ls_req req;
while (ls_get_request(ls, &req)) {
switch (req.type) {