[Feature][ZXW-65]merged P49 base code
Change-Id: I3e09c0c3d47483bc645f02310380ecb7fc6f4041
diff --git a/ap/lib/libupi_ab/inc/upi_update.h b/ap/lib/libupi_ab/inc/upi_update.h
index 486707e..255d47b 100755
--- a/ap/lib/libupi_ab/inc/upi_update.h
+++ b/ap/lib/libupi_ab/inc/upi_update.h
@@ -16,38 +16,42 @@
#include "zxic_fota_ab_upgrade.h"
-#define FOTA_PACKAGE_FILE "/cache/zte_fota_ab/upgrade.package"
+// #define FOTA_PACKAGE_FILE "/cache/zte_fota_ab/upgrade.package"
-typedef enum {
- UPGRADE_STATUS_UNKNOWN = -1,
- UPGRADE_STATUS_VERIFING = 0,
- UPGRADE_STATUS_VERIFY_SUCCESS,
- UPGRADE_STATUS_VERIFY_FAIL,
- UPGRADE_STATUS_UPDATING,
- UPGRADE_STATUS_UPDATE_SUCCESS,
- UPGRADE_STATUS_UPDATE_FAIL,
- UPGRADE_STATUS_NO_NEED_UPDATE,
- UPGRADE_STATUS_NEED_UPDATE
+
+typedef enum
+{
+ UPGRADE_STATUS_UNKNOWN = -1,
+ UPGRADE_STATUS_VERIFING = 0,
+ UPGRADE_STATUS_VERIFY_SUCCESS,
+ UPGRADE_STATUS_VERIFY_FAIL,
+ UPGRADE_STATUS_UPDATING,
+ UPGRADE_STATUS_UPDATE_SUCCESS,
+ UPGRADE_STATUS_UPDATE_FAIL,
+ UPGRADE_STATUS_NO_NEED_UPDATE,
+ UPGRADE_STATUS_NEED_UPDATE
} upgrade_status_s_type;
-typedef struct {
- int upgrage_package_file_desc; // upgrade package file description
- unsigned int upgrade_data_offset; // upgrade package offset in file
- unsigned int upgrade_file_size; // upgrade package file size
-}partition_upgrade_package_info_t;
+typedef struct
+{
+ int upgrage_package_file_desc; // upgrade package file description
+ unsigned int upgrade_data_offset; // upgrade package offset in file
+ unsigned int upgrade_file_size; // upgrade package file size
+} partition_upgrade_package_info_t;
-typedef struct {
- char partition_name[PARTITION_NAME_LEN];
- int partition_type;
- long long len;
- int offset;
- int zipped;
- char hash[HASH_MAX_LEN];
- int index;
- int partition_total_count;
- partition_upgrade_package_info_t pkg_info;
- partition_mtd_info_t mtd_info;
+typedef struct
+{
+ char partition_name[PARTITION_NAME_LEN];
+ int partition_type;
+ long long len;
+ int offset;
+ int zipped;
+ char hash[HASH_MAX_LEN];
+ int index;
+ int partition_total_count;
+ partition_upgrade_package_info_t pkg_info;
+ partition_mtd_info_t mtd_info;
} device_data_t;
int upi_update(z_upgrade_flush_status_t* flush_status);