From: Youngjae Cho Date: Mon, 20 Dec 2021 06:15:34 +0000 (+0900) Subject: board: fix parameters of boot operation X-Git-Tag: submit/tizen/20220112.015321^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eeb77fd47e572e89cd49f93761ab70ca6ded1f59;p=platform%2Fhal%2Fapi%2Fdevice.git board: fix parameters of boot operation Change-Id: I67b92ad2291c78f73e118b7570b4260899596e96 Signed-off-by: Youngjae Cho --- diff --git a/include/backend/hal-board-interface.h b/include/backend/hal-board-interface.h index 8e8bee5..8b6a517 100644 --- a/include/backend/hal-board-interface.h +++ b/include/backend/hal-board-interface.h @@ -29,8 +29,8 @@ typedef struct _hal_backend_board_funcs { int (*switch_partition)(int argc, char *argv[]); int (*set_boot_success)(void); int (*clear_boot_mode)(void); - int (*get_boot_mode)(int *mode); - int (*get_boot_reason)(int *reason); + int (*get_boot_mode)(char *buffer, int len); + int (*get_boot_reason)(char *buffer, int len); } hal_backend_board_funcs; #ifdef __cplusplus diff --git a/include/hal-board.h b/include/hal-board.h index d4afeeb..aa3c679 100644 --- a/include/hal-board.h +++ b/include/hal-board.h @@ -29,6 +29,10 @@ int hal_device_board_put_backend(void); int hal_device_board_get_device_serial_number(char *buffer, int len); int hal_device_board_get_device_revision(int *revision); int hal_device_board_switch_partition(int argc, char *argv[]); +int hal_device_board_set_boot_success(void); +int hal_device_board_clear_boot_mode(void); +int hal_device_board_get_boot_mode(char *buffer, int len); +int hal_device_board_get_boot_reason(char *buffer, int len); #ifdef __cplusplus } diff --git a/src/board.c b/src/board.c index af88ff5..41b8254 100644 --- a/src/board.c +++ b/src/board.c @@ -139,7 +139,7 @@ int hal_device_board_clear_boot_mode(void) return hal_board_funcs->clear_boot_mode(); } -int hal_device_board_get_boot_mode(int *mode) +int hal_device_board_get_boot_mode(char *buffer, int len) { int ret; @@ -152,10 +152,10 @@ int hal_device_board_get_boot_mode(int *mode) !hal_board_funcs->get_boot_mode) return -ENODEV; - return hal_board_funcs->get_boot_mode(mode); + return hal_board_funcs->get_boot_mode(buffer, len); } -int hal_device_board_get_boot_reason(int *reason) +int hal_device_board_get_boot_reason(char *buffer, int len) { int ret; @@ -168,5 +168,5 @@ int hal_device_board_get_boot_reason(int *reason) !hal_board_funcs->get_boot_reason) return -ENODEV; - return hal_board_funcs->get_boot_reason(reason); + return hal_board_funcs->get_boot_reason(buffer, len); }