--- /dev/null
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SYSTEM_BOOTING_INTERNAL_H__
+#define __TIZEN_SYSTEM_BOOTING_INTERNAL_H__
+
+typedef enum {
+ NORMAL_BOOT = 0,
+ SILENT_BOOT,
+} boot_mode_e;
+
+int device_get_reboot_mode(void);
+
+#endif
--- /dev/null
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <errno.h>
+#include <dlfcn.h>
+#include <booting-internal.h>
+
+#include "common.h"
+
+#define BOOT_SO_PATH "/usr/lib/deviced/boot.so"
+
+int device_get_reboot_mode(void)
+{
+ int (*get_reboot_mode) (void);
+ void *handle;
+ int ret;
+
+ handle = dlopen(BOOT_SO_PATH, RTLD_NOW|RTLD_GLOBAL);
+
+ if (!handle) {
+ _E("Failed to open module: %s", dlerror());
+ return NORMAL_BOOT;
+ }
+
+ get_reboot_mode = dlsym(handle, "get_reboot_mode");
+ if (!get_reboot_mode) {
+ _E("Failed to get address of get_reboot_mode().");
+ dlclose(handle);
+ return NORMAL_BOOT;
+ }
+
+ ret = get_reboot_mode();
+
+ dlclose(handle);
+
+ return ret;
+}
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "common.h"
#include "dbus.h"
#include "touchscreen-internal.h"