Permalink
Browse files

Add reason argument for nyx_system_reboot

Extended the API because in some cases we need to reboot to
bootloader, and this reason argument will tell bootloader why the
reboot happened

Open-webOS-DCO-1.0-Signed-off-by: Janne Hurskainen <janne.hurskainen@palm.com>
Open-webOS-DCO-1.0-Signed-off-by: Keith Derrick <keith.derrick@palm.com>

Change-Id: I389a6a04bf89696e510f59c222dafc3fb32581dc
  • Loading branch information...
1 parent cf839e0 commit 8fb0dcfc32b46e2ab7b2586131d456a3f0e96381 Janne Hurskainen committed with Keith Derrick Nov 2, 2012
View
@@ -24,12 +24,12 @@ cmake_minimum_required(VERSION 2.8.7)
project(nyx)
-set(NYX_API_VERSION_MAJOR 2)
+set(NYX_API_VERSION_MAJOR 3)
set(NYX_API_VERSION_MINOR 0)
include(webOS/webOS)
webos_modules_init(1 0 0 QUALIFIER RC4)
-webos_component(${NYX_API_VERSION_MAJOR} ${NYX_API_VERSION_MINOR} 0)
+webos_component(${NYX_API_VERSION_MAJOR} ${NYX_API_VERSION_MINOR} 0 QUALIFIER RC1)
set(NYX_MODULE_DIR ${WEBOS_INSTALL_LIBDIR}/nyx/modules CACHE PATH "Nyx modules directory path")
set(NYX_MODULE_MOCK_DIR ${WEBOS_INSTALL_LIBDIR}/nyx/modules.mock CACHE PATH "Nyx mock modules directory path")
@@ -121,13 +121,14 @@ NYX_API_EXPORT nyx_error_t nyx_system_shutdown(nyx_device_handle_t handle, nyx_s
*
* @param[in] handle - the event handle
* @param[in] type - normal or emergency reboot
+ * @param[in] reason - reason for the reboot
*
*
* @return error code (NYX_ERROR_NONE if operation is successful)
*
*/
-NYX_API_EXPORT nyx_error_t nyx_system_reboot(nyx_device_handle_t handle, nyx_system_shutdown_type_t type);
+NYX_API_EXPORT nyx_error_t nyx_system_reboot(nyx_device_handle_t handle, nyx_system_shutdown_type_t type, const char *reason);
/* MSM APIs */
@@ -188,7 +188,7 @@ typedef nyx_error_t (*nyx_system_query_next_alarm_function_t)(nyx_device_t *, ti
typedef nyx_error_t (*nyx_system_query_rtc_time_function_t)(nyx_device_t *, time_t *);
typedef nyx_error_t (*nyx_system_suspend_function_t)(nyx_device_t *, bool *);
typedef nyx_error_t (*nyx_system_shutdown_function_t)(nyx_device_t *, nyx_system_shutdown_type_t);
-typedef nyx_error_t (*nyx_system_reboot_function_t)(nyx_device_t *, nyx_system_shutdown_type_t);
+typedef nyx_error_t (*nyx_system_reboot_function_t)(nyx_device_t *, nyx_system_shutdown_type_t, const char *);
typedef nyx_error_t (*nyx_system_set_msm_mode_function_t)(nyx_device_t *, nyx_system_msm_action_t, nyx_system_msm_return_code_t*);
typedef nyx_error_t (*nyx_system_get_msm_state_function_t)(nyx_device_t *,nyx_system_msm_state_t*);
typedef nyx_error_t (*nyx_system_register_msm_change_callback_function_t)(nyx_device_t *, nyx_device_callback_function_t, void *);
@@ -55,9 +55,9 @@ nyx_error_t nyx_system_shutdown(nyx_device_handle_t handle, nyx_system_shutdown_
nyx_execute_return_function(system_shutdown, SYSTEM, SHUTDOWN, handle, type);
}
-nyx_error_t nyx_system_reboot(nyx_device_handle_t handle, nyx_system_shutdown_type_t type)
+nyx_error_t nyx_system_reboot(nyx_device_handle_t handle, nyx_system_shutdown_type_t type, const char *reason)
{
- nyx_execute_return_function(system_reboot, SYSTEM, REBOOT, handle, type);
+ nyx_execute_return_function(system_reboot, SYSTEM, REBOOT, handle, type, reason);
}
nyx_error_t nyx_system_set_msm_mode(nyx_device_handle_t handle, nyx_system_msm_action_t action, nyx_system_msm_return_code_t *ret)

0 comments on commit 8fb0dcf

Please sign in to comment.