summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongwoo Lee <dwoo08.lee@samsung.com>2022-09-20 12:38:37 +0900
committerDongwoo Lee <dwoo08.lee@samsung.com>2022-09-20 12:40:26 +0900
commitd30bc71df8c92b42e24d5f237f607345425ebf2d (patch)
tree7cef98fca6980c758912a6f28dd3486dba6796d3
parent1951ce3185e97f86c1b011ce1b02cfe50341444a (diff)
downloaddevice-rpi-d30bc71df8c92b42e24d5f237f607345425ebf2d.tar.gz
device-rpi-d30bc71df8c92b42e24d5f237f607345425ebf2d.tar.bz2
device-rpi-d30bc71df8c92b42e24d5f237f607345425ebf2d.zip
Change-Id: I07104009925a0501872ba1ade389704fda1cc305 Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
-rw-r--r--hw/board/board.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/board/board.c b/hw/board/board.c
index 10ccf02..743a823 100644
--- a/hw/board/board.c
+++ b/hw/board/board.c
@@ -197,6 +197,7 @@ static int set_partition_status(char partition_ab, const char *status)
static int get_partition_status(char partition_ab, char *buffer, const int max_len)
{
+ char *dummy;
char *path;
char target_partition_ab = partition_ab;
@@ -226,7 +227,7 @@ static int get_partition_status(char partition_ab, char *buffer, const int max_l
}
/* remove potential newline | tokenizer will place '\0' in a place of '\n' */
- strtok(buffer, "\n");
+ strtok_r(buffer, "\n", &dummy);
if (strcmp(buffer, PARTITION_STATUS_OK) != 0 &&
strcmp(buffer, PARTITION_STATUS_CORRUPTED) != 0 &&