Call common check_system_boot_finished function, instaed of local implement.
Change-Id: Iafec48599499be4263e9e6383e8bdfc21ded0e87
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
capi-system-info
capi-system-device
libsystemd
- libgdbus
+ libsyscommon
)
IF(DISPLAY_MODULE STREQUAL on)
BuildRequires: pkgconfig(minizip)
BuildRequires: pkgconfig(libkmod)
BuildRequires: pkgconfig(libusbgx)
-BuildRequires: pkgconfig(libgdbus)
+BuildRequires: pkgconfig(libsyscommon)
BuildRequires: pkgconfig(capi-system-device)
Requires: %{name}-tools = %{version}-%{release}
#include <stdbool.h>
#include <fcntl.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "util.h"
#include "core.h"
#include <vconf-keys.h>
#include <sys/time.h>
#include <tzplatform_config.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "util.h"
#include <sys/types.h>
#include <unistd.h>
#include <device-node.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "core/log.h"
*/
#include <stdio.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "device-interface.h"
#include "util.h"
#include <assert.h>
#include <vconf.h>
#include <sys/types.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "util.h"
#include <stdbool.h>
#include <fcntl.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "util.h"
#include "core.h"
#include <vconf-keys.h>
#include <sys/time.h>
#include <tzplatform_config.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "util.h"
#include <sys/types.h>
#include <unistd.h>
#include <device-node.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "core/log.h"
*/
#include <stdio.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "device-interface.h"
#include "util.h"
#include <assert.h>
#include <vconf.h>
#include <sys/types.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "util.h"
#include <stdbool.h>
#include <fcntl.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "util.h"
#include "core.h"
#include <vconf-keys.h>
#include <sys/time.h>
#include <tzplatform_config.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "util.h"
#include <sys/types.h>
#include <unistd.h>
#include <device-node.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "core/log.h"
*/
#include <stdio.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "device-interface.h"
#include "util.h"
#include <assert.h>
#include <vconf.h>
#include <sys/types.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "util.h"
#include <stdbool.h>
#include <fcntl.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "util.h"
#include "core.h"
#include <vconf-keys.h>
#include <sys/time.h>
#include <tzplatform_config.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "util.h"
#include <sys/types.h>
#include <unistd.h>
#include <device-node.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "core/log.h"
*/
#include <stdio.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "device-interface.h"
#include "util.h"
#include <device-node.h>
#include <vconf.h>
#include <hw/display.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "display/core.h"
#include "display/display-ops.h"
#include <assert.h>
#include <vconf.h>
#include <sys/types.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "ambient-mode.h"
#include "util.h"
#include "display/core.h"
#include "display/util.h"
#include "display/display-ops.h"
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
/* CoreApps */
#define COREAPPS_PATH_HOME "/Org/Tizen/Coreapps/home"
#define __APPS_H__
#include <string.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/common.h"
#include "display/poll.h"
#include <stdarg.h>
#include <errno.h>
#include <sys/stat.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/list.h"
#include "core/common.h"
#include <vconf.h>
#include <device-node.h>
#include <hw/battery.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/common.h"
#include "core/devices.h"
#include <bundle.h>
#include <eventsystem.h>
#include <hw/battery.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "lowbat-handler.h"
#include "battery.h"
#include <assert.h>
#include <sys/types.h>
#include <dd-control.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/common.h"
#include "list.h"
#include "common.h"
#include "core/devices.h"
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
struct device_notifier {
bool deleted;
#include <stdio.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "log.h"
#include "list.h"
#include <stdio.h>
#include <errno.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "common.h"
#include "devices.h"
#include <sys/reboot.h>
#include <systemd/sd-daemon.h>
#include <glib.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/systemd-state.h>
#include "display/core.h"
#include "log.h"
static void deviced_dbus_name_acquired(GDBusConnection *connection, const gchar *name, gpointer user_data)
{
int ret;
- ret = check_booting_finished();
+ ret = check_system_boot_finished();
if (ret == 1) {
/* Restarted: deviced was terminated */
_I("Notify relaunch.");
#include <stdio.h>
#include <errno.h>
#include <assert.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "log.h"
#include "device-notifier.h"
#include <assert.h>
#include <errno.h>
#include <string.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/config-parser.h"
#include <device-node.h>
#include <glib.h>
#include <hw/cpu.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/devices.h"
glib-2.0
gio-2.0
gio-unix-2.0
- libgdbus)
+ libsyscommon)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <string.h>
#include <errno.h>
#include <fcntl.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include <core/common.h>
#include "usb.h"
#define __PM_POLL_H__
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
/**
* @addtogroup POWER_MANAGER
* @{
#include "core/list.h"
#include "core/common.h"
#include "core/devices.h"
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#define SERVICE_NAME "deviced"
#define DUMP_SIGNAL "Dump"
#include <stdio.h>
#include <vconf.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/device-notifier.h"
#include <stdio.h>
#include <hw/external_connection.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/list.h"
#include <vconf.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/device-notifier.h"
#include "display/core.h"
#include <assert.h>
#include <stdbool.h>
#include <hw/ir.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/devices.h"
#include "core/common.h"
#include "core/log.h"
#include <stdio.h>
#include <unistd.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include <vconf.h>
#include <hw/led.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/list.h"
#include <vconf.h>
#include <device-node.h>
#include <hw/led.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/devices.h"
#include <stdio.h>
#include <vconf.h>
#include <hw/led.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/devices.h"
dlog
glib-2.0
gio-2.0
- libgdbus
+ libsyscommon
gio-unix-2.0)
FOREACH(flag ${libpkgs_CFLAGS})
#include <vconf.h>
#include <vconf-keys.h>
#include <limits.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "dd-deviced.h"
#include "deviced-priv.h"
#include <stdio.h>
#include <errno.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "log.h"
#include "common.h"
#include <fcntl.h>
#include <dlfcn.h>
#include <vconf.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "log.h"
#include "dd-haptic.h"
#include <stdio.h>
#include <stdbool.h>
#include <errno.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "log.h"
#include "common.h"
#include <stdio.h>
#include <errno.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "log.h"
#include "common.h"
#include <unistd.h>
#include <bundle.h>
#include <eventsystem.h>
-#include <libgdbus/dbus-system.h>
-#include <libgdbus/dbus-systemd.h>
+#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/dbus-systemd.h>
+#include <libsyscommon/systemd-state.h>
#include "core/log.h"
#include "core/device-notifier.h"
#define SIGNAL_BOOTING_DONE "BootingDone"
#define SYSTEMD_DBUS_SIGNAL_SYSTEM_STARTUP_FINISHED "StartupFinished"
#define SYSTEMD_DBUS_SIGNAL_USER_STARTUP_FINISHED "UserSessionStartupFinished"
-#define SYSTEMD_DBUS_METHOD_SYSTEM_STATE "SystemState"
-#define SYSTEMD_STATE_RUNNING "running"
-#define SYSTEMD_STATE_DEGRADED "degraded"
-
-int check_booting_finished(void)
-{
- char *state = NULL;
- int ret = 0;
- size_t len;
- GVariant *reply = NULL;
-
- reply = systemd_get_manager_property(SYSTEMD_DBUS_METHOD_SYSTEM_STATE);
- if (!reply) {
- _E("Failed to get system state: No reply");
- goto err;
- }
- if (!dh_get_param_from_var(reply, "s", &state)) {
- _E("Failed to get system state(%s)", g_variant_get_type_string(reply));
- goto err;
- }
-
- _I("System state=%s", state);
-
- len = strlen(state) + 1;
- if (!strncmp(state, SYSTEMD_STATE_RUNNING, len) ||
- !strncmp(state, SYSTEMD_STATE_DEGRADED, len))
- ret = 1;
- else
- ret = 0;
-
-err:
- if (reply)
- g_variant_unref(reply);
- free(state);
-
- return ret;
-}
static guint sig_id[2] = {0, 0};
if (system_done)
return;
- system_done = check_booting_finished();
+ system_done = check_system_boot_finished();
if (system_done == 0) {
_E("System session is not ready yet.");
return;
#ifndef __DEVICED_BOOT_H__
#define __DEVICED_BOOT_H__
-int check_booting_finished(void);
void add_booting_done_handler(void *data);
void remove_booting_done_handler(void *data);
#include <limits.h>
#include <vconf.h>
#include <glib.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/device-notifier.h"
#include <bundle.h>
#include <eventsystem.h>
#include <stdbool.h>
-#include <libgdbus/dbus-system.h>
-#include <libgdbus/dbus-systemd.h>
+#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/dbus-systemd.h>
#include "dd-deviced.h"
#include "core/log.h"
#include <fcntl.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/devices.h"
#include <errno.h>
#include <assert.h>
#include <gio/gio.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "common.h"
#include "deviced-systemd.h"
#include <stdbool.h>
#include <hw/thermal.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "apps/apps.h"
#include "core/devices.h"
#include <linux/rtc.h>
#include <fcntl.h>
#include <sys/timerfd.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/devices.h"
#include <device-node.h>
#include <vconf.h>
#include <hw/touchsensitivity.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/devices.h"
#include "core/common.h"
#include <attr/xattr.h>
#include <linux/limits.h>
#include <tzplatform_config.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/devices.h"
#include <sys/types.h>
#include <sys/mount.h>
#include <unistd.h>
-#include <libgdbus/dbus-system.h>
-#include <libgdbus/dbus-systemd.h>
+#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/dbus-systemd.h>
#include "core/log.h"
#include "core/config-parser.h"
#include <stdbool.h>
#include <device-node.h>
#include <vconf.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/common.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <tzplatform_config.h>
-#include <libgdbus/dbus-system.h>
+#include <libsyscommon/dbus-system.h>
#include "core/log.h"
#include "core/devices.h"