模块升级菜单变灰逻辑
This commit is contained in:
parent
bee7d65a2a
commit
b95b5f9bbd
|
@ -54,6 +54,8 @@ static BOOL sf_is_4g_module_usb_update_file_exist(UINT8 *updateFname)
|
||||||
{
|
{
|
||||||
DIR *dirp = NULL;
|
DIR *dirp = NULL;
|
||||||
struct dirent *ptr = NULL;
|
struct dirent *ptr = NULL;
|
||||||
|
UINT32 dcf_handle = (UINT32)System_Get_DCF_Handle(); /* 0:emmc 1:sd */
|
||||||
|
char font = System_Get_DCF_Disk_Drive(dcf_handle) == 'B' ? 'B' : 'A';
|
||||||
|
|
||||||
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
||||||
if ((dirp=opendir((char *)SF_SD_ROOT)) != NULL)
|
if ((dirp=opendir((char *)SF_SD_ROOT)) != NULL)
|
||||||
|
@ -65,8 +67,16 @@ static BOOL sf_is_4g_module_usb_update_file_exist(UINT8 *updateFname)
|
||||||
else if(ptr->d_type == 4) ///dir
|
else if(ptr->d_type == 4) ///dir
|
||||||
{
|
{
|
||||||
if(strncmp(ptr->d_name, puiPara->ModuleVer, 6) == 0)
|
if(strncmp(ptr->d_name, puiPara->ModuleVer, 6) == 0)
|
||||||
|
{
|
||||||
|
if(font == 'A')
|
||||||
{
|
{
|
||||||
sprintf((char*)updateFname, "%s%s", "/mnt/sd/", ptr->d_name);
|
sprintf((char*)updateFname, "%s%s", "/mnt/sd/", ptr->d_name);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf((char*)updateFname, "%s%s", "/mnt/sd2/", ptr->d_name);
|
||||||
|
}
|
||||||
closedir(dirp);
|
closedir(dirp);
|
||||||
printf("[%s:%d] updateFname:%s\n", __FUNCTION__, __LINE__, updateFname);
|
printf("[%s:%d] updateFname:%s\n", __FUNCTION__, __LINE__, updateFname);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user