BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(capi-system-peripheral-io)
BuildRequires: pkgconfig(libgdbus)
+BuildRequires: pkgconfig(libsystemd)
Requires(post): /usr/bin/vconftool
#include <sys/reboot.h>
#include <glib.h>
#include <libgdbus/dbus-system.h>
+#include <systemd/sd-daemon.h>
#include "core/log.h"
#include "core/common.h"
}
}
+static void dbus_name_acquired(GDBusConnection *connection, const gchar *name, gpointer user_data)
+{
+ _I("sd_notify(READY=1)");
+ sd_notify(0, "READY=1");
+}
+
int main(int argc, char **argv)
{
int ret;
}
haptic_init();
- ret = dbus_handle_request_bus_name(handle, VIBRATOR_BUS_NAME, NULL, NULL);
+ ret = dbus_handle_request_bus_name(handle, VIBRATOR_BUS_NAME, dbus_name_acquired, NULL);
if (ret <= 0) {
_E("Fail to request bus name");
dbus_handle_check_owner_name(NULL, VIBRATOR_BUS_NAME);