Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2261189
  • 博文数量: 218
  • 博客积分: 5767
  • 博客等级: 大校
  • 技术积分: 5883
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-01 14:44
文章存档

2012年(53)

2011年(131)

2009年(1)

2008年(33)

分类: LINUX

2012-05-11 11:00:21

int GenerateUpgradeAsp(webs_t wp)
{
 FILE *fp;
 unsigned long ulReadSize;
 int fdFW = -1,checklen=0;
 char pBuf[64]={0},pChecksum[128]={0};
 unsigned short int crcsum;
 fp=fopen("/tmp/webs/man_upgrade.asp","w+");
 if(!fp)
 {
  //formErrMsg(wp,"This man_upgrade.asp error!.");
  return EZL_TF_FAIL;
 }
 
 checklen = AscStrToHexStr(pChecksum,FirmFlag,16);
 pChecksum[checklen] = '\0';
 
 float totalSize = (float)FileSize(EZL_CPFW_NAME)/(1024*1024);
 
 fputs("\n",fp'>\">\n",fp);
 fputs("\n",fp);
 fputs("\n",fp);
 fputs( "\n",fp);
 fputs("\n",fp);
 fputs("\n",fp);
 fputs("\n",fp);
 fputs("sysmanage configuration\n",fp);
 fputs("\n",fp); 
 fputs("\n",fp);
 fputs("\n",fp);
 fputs("
\n",fp);
 fputs("
\n",fp);
 fputs("

\n",fp);
 fputs("  Flash Firmware - Verify\n",fp); 
 fputs(" 

\n",fp);
 fputs("
\n",fp);
 fputs("        The flash image was uploaded.\n",fp);
 fputs("        Below is the checksum and file size listed,\n",fp);
 fputs("        compare them with the original file to ensure data integrity.\n",fp);
 fputs("        Click \"Proceed\" below to start the flash procedure. \n",fp);
 fputs("
\n",fp);
 fputs("
\n",fp);
 fputs("\n",fp);
 fputs(" 
    \n",fp);
 fputs("  
    \n",fp);
     
     sprintf(pBuf,"
  • Checksum:%s
  •      \n",pChecksum);
     fputs(pBuf,fp); 
     sprintf(pBuf,"
  • Size: %.3lf MB
  •      \n",totalSize);
     fputs(pBuf,fp);
     
     if(keep_flag)
     {
      fputs("  
  • Note: Configuration files will be erased.
  • \n",fp);
     }
     else{
      fputs("  
  • Configuration files will be kept.
  • \n",fp);
     }
     
     fputs("  
    \n",fp);
 fputs(" 
\n",fp); 
 fputs("\n",fp);
 fputs("       
\n",fp);//cbi-value-field
 fputs("                          \n",fp);
 fputs("                          \n",fp);
 fputs("                          \n",fp);
 fputs("                          \n",fp);
 fputs("                          \n",fp); 
 fputs("                \n",fp);
 fputs("        \n",fp);
 fputs("        \n",fp);
 fputs("        \n",fp);
 fputs("       
\n",fp);
 fputs("
\n",fp);
 fputs("
\n",fp);
 fputs("
\n",fp);
 fputs("
\n",fp);
 fputs(" \n",fp);
 fputs("\n",fp);
 fclose(fp);
 return EZL_TF_OK;
}
阅读(2302) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~