#if !defined(BUILD_RECOVERY_IMAGE)
void save_preserve_file_to_nand(void)
{
- const char *preserve_info_ex_path = "/user/exc/preserve.bin";
- int32_t ret = exc_info_write(preserve_info_ex_path, 0, (uint8_t *)&g_preserve_data_lib, sizeof(preserve_data_t));
+ const char *preserve_info_ex_path = "/user/exc/preserve_%d.bin";
+ uint32_t timestamp = get_local_timestamp();
+ char *str = (char *)malloc(200);
+ memset_s(str, 200, 0, 200);
+ sprintf(str, preserve_info_ex_path, timestamp);
+ int32_t ret = exc_info_write(str, 0, (uint8_t *)&g_preserve_data_lib, sizeof(preserve_data_t));
printf("save_preserve_file_to_nand ret:%d.\r\n", ret);
}