[Feature][ZXW-241]merge P56U01 version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: I7985538dde6951dd824c36149bf9a1e3ca23c734
diff --git a/ap/app/zte_comm/nvserver/nvserver.c b/ap/app/zte_comm/nvserver/nvserver.c
index eb0e6d4..b412799 100755
--- a/ap/app/zte_comm/nvserver/nvserver.c
+++ b/ap/app/zte_comm/nvserver/nvserver.c
@@ -31,75 +31,73 @@
 file,char*key,char*value);static int nvunset(char*file,char*key);static int 
 nvclear(char*file);static int nvreset(char*file);static int nvcommit(char*file);
 T_NV_NODE*nv_list;int nvserver_main(int argc,char*argv[]){int msgId=
-(0x168b+107-0x16f6);T_NV_MSG_INFO rcvBuf;T_NV_MSG_RESULT sndBuf;struct msqid_ds 
-msgInfo;prctl(PR_SET_NAME,"\x6e\x76\x73\x65\x72\x76\x65\x72",
-(0x136b+1572-0x198f),(0x48d+6462-0x1dcb),(0xdb2+3219-0x1a45));memset(&rcvBuf,
-(0x831+7846-0x26d7),sizeof(rcvBuf));memset(&sndBuf,(0xfea+4708-0x224e),sizeof(
-sndBuf));memset(&msgInfo,(0x715+3909-0x165a),sizeof(msgInfo));msgId=msgget(
-MODULE_ID_NV,IPC_CREAT|(0x6d7+5925-0x1c7c));if(-(0x1148+4886-0x245d)==msgId){
-printf(
+(0x19b+1027-0x59e);T_NV_MSG_INFO rcvBuf;T_NV_MSG_RESULT sndBuf;struct msqid_ds 
+msgInfo;prctl(PR_SET_NAME,"\x6e\x76\x73\x65\x72\x76\x65\x72",(0x33c+3222-0xfd2),
+(0x2e2+6744-0x1d3a),(0x1418+1152-0x1898));memset(&rcvBuf,(0x11ed+2790-0x1cd3),
+sizeof(rcvBuf));memset(&sndBuf,(0x1f43+1667-0x25c6),sizeof(sndBuf));memset(&
+msgInfo,(0x125c+79-0x12ab),sizeof(msgInfo));msgId=msgget(MODULE_ID_NV,IPC_CREAT|
+(0x1908+1341-0x1cc5));if(-(0x9d6+1345-0xf16)==msgId){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x6d\x73\x67\x67\x65\x74\x20\x6d\x73\x67\x49\x64\x20\x66\x61\x69\x6c\x2c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
-,errno);return-(0x44d+3091-0x105f);}if(-(0x1651+4142-0x267e)!=msgctl(msgId,
-IPC_STAT,&msgInfo)){msgInfo.msg_qbytes=262144;if(-(0xc46+6228-0x2499)==msgctl(
-msgId,IPC_SET,&msgInfo))printf(
+,errno);return-(0x2277+571-0x24b1);}if(-(0x5bb+488-0x7a2)!=msgctl(msgId,IPC_STAT
+,&msgInfo)){msgInfo.msg_qbytes=262144;if(-(0x2d9+8813-0x2545)==msgctl(msgId,
+IPC_SET,&msgInfo))printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x6d\x73\x67\x63\x74\x6c\x20\x6d\x73\x67\x49\x64\x20\x66\x61\x69\x6c\x2c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
-,errno);}if(nvDirInit()!=(0xcfa+6617-0x26d3)){printf(
+,errno);}if(nvDirInit()!=(0x238+6738-0x1c8a)){printf(
 "\x6e\x76\x44\x69\x72\x49\x6e\x69\x74\x20\x66\x61\x69\x6c\x65\x21" "\n");return-
-(0x245+6777-0x1cbd);}nvConfig();nvInit();while((0x1e44+1924-0x25c7)){if(-
-(0x91f+1796-0x1022)==msgrcv(msgId,&rcvBuf,sizeof(T_NV_MSG_INFO)-sizeof(long),
-MSG_TYPE_NV,(0x120f+1370-0x1769))){printf(
+(0x4ca+5864-0x1bb1);}nvConfig();nvInit();while((0x20e2+894-0x245f)){if(-
+(0x1790+885-0x1b04)==msgrcv(msgId,&rcvBuf,sizeof(T_NV_MSG_INFO)-sizeof(long),
+MSG_TYPE_NV,(0x2fd+3597-0x110a))){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6d\x73\x67\x72\x63\x76\x20\x66\x61\x69\x6c\x2c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x21" "\n"
-,errno);continue;}analyMsg(&rcvBuf,&sndBuf);if(-(0x13fc+1227-0x18c6)==msgsnd(
-msgId,&sndBuf,sizeof(T_NV_MSG_RESULT)-sizeof(long),(0x220f+1085-0x264c))){printf
-(
+,errno);continue;}analyMsg(&rcvBuf,&sndBuf);if(-(0x1033+2951-0x1bb9)==msgsnd(
+msgId,&sndBuf,sizeof(T_NV_MSG_RESULT)-sizeof(long),(0x59d+8029-0x24fa))){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6d\x73\x67\x73\x6e\x64\x20\x66\x61\x69\x6c\x2c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x21" "\n"
-,errno);continue;}}return((0xa4f+3064-0x1647));}static void configdir(char*dir){
-DIR*dp;int ret;struct dirent*entry;struct stat statbuf;if((dp=opendir(dir))==
+,errno);continue;}}return((0x13d9+4251-0x2474));}static void configdir(char*dir)
+{DIR*dp;int ret;struct dirent*entry;struct stat statbuf;if((dp=opendir(dir))==
 NULL){fprintf(stderr,
 "\x63\x61\x6e\x6e\x6f\x74\x20\x6f\x70\x65\x6e\x20\x64\x69\x72\x65\x63\x74\x6f\x72\x79\x3a\x20\x25\x73" "\n"
 ,dir);return;}chdir(dir);while((entry=readdir(dp))!=NULL){ret=lstat(entry->
-d_name,&statbuf);if(ret<(0x78d+6564-0x2131)){fprintf(stderr,
+d_name,&statbuf);if(ret<(0xf03+681-0x11ac)){fprintf(stderr,
 "\x6c\x73\x74\x61\x74\x20\x65\x72\x72\x6f\x72\x3a\x20\x25\x73" "\n",strerror(
 errno));chdir("\x2e\x2e");closedir(dp);return;}if(!S_ISDIR(statbuf.st_mode)){if(
-strcmp("\x2e",entry->d_name)==(0x10d6+165-0x117b)||strcmp("\x2e\x2e",entry->
-d_name)==(0x1e86+1040-0x2296))continue;if(!isNvConfiged(entry->d_name)){if(
+strcmp("\x2e",entry->d_name)==(0x10e3+5248-0x2563)||strcmp("\x2e\x2e",entry->
+d_name)==(0x1eda+849-0x222b))continue;if(!isNvConfiged(entry->d_name)){if(
 addConfigFile(entry->d_name,NULL)!=RESULT_SUCCESS)printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x63\x6f\x6e\x66\x69\x67\x20\x25\x73\x20\x65\x72\x72\x6f\x72\x21" "\n"
 ,entry->d_name);}}}chdir("\x2e\x2e");closedir(dp);}static void nvConfig(){char*
-val=NULL;FILE*fp=NULL;char buf[NV_MAX_CONFIG_LEN]={(0x4a9+2613-0xede)};fp=fopen(
+val=NULL;FILE*fp=NULL;char buf[NV_MAX_CONFIG_LEN]={(0x1b4f+31-0x1b6e)};fp=fopen(
 NV_CONFIG_FILE,"\x72\x6f");if(!fp){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x6f\x70\x65\x6e\x20\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x21" "\n"
 ,NV_CONFIG_FILE,errno);return;}while(fgets(buf,NV_MAX_CONFIG_LEN,fp)){if(buf[
-(0x21d7+1286-0x26dd)]=='\n'||buf[(0x3e1+5008-0x1771)]==
-((char)(0x1aa+3373-0xeb4)))continue;val=strchr(buf,((char)(0x7bd+601-0x9d9)));if
-(!val){printf(
+(0x1e1a+2046-0x2618)]=='\n'||buf[(0x432+5709-0x1a7f)]==
+((char)(0xbdc+5966-0x2307)))continue;val=strchr(buf,((char)(0x53+1678-0x6a4)));
+if(!val){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x6f\x72\x6d\x61\x74\x20\x65\x72\x72\x6f\x72\x3a\x20\x73\x74\x72\x20\x3d\x20\x25\x73\x21" "\n"
-,NV_CONFIG_FILE,buf);continue;}buf[strlen(buf)-(0xe7+8054-0x205c)]='\0';*val++=
+,NV_CONFIG_FILE,buf);continue;}buf[strlen(buf)-(0x1576+348-0x16d1)]='\0';*val++=
 '\0';if(!isCfgConfiged(buf)){if(addConfigFile(val,buf)!=RESULT_SUCCESS)printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x63\x6f\x6e\x66\x69\x67\x20\x25\x73\x20\x65\x72\x72\x6f\x72\x21" "\n"
 ,buf);}}fclose(fp);configdir(NV_FS_MAIN_PATH);}static int nvDirInit(){if(access(
-NV_FS_PATH,F_OK)!=(0x69a+6955-0x21c5)){if(mkdir(NV_FS_PATH,(0x116d+658-0x1212))
-!=(0xc5b+2260-0x152f)){printf(
+NV_FS_PATH,F_OK)!=(0x1156+227-0x1239)){if(mkdir(NV_FS_PATH,(0x696+534-0x6bf))!=
+(0x480+7802-0x22fa)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_PATH,errno);return-(0xbfb+1309-0x1117);}if(mkdir(NV_FS_MAIN_PATH,
-(0x564+8610-0x2519))!=(0x17e5+1992-0x1fad)){printf(
+,NV_FS_PATH,errno);return-(0xa17+7295-0x2695);}if(mkdir(NV_FS_MAIN_PATH,
+(0x7f4+1760-0xce7))!=(0x1591+1974-0x1d47)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_MAIN_PATH,errno);return-(0x13fb+1266-0x18ec);}if(mkdir(NV_FS_BACKUP_PATH,
-(0x7b5+4152-0x1600))!=(0x7df+956-0xb9b)){printf(
+,NV_FS_MAIN_PATH,errno);return-(0xd66+2657-0x17c6);}if(mkdir(NV_FS_BACKUP_PATH,
+(0x91f+967-0xaf9))!=(0x14d+5668-0x1771)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_BACKUP_PATH,errno);return-(0x1d38+1078-0x216d);}}else{if(access(
-NV_FS_MAIN_PATH,F_OK)!=(0x161b+1213-0x1ad8)){if(mkdir(NV_FS_MAIN_PATH,
-(0xeb3+77-0xd13))!=(0x110f+4883-0x2422)){printf(
+,NV_FS_BACKUP_PATH,errno);return-(0x9f9+3433-0x1761);}}else{if(access(
+NV_FS_MAIN_PATH,F_OK)!=(0x134c+423-0x14f3)){if(mkdir(NV_FS_MAIN_PATH,
+(0x2514+5-0x232c))!=(0x175+7655-0x1f5c)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_MAIN_PATH,errno);return-(0x125c+989-0x1638);}}if(access(NV_FS_BACKUP_PATH
-,F_OK)!=(0x317+8741-0x253c)){if(mkdir(NV_FS_BACKUP_PATH,(0x828+6476-0x1f87))!=
-(0x466+2309-0xd6b)){printf(
+,NV_FS_MAIN_PATH,errno);return-(0xd27+5868-0x2412);}}if(access(NV_FS_BACKUP_PATH
+,F_OK)!=(0x13b7+3985-0x2348)){if(mkdir(NV_FS_BACKUP_PATH,(0xbaa+5689-0x1ff6))!=
+(0x1573+1805-0x1c80)){printf(
 "\x6e\x65\x72\x76\x65\x72\x20\x6d\x6b\x64\x69\x72\x20\x25\x73\x20\x66\x61\x6c\x69\x2c\x65\x72\x72\x6e\x6f\x3d\x25\x64" "\n"
-,NV_FS_BACKUP_PATH,errno);return-(0x4e7+2518-0xebc);}}}return(0x25b9+122-0x2633)
-;}static void nvInit(){T_NV_NODE*list=NULL;char nvMainFile[NV_PATH_LEN]={
-(0x20ab+1529-0x26a4)};char nvBackupFile[NV_PATH_LEN]={(0x13d5+2526-0x1db3)};
+,NV_FS_BACKUP_PATH,errno);return-(0x6e1+2050-0xee2);}}}return(0xb8d+491-0xd78);}
+static void nvInit(){T_NV_NODE*list=NULL;char nvMainFile[NV_PATH_LEN]={
+(0x8bd+7048-0x2445)};char nvBackupFile[NV_PATH_LEN]={(0xfe3+4840-0x22cb)};
 #ifdef FOTA_AB
-T_FLAGS_INFO flags_info={(0x1c53+23-0x1c6a)};int ret=(0x32f+7884-0x21fb);
+T_FLAGS_INFO flags_info={(0x7ac+3792-0x167c)};int ret=(0x51f+46-0x54d);
 #endif
 for(list=nv_list;list;list=list->next){snprintf(nvMainFile,NV_PATH_LEN,
 "\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,list->nvFile);snprintf(nvBackupFile,
@@ -107,73 +105,73 @@
 nvMainFile)){if(!checkNvFs(nvBackupFile))restoreNvFs(nvBackupFile,nvMainFile);}
 else if(checkNvFs(nvBackupFile)){restoreNvFs(nvMainFile,nvBackupFile);}else{
 loadFactroyParam(list);nvcommit(list->nvFile);continue;}loadNvFs(list->nvFile);
-if(!strcmp(list->nvFile,NV_CFG)&&get_update_status()==(0xa6d+5708-0x20b7)){
+if(!strcmp(list->nvFile,NV_CFG)&&get_update_status()==(0x10c+4463-0x1279)){
 reloadFactroyParam(list);delete_not_needed(list);nvcommit(list->nvFile);
 #ifdef FOTA_AB
 ret=flags_get(&flags_info);flags_info.boot_fota_flag.fota_status=
-(0xbfb+1777-0x12ec);ret=flags_set(&flags_info);
+(0x1f09+1628-0x2565);ret=flags_set(&flags_info);
 #endif
-}}}uint hash(const char*s){uint hash=(0x3ac+3524-0x1170);while(*s){hash=
+}}}uint hash(const char*s){uint hash=(0x4e8+1196-0x994);while(*s){hash=
 NV_HASH_MUL*hash+*s++;}return hash;}static int loadFactroyParam(T_NV_NODE*list){
 char*val=NULL;FILE*fp=NULL;T_NV_CONFIG*config=NULL;char buf[NV_MAX_ITEM_LEN]={
-(0x484+2097-0xcb5)};for(config=list->fileList;config;config=config->next){fp=
+(0x7ca+6531-0x214d)};for(config=list->fileList;config;config=config->next){fp=
 fopen(config->configFile,"\x72\x6f");if(!fp){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x6f\x70\x65\x6e\x20\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64\x21" "\n"
 ,config->configFile,errno);return RESULT_FILE_OPEN_FAIL;}while(fgets(buf,
-NV_MAX_ITEM_LEN,fp)){if(buf[(0x94a+127-0x9c9)]=='\n'||buf[(0x16c3+2596-0x20e7)]
-==((char)(0xbd3+5756-0x222c)))continue;val=strchr(buf,
-((char)(0x14f2+3643-0x22f0)));if(!val){printf(
+NV_MAX_ITEM_LEN,fp)){if(buf[(0x1c6b+147-0x1cfe)]=='\n'||buf[(0x89a+6841-0x2353)]
+==((char)(0xe9c+5504-0x23f9)))continue;val=strchr(buf,
+((char)(0x1ba1+1225-0x202d)));if(!val){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x25\x73\x20\x66\x69\x6c\x65\x20\x66\x6f\x72\x6d\x61\x74\x20\x65\x72\x72\x6f\x72\x3a\x73\x74\x72\x69\x6e\x67\x20\x3d\x20\x25\x73" "\n"
-,config->configFile,buf);continue;}if(buf[strlen(buf)-(0x1ce0+2146-0x2541)]==
-'\n')buf[strlen(buf)-(0xcc8+811-0xff2)]='\0';*val++='\0';nvset(list->nvFile,buf,
-val,(0x550+460-0x71b));}printf(
+,config->configFile,buf);continue;}if(buf[strlen(buf)-(0x14f+5205-0x15a3)]=='\n'
+)buf[strlen(buf)-(0xe2b+6073-0x25e3)]='\0';*val++='\0';nvset(list->nvFile,buf,
+val,(0x7cf+5713-0x1e1f));}printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x6c\x6f\x61\x64\x46\x61\x63\x74\x72\x6f\x79\x50\x61\x72\x61\x6d\x20\x25\x73\x21" "\n"
 ,config->configFile);fclose(fp);}return RESULT_SUCCESS;}static bool checkNvFs(
-char*file){int len=(0xc5b+5377-0x215c);int cnt=(0x1107+3957-0x207c);FILE*fp=NULL
-;char*buf=NULL;struct stat statbuff={(0x94c+4223-0x19cb)};if(stat(file,&statbuff
-)<(0x49d+2653-0xefa))return false;len=statbuff.st_size;if(len<NV_CHECK_SIZE)
+char*file){int len=(0x994+480-0xb74);int cnt=(0xad4+3715-0x1957);FILE*fp=NULL;
+char*buf=NULL;struct stat statbuff={(0x4b9+5506-0x1a3b)};if(stat(file,&statbuff)
+<(0x4f9+8331-0x2584))return false;len=statbuff.st_size;if(len<NV_CHECK_SIZE)
 return false;fp=fopen(file,"\x72\x6f");if(!fp)return false;buf=(char*)malloc(len
-);if(!buf){fclose(fp);return false;}cnt=(0x1b4+6081-0x1975);while(cnt<len){cnt=
-cnt+fread(buf+cnt,(0xd00+2097-0x1530),len-cnt,fp);if(ferror(fp)){clearerr(fp);
+);if(!buf){fclose(fp);return false;}cnt=(0x24b+3316-0xf3f);while(cnt<len){cnt=
+cnt+fread(buf+cnt,(0x753+2474-0x10fc),len-cnt,fp);if(ferror(fp)){clearerr(fp);
 free(buf);fclose(fp);return false;}}if(len!=cnt){free(buf);fclose(fp);return 
 false;}if(getSum(buf,len-NV_CHECK_SIZE)+NV_FILE_FLAG!=*(uint*)(buf+len-
 NV_CHECK_SIZE)){free(buf);fclose(fp);return false;}free(buf);fclose(fp);return 
 true;}static int copyfile(const char*from,const char*to){int fd_to;int fd_from;
-char buf[(0x146b+3404-0x11b7)];ssize_t nread;int ret=-(0x1722+499-0x1914);
-fd_from=open(from,O_RDONLY);if(fd_from<(0x211d+480-0x22fd))return-
-(0x1a14+2092-0x223e);fd_to=open(to,O_RDWR|O_CREAT|O_TRUNC|O_SYNC,
-(0x1b25+3271-0x264c));if(fd_to<(0x46c+1389-0x9d9)){ret=-(0x1976+3366-0x2699);
-goto out_error;}while((0x573+1183-0xa11)){char*out_ptr;ssize_t nwritten;nread=
-read(fd_from,buf,sizeof(buf));if(nread==(0xd83+3039-0x1962)){break;}else{if(
-nread<(0x1aef+1520-0x20df)){if(errno==EINTR||errno==EAGAIN){continue;}else{ret=-
-(0x1ab6+25-0x1acb);goto out_error;}}}out_ptr=buf;do{nwritten=write(fd_to,out_ptr
-,nread);if(nwritten>(0xcdf+3923-0x1c32)){nread-=nwritten;out_ptr+=nwritten;}else
-{if(nwritten<(0x10df+3459-0x1e62)){if(errno==EINTR||errno==EAGAIN){continue;}
-else{ret=-(0xe6b+3762-0x1d18);goto out_error;}}}}while(nread>(0x1aa5+150-0x1b3b)
-);}ret=fsync(fd_to);if(ret<(0xd91+5772-0x241d)){printf(
+char buf[(0x1cfd+5586-0x22cf)];ssize_t nread;int ret=-(0x14e4+1342-0x1a21);
+fd_from=open(from,O_RDONLY);if(fd_from<(0x80a+1267-0xcfd))return-
+(0xd49+6342-0x260d);fd_to=open(to,O_RDWR|O_CREAT|O_TRUNC|O_SYNC,
+(0x11b9+1014-0x140f));if(fd_to<(0x5a4+5838-0x1c72)){ret=-(0x78f+5005-0x1b19);
+goto out_error;}while((0x1805+1563-0x1e1f)){char*out_ptr;ssize_t nwritten;nread=
+read(fd_from,buf,sizeof(buf));if(nread==(0x185d+165-0x1902)){break;}else{if(
+nread<(0x77c+3842-0x167e)){if(errno==EINTR||errno==EAGAIN){continue;}else{ret=-
+(0x86f+7027-0x23de);goto out_error;}}}out_ptr=buf;do{nwritten=write(fd_to,
+out_ptr,nread);if(nwritten>(0x1447+1652-0x1abb)){nread-=nwritten;out_ptr+=
+nwritten;}else{if(nwritten<(0x8e1+3335-0x15e8)){if(errno==EINTR||errno==EAGAIN){
+continue;}else{ret=-(0x1c55+1217-0x2111);goto out_error;}}}}while(nread>
+(0x383+5266-0x1815));}ret=fsync(fd_to);if(ret<(0x845+1310-0xd63)){printf(
 "\x53\x79\x6e\x63\x20\x46\x61\x69\x6c\x65\x64\x3a\x25\x73\x2c\x20\x66\x69\x6c\x65\x20\x70\x61\x74\x68\x3a\x25\x73"
-,strerror(errno),to);goto out_error;}if(close(fd_to)<(0x92f+4689-0x1b80)){fd_to=
--(0x165+405-0x2f9);ret=-(0xcad+2821-0x17ac);goto out_error;}close(fd_from);
-return(0x165c+3755-0x2507);out_error:printf(
+,strerror(errno),to);goto out_error;}if(close(fd_to)<(0xd07+2168-0x157f)){fd_to=
+-(0xb90+3308-0x187b);ret=-(0x7f+5964-0x17c5);goto out_error;}close(fd_from);
+return(0xf04+228-0xfe8);out_error:printf(
 "\x63\x6f\x70\x79\x66\x69\x6c\x65\x20\x25\x73\x20\x74\x6f\x20\x25\x73\x20\x65\x72\x72\x6f\x72\x3a\x25\x64" "\n"
-,from,to,ret);close(fd_from);if(fd_to>=(0x485+209-0x556))close(fd_to);return ret
-;}static int restoreNvFs(char*dstFile,char*srcFile){if(copyfile(srcFile,dstFile)
-!=(0xc56+3583-0x1a55))return RESULT_FAIL;return RESULT_SUCCESS;}static int 
-loadNvFs(char*file){int len=(0x1da+2584-0xbf2);int cnt=(0x2e4+6559-0x1c83);FILE*
-fp=NULL;char*buf=NULL;char*name=NULL;char*value=NULL;char*eq=NULL;struct stat 
-statbuff={(0xd39+5310-0x21f7)};char nvFile[NV_PATH_LEN]={(0x1113+410-0x12ad)};
-sprintf(nvFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file);if(stat(nvFile,&
-statbuff)<(0xf89+4763-0x2224))return RESULT_FAIL;len=statbuff.st_size;if(
-NV_CHECK_SIZE>len)return RESULT_FAIL;fp=fopen(nvFile,"\x72\x6f");if(!fp)return 
-RESULT_FILE_OPEN_FAIL;len=len-NV_CHECK_SIZE;buf=(char*)malloc(len+
-(0x1e1d+1264-0x230c));if(!buf){fclose(fp);return RESULT_MALLOC_FAIL;}memset(buf,
-(0x85d+2864-0x138d),len+(0x239c+101-0x2400));cnt=(0x1e63+1874-0x25b5);while(cnt<
-len){cnt=cnt+fread(buf+cnt,(0x11e5+3948-0x2150),len-cnt,fp);if(ferror(fp)){
+,from,to,ret);close(fd_from);if(fd_to>=(0x1229+3095-0x1e40))close(fd_to);return 
+ret;}static int restoreNvFs(char*dstFile,char*srcFile){if(copyfile(srcFile,
+dstFile)!=(0xe85+5500-0x2401))return RESULT_FAIL;return RESULT_SUCCESS;}static 
+int loadNvFs(char*file){int len=(0x39a+5632-0x199a);int cnt=(0xfcb+3355-0x1ce6);
+FILE*fp=NULL;char*buf=NULL;char*name=NULL;char*value=NULL;char*eq=NULL;struct 
+stat statbuff={(0x439+8009-0x2382)};char nvFile[NV_PATH_LEN]={
+(0x15e9+1690-0x1c83)};sprintf(nvFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file
+);if(stat(nvFile,&statbuff)<(0xb3f+2843-0x165a))return RESULT_FAIL;len=statbuff.
+st_size;if(NV_CHECK_SIZE>len)return RESULT_FAIL;fp=fopen(nvFile,"\x72\x6f");if(!
+fp)return RESULT_FILE_OPEN_FAIL;len=len-NV_CHECK_SIZE;buf=(char*)malloc(len+
+(0x126d+230-0x1352));if(!buf){fclose(fp);return RESULT_MALLOC_FAIL;}memset(buf,
+(0x10a+6361-0x19e3),len+(0x17a1+3278-0x246e));cnt=(0x8f+4690-0x12e1);while(cnt<
+len){cnt=cnt+fread(buf+cnt,(0xa7d+3693-0x18e9),len-cnt,fp);if(ferror(fp)){
 clearerr(fp);fclose(fp);free(buf);return RESULT_FILE_READ_FAIL;}}if(cnt!=len){
 fclose(fp);free(buf);return RESULT_FILE_READ_FAIL;}buf[len]='\0';name=buf;while(
-*name){if(!(eq=strchr(name,((char)(0x1425+3660-0x2234))))){break;}*eq='\0';value
-=eq+(0xa69+249-0xb61);nvset(file,name,value,(0xfa8+5632-0x25a7));*eq=
-((char)(0x1997+3144-0x25a2));name=value+strlen(value)+(0x1404+219-0x14de);}free(
+*name){if(!(eq=strchr(name,((char)(0x1a41+2496-0x23c4))))){break;}*eq='\0';value
+=eq+(0xf+4560-0x11de);nvset(file,name,value,(0xf40+4852-0x2233));*eq=
+((char)(0xe2+8910-0x2373));name=value+strlen(value)+(0x1de0+2069-0x25f4);}free(
 buf);fclose(fp);return RESULT_SUCCESS;}static void analyMsg(T_NV_MSG_INFO*
 msgrecv,T_NV_MSG_RESULT*msgsnd){switch(msgrecv->nvType){case MSG_GET:msgsnd->
 result=nvget(msgrecv->file,msgrecv->key,msgsnd->value);break;case MSG_SET:msgsnd
@@ -189,14 +187,14 @@
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x70\x61\x72\x61\x6d\x20\x69\x6c\x6c\x65\x67\x61\x6c\x21" "\n"
 );return RESULT_INVAL;}if(configFile){newConfig=(T_NV_CONFIG*)malloc(sizeof(
 T_NV_CONFIG));if(!newConfig)return RESULT_MALLOC_FAIL;strncpy(newConfig->
-configFile,configFile,NV_PATH_LEN-(0x792+737-0xa72));newConfig->configFile[
-NV_PATH_LEN-(0x336+4895-0x1654)]='\0';newConfig->next=NULL;}for(list=nv_list;
-list;list=list->next){if(strcmp(list->nvFile,nvFile)==(0x12cf+4172-0x231b))break
-;}if(!list){newList=(T_NV_NODE*)malloc(sizeof(T_NV_NODE));if(!newList){if(
+configFile,configFile,NV_PATH_LEN-(0x1e39+1636-0x249c));newConfig->configFile[
+NV_PATH_LEN-(0x5c8+7085-0x2174)]='\0';newConfig->next=NULL;}for(list=nv_list;
+list;list=list->next){if(strcmp(list->nvFile,nvFile)==(0x6e9+6638-0x20d7))break;
+}if(!list){newList=(T_NV_NODE*)malloc(sizeof(T_NV_NODE));if(!newList){if(
 newConfig)free(newConfig);return RESULT_MALLOC_FAIL;}newList->next=NULL;strncpy(
-newList->nvFile,nvFile,NV_PATH_LEN-(0x1e37+1194-0x22e0));newList->nvFile[
-NV_PATH_LEN-(0x5ef+1460-0xba2)]='\0';memset(newList->nvTable,(0x35+4658-0x1267),
-NV_HASH_LEN*(0xdb6+6023-0x2539));newList->fileList=newConfig;if(!nv_list)nv_list
+newList->nvFile,nvFile,NV_PATH_LEN-(0x3d5+3633-0x1205));newList->nvFile[
+NV_PATH_LEN-(0xe8+1092-0x52b)]='\0';memset(newList->nvTable,(0x1f8+616-0x460),
+NV_HASH_LEN*(0xba4+3437-0x190d));newList->fileList=newConfig;if(!nv_list)nv_list
 =newList;else{newList->next=nv_list->next;nv_list->next=newList;}}else if(!list
 ->fileList)list->fileList=newConfig;else{if(newConfig==NULL)return RESULT_FAIL;
 newConfig->next=list->fileList->next;list->fileList->next=newConfig;}return 
@@ -206,87 +204,86 @@
 return true;}}return false;}static bool isNvConfiged(char*nvFile){T_NV_NODE*list
 =NULL;for(list=nv_list;list;list=list->next){if(!strcmp(list->nvFile,nvFile))
 return true;}return false;}static uint getSum(const char*s,int len){uint sum=
-(0xfc+7232-0x1d3c);char*data=(char*)s;while(len-- >(0x1f3c+1003-0x2327)){sum+=(*
+(0x165+6562-0x1b07);char*data=(char*)s;while(len-- >(0x13a+7369-0x1e03)){sum+=(*
 data++);}return sum;}static int saveNvFs(char*nvName,char*nvFile){int i=
-(0x6f5+5849-0x1dce);int sum=(0x6e3+6413-0x1ff0);int bufSize=(0x6ad+5914-0x1dc7);
-int itemSize=(0x1402+763-0x16fd);int ret=(0x9b6+5119-0x1db5);int fp=
-(0x6d+300-0x199);char*buf=NULL;T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;for(list=
-nv_list;list;list=list->next){if(strcmp(list->nvFile,nvName))continue;fp=open(
-nvFile,O_SYNC|O_RDWR|O_CREAT|O_TRUNC,(0x1ea2+261-0x1e07));if(fp==-
-(0x1b18+1300-0x202b)){printf(
+(0x50f+5021-0x18ac);int sum=(0x225+3552-0x1005);int bufSize=(0xd6c+6179-0x258f);
+int itemSize=(0x715+5925-0x1e3a);int ret=(0xf6+8335-0x2185);int fp=
+(0x529+1968-0xcd9);char*buf=NULL;T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;for(
+list=nv_list;list;list=list->next){if(strcmp(list->nvFile,nvName))continue;fp=
+open(nvFile,O_SYNC|O_RDWR|O_CREAT|O_TRUNC,(0xf5d+1815-0x14d4));if(fp==-
+(0x99b+3934-0x18f8)){printf(
 "\x6f\x70\x65\x6e\x20\x25\x73\x20\x66\x61\x69\x6c\x2c\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
 ,nvFile,errno);return RESULT_FILE_OPEN_FAIL;}buf=(char*)malloc(NV_BLOCK_SIZE);if
-(!buf){close(fp);return RESULT_MALLOC_FAIL;}for(i=(0x441+8786-0x2693);i<
+(!buf){close(fp);return RESULT_MALLOC_FAIL;}for(i=(0x22a+7316-0x1ebe);i<
 NV_HASH_LEN;i++){for(item=list->nvTable[i];item;item=item->next){if(strcmp(
 nvFile,NV_FS_SHOW)&&!item->saveFlag)continue;itemSize=strlen(item->key)+strlen(
-item->value)+(0x112b+4812-0x23f5);if(bufSize+itemSize>NV_BLOCK_SIZE){if(write(fp
-,buf,bufSize)<(0x515+5807-0x1bc4)){printf(
+item->value)+(0x42c+5383-0x1931);if(bufSize+itemSize>NV_BLOCK_SIZE){if(write(fp,
+buf,bufSize)<(0x455+2058-0xc5f)){printf(
 "\x65\x72\x72\x6f\x72\x20\x25\x73\x20\x25\x64\x3a\x20\x77\x72\x69\x74\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
 ,__FILE__,__LINE__,errno);close(fp);free(buf);return RESULT_FILE_WRITE_FAIL;}sum
-+=getSum(buf,bufSize);bufSize=(0x7b1+4312-0x1889);}sprintf(buf+bufSize,
++=getSum(buf,bufSize);bufSize=(0x15cd+3700-0x2441);}sprintf(buf+bufSize,
 "\x25\x73\x3d\x25\x73",item->key,item->value);bufSize+=itemSize;}}if(bufSize!=
-(0x750+7750-0x2596)){if(write(fp,buf,bufSize)<(0xc24+3179-0x188f)){printf(
+(0x17c3+3734-0x2659)){if(write(fp,buf,bufSize)<(0x5a9+1704-0xc51)){printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x77\x72\x69\x74\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
 ,errno);close(fp);free(buf);return RESULT_FILE_WRITE_FAIL;}sum+=getSum(buf,
-bufSize);}sum+=NV_FILE_FLAG;if(write(fp,&sum,NV_CHECK_SIZE)<(0xe2d+5002-0x21b7))
+bufSize);}sum+=NV_FILE_FLAG;if(write(fp,&sum,NV_CHECK_SIZE)<(0x1c3c+259-0x1d3f))
 {printf(
 "\x6e\x76\x73\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6f\x72\x3a\x20\x77\x72\x69\x74\x65\x20\x66\x61\x69\x6c\x20\x65\x72\x72\x6e\x6f\x20\x3d\x20\x25\x64" "\n"
 ,errno);close(fp);free(buf);return RESULT_FILE_WRITE_FAIL;}ret=fsync(fp);free(
-buf);close(fp);if(ret<(0x13b9+637-0x1636)){printf(
+buf);close(fp);if(ret<(0x368+3154-0xfba)){printf(
 "\x53\x79\x6e\x63\x20\x46\x61\x69\x6c\x65\x64\x3a\x25\x73\x2c\x20\x66\x69\x6c\x65\x20\x70\x61\x74\x68\x3a\x25\x73"
 ,strerror(errno),nvFile);return ret;}return RESULT_SUCCESS;}return 
 RESULT_NO_FILE;}static int nvget(char*file,char*key,char*value){int index=
-(0x8a4+3409-0x15f5);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;
+(0x1774+191-0x1833);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;
 list;list=list->next){if(strcmp(list->nvFile,file))continue;index=hash(key)%
 NV_HASH_LEN;for(item=list->nvTable[index];item;item=item->next){if(strcmp(item->
-key,key))continue;strncpy(value,item->value,NV_MAX_VAL_LEN-(0x40a+3474-0x119b));
-value[NV_MAX_VAL_LEN-(0x112f+976-0x14fe)]='\0';return RESULT_SUCCESS;}}return 
+key,key))continue;strncpy(value,item->value,NV_MAX_VAL_LEN-(0x2034+731-0x230e));
+value[NV_MAX_VAL_LEN-(0x60b+4377-0x1723)]='\0';return RESULT_SUCCESS;}}return 
 RESULT_NO_ITEM;}static int nvset(char*file,const char*key,const char*value,int 
-saveFlag){int index=(0x93c+3629-0x1769);int ret=(0x846+3321-0x153f);int 
-key_buf_len=(0x12fc+2401-0x1c5d);int value_buf_len=(0x15e8+2955-0x2173);
-T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;T_NV_ITEM*newItem=NULL;if(NULL==key||
-NULL==value)return RESULT_FAIL;key_buf_len=strlen(key)+(0x18e8+421-0x1a8c);
-value_buf_len=strlen(value)+(0x1064+1325-0x1590);for(list=nv_list;list;list=list
-->next){if(strcmp(list->nvFile,file))continue;index=hash(key)%NV_HASH_LEN;for(
-item=list->nvTable[index];item;item=item->next){if(strcmp(item->key,key))
-continue;if(saveFlag)item->saveFlag=saveFlag;if(!strcmp(item->value,value))
-return RESULT_SUCCESS;free(item->value);item->value=(char*)malloc(value_buf_len)
-;if(!item->value)return RESULT_MALLOC_FAIL;strncpy(item->value,value,
-value_buf_len-(0x1152+2977-0x1cf2));item->value[value_buf_len-
-(0x244+5698-0x1885)]='\0';return RESULT_SUCCESS;}newItem=(T_NV_ITEM*)malloc(
-sizeof(T_NV_ITEM));if(!newItem)return RESULT_MALLOC_FAIL;newItem->key=(char*)
-malloc(key_buf_len);if(!newItem->key){free(newItem);return RESULT_MALLOC_FAIL;}
-newItem->value=(char*)malloc(value_buf_len);if(!newItem->value){free(newItem->
-key);free(newItem);return RESULT_MALLOC_FAIL;}strncpy(newItem->key,key,
-key_buf_len-(0xb27+5653-0x213b));newItem->key[key_buf_len-(0x8fa+6926-0x2407)]=
-'\0';strncpy(newItem->value,value,value_buf_len-(0x9e9+4249-0x1a81));newItem->
-value[value_buf_len-(0xecb+4669-0x2107)]='\0';newItem->next=NULL;newItem->
-saveFlag=saveFlag;newItem->update_flag=(0x13f+8511-0x227e);if(!list->nvTable[
-index])list->nvTable[index]=newItem;else{newItem->next=list->nvTable[index]->
-next;list->nvTable[index]->next=newItem;}return RESULT_SUCCESS;}ret=
-addConfigFile(file,NULL);if(ret==RESULT_SUCCESS)return nvset(file,key,value,
-saveFlag);else return ret;}static int nvunset(char*file,char*key){int index=
-(0x32+6702-0x1a60);T_NV_NODE*list=NULL;T_NV_ITEM*item=NULL;T_NV_ITEM*prev=NULL;
-for(list=nv_list;list;list=list->next){if(strcmp(list->nvFile,file))continue;
-index=hash(key)%NV_HASH_LEN;for(item=list->nvTable[index];item;prev=item,item=
-item->next){if(strcmp(item->key,key))continue;if(!prev)list->nvTable[index]=item
-->next;else prev->next=item->next;free(item->key);free(item->value);free(item);
-return RESULT_SUCCESS;}}return RESULT_NO_ITEM;}static int nvreset(char*file){int
- ret=(0xbf2+4389-0x1d17);T_NV_NODE*list=NULL;for(list=nv_list;list;list=list->
-next){if(strcmp(list->nvFile,file))continue;ret=nvclear(file);if(ret!=
-RESULT_SUCCESS)return ret;if(loadFactroyParam(list)!=RESULT_SUCCESS)return 
-RESULT_FAIL;return nvcommit(file);}return RESULT_NO_FILE;}static int nvclear(
-char*file){int i=(0x20a3+533-0x22b8);T_NV_NODE*list=NULL;T_NV_ITEM*cur=NULL;
-T_NV_ITEM*item=NULL;for(list=nv_list;list;list=list->next){if(strcmp(list->
-nvFile,file))continue;for(i=(0x110a+3085-0x1d17);i<NV_HASH_LEN;i++){for(item=
-list->nvTable[i];item;){cur=item;item=item->next;free(cur->key);free(cur->value)
-;free(cur);}list->nvTable[i]=NULL;}return RESULT_SUCCESS;}return RESULT_NO_FILE;
-}static int nvcommit(char*file){int ret=(0xc94+3452-0x1a10);char nvMainFile[
-NV_PATH_LEN]={(0x2a6+6844-0x1d62)};char nvBackupFile[NV_PATH_LEN]={
-(0x5a1+3217-0x1232)};sprintf(nvMainFile,"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,
-file);sprintf(nvBackupFile,"\x25\x73\x2f\x25\x73",NV_FS_BACKUP_PATH,file);ret=
-saveNvFs(file,nvMainFile);if(ret!=RESULT_SUCCESS)return ret;return restoreNvFs(
-nvBackupFile,nvMainFile);}
+saveFlag){int index=(0x2ec+952-0x6a4);int ret=(0x34c+3613-0x1169);int 
+key_buf_len=(0x6+576-0x246);int value_buf_len=(0xbfb+5526-0x2191);T_NV_NODE*list
+=NULL;T_NV_ITEM*item=NULL;T_NV_ITEM*newItem=NULL;if(NULL==key||NULL==value)
+return RESULT_FAIL;key_buf_len=strlen(key)+(0xdec+2218-0x1695);value_buf_len=
+strlen(value)+(0x1cbb+947-0x206d);for(list=nv_list;list;list=list->next){if(
+strcmp(list->nvFile,file))continue;index=hash(key)%NV_HASH_LEN;for(item=list->
+nvTable[index];item;item=item->next){if(strcmp(item->key,key))continue;if(
+saveFlag)item->saveFlag=saveFlag;if(!strcmp(item->value,value))return 
+RESULT_SUCCESS;free(item->value);item->value=(char*)malloc(value_buf_len);if(!
+item->value)return RESULT_MALLOC_FAIL;strncpy(item->value,value,value_buf_len-
+(0xcca+2556-0x16c5));item->value[value_buf_len-(0x16e3+3168-0x2342)]='\0';return
+ RESULT_SUCCESS;}newItem=(T_NV_ITEM*)malloc(sizeof(T_NV_ITEM));if(!newItem)
+return RESULT_MALLOC_FAIL;newItem->key=(char*)malloc(key_buf_len);if(!newItem->
+key){free(newItem);return RESULT_MALLOC_FAIL;}newItem->value=(char*)malloc(
+value_buf_len);if(!newItem->value){free(newItem->key);free(newItem);return 
+RESULT_MALLOC_FAIL;}strncpy(newItem->key,key,key_buf_len-(0x677+2186-0xf00));
+newItem->key[key_buf_len-(0xc67+6276-0x24ea)]='\0';strncpy(newItem->value,value,
+value_buf_len-(0x19af+2829-0x24bb));newItem->value[value_buf_len-
+(0x59+2690-0xada)]='\0';newItem->next=NULL;newItem->saveFlag=saveFlag;newItem->
+update_flag=(0x216+3937-0x1177);if(!list->nvTable[index])list->nvTable[index]=
+newItem;else{newItem->next=list->nvTable[index]->next;list->nvTable[index]->next
+=newItem;}return RESULT_SUCCESS;}ret=addConfigFile(file,NULL);if(ret==
+RESULT_SUCCESS)return nvset(file,key,value,saveFlag);else return ret;}static int
+ nvunset(char*file,char*key){int index=(0x209c+1544-0x26a4);T_NV_NODE*list=NULL;
+T_NV_ITEM*item=NULL;T_NV_ITEM*prev=NULL;for(list=nv_list;list;list=list->next){
+if(strcmp(list->nvFile,file))continue;index=hash(key)%NV_HASH_LEN;for(item=list
+->nvTable[index];item;prev=item,item=item->next){if(strcmp(item->key,key))
+continue;if(!prev)list->nvTable[index]=item->next;else prev->next=item->next;
+free(item->key);free(item->value);free(item);return RESULT_SUCCESS;}}return 
+RESULT_NO_ITEM;}static int nvreset(char*file){int ret=(0x5a2+6070-0x1d58);
+T_NV_NODE*list=NULL;for(list=nv_list;list;list=list->next){if(strcmp(list->
+nvFile,file))continue;ret=nvclear(file);if(ret!=RESULT_SUCCESS)return ret;if(
+loadFactroyParam(list)!=RESULT_SUCCESS)return RESULT_FAIL;return nvcommit(file);
+}return RESULT_NO_FILE;}static int nvclear(char*file){int i=(0x2c2+3286-0xf98);
+T_NV_NODE*list=NULL;T_NV_ITEM*cur=NULL;T_NV_ITEM*item=NULL;for(list=nv_list;list
+;list=list->next){if(strcmp(list->nvFile,file))continue;for(i=(0x11+8410-0x20eb)
+;i<NV_HASH_LEN;i++){for(item=list->nvTable[i];item;){cur=item;item=item->next;
+free(cur->key);free(cur->value);free(cur);}list->nvTable[i]=NULL;}return 
+RESULT_SUCCESS;}return RESULT_NO_FILE;}static int nvcommit(char*file){int ret=
+(0x514+7252-0x2168);char nvMainFile[NV_PATH_LEN]={(0x20f9+1461-0x26ae)};char 
+nvBackupFile[NV_PATH_LEN]={(0x1cca+1765-0x23af)};sprintf(nvMainFile,
+"\x25\x73\x2f\x25\x73",NV_FS_MAIN_PATH,file);sprintf(nvBackupFile,
+"\x25\x73\x2f\x25\x73",NV_FS_BACKUP_PATH,file);ret=saveNvFs(file,nvMainFile);if(
+ret!=RESULT_SUCCESS)return ret;return restoreNvFs(nvBackupFile,nvMainFile);}
 #ifdef __cplusplus
 }
 #endif