Fix device_info for v1/v2.
Change-Id: I77c1da11f042bf2523d5768b18c18b9a0e1e0c6e
diff --git a/mbtk/mbtk_utils/mbtk_reboot.c b/mbtk/mbtk_utils/mbtk_reboot.c
index a355235..d3861e2 100755
--- a/mbtk/mbtk_utils/mbtk_reboot.c
+++ b/mbtk/mbtk_utils/mbtk_reboot.c
@@ -45,7 +45,11 @@
return -1;
}
- info_basic.reboot_flag = MBTK_REBOOT_FLAG_DOWNLOAD;
+ if(info_basic.version == DEV_INFO_VERSION_V1) {
+ info_basic.basic.v1.reboot_flag = MBTK_REBOOT_FLAG_DOWNLOAD;
+ } else {
+ info_basic.basic.v2.reboot_flag = MBTK_REBOOT_FLAG_DOWNLOAD;
+ }
result = mbtk_dev_info_write(MBTK_DEVICE_INFO_ITEM_BASIC, &info_basic, sizeof(mbtk_device_info_basic_t));
if(result) {
printf("mbtk_dev_info_write(BASIC) fail.\n");