+++ /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__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- NORMAL_BOOT = 0,
- SILENT_BOOT,
-} boot_mode_e;
-
-int device_get_reboot_mode(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
return 0;
}
+int device_board_get_boot_mode(char *buffer, int len)
+{
+ return hal_device_board_get_boot_mode(buffer, len);
+}
+
int device_board_get_boot_reason(char *buffer, int len)
{
return hal_device_board_get_boot_reason(buffer, len);
+++ /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/bootmode.so"
-
-//LCOV_EXCL_START Not tested API
-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) {
-//LCOV_EXCL_START System Error
- _E("Failed to open module: %s", dlerror());
- return NORMAL_BOOT;
-//LCOV_EXCL_STOP
- }
-
- get_reboot_mode = dlsym(handle, "get_reboot_mode");
- if (!get_reboot_mode) {
-//LCOV_EXCL_START System Error
- _E("Failed to get address of get_reboot_mode().");
- dlclose(handle);
- return NORMAL_BOOT;
-//LCOV_EXCL_STOP
- }
-
- ret = get_reboot_mode();
-
- dlclose(handle);
-
- return ret;
-}
-//LCOV_EXCL_STOP