模块升级菜单变灰逻辑

This commit is contained in:
xiehongyan 2024-01-17 08:45:15 +08:00
parent bee7d65a2a
commit b95b5f9bbd

View File

@ -54,6 +54,8 @@ static BOOL sf_is_4g_module_usb_update_file_exist(UINT8 *updateFname)
{
DIR *dirp = 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();
if ((dirp=opendir((char *)SF_SD_ROOT)) != NULL)
@ -66,7 +68,15 @@ static BOOL sf_is_4g_module_usb_update_file_exist(UINT8 *updateFname)
{
if(strncmp(ptr->d_name, puiPara->ModuleVer, 6) == 0)
{
sprintf((char*)updateFname, "%s%s", "/mnt/sd/", ptr->d_name);
if(font == 'A')
{
sprintf((char*)updateFname, "%s%s", "/mnt/sd/", ptr->d_name);
}
else
{
sprintf((char*)updateFname, "%s%s", "/mnt/sd2/", ptr->d_name);
}
closedir(dirp);
printf("[%s:%d] updateFname:%s\n", __FUNCTION__, __LINE__, updateFname);
return TRUE;