Exemple #1
0
int sec_ccci_file_open(char *file_path)
{
	int fp_id;

	fp_id = osal_filp_open_read_only(file_path);

	if (fp_id != OSAL_FILE_NULL)
		return fp_id;

	return -1;
}
Exemple #2
0
static struct file *open_img_file(char *name, int *sec_fp_id)
{
#ifdef ENABLE_MD_IMG_SECURITY_FEATURE
	int fp_id = OSAL_FILE_NULL;
	fp_id = osal_filp_open_read_only(name);  
	CCCI_UTIL_DBG_MSG("sec_open fd = (%d)!\n", fp_id); 

	if(sec_fp_id != NULL)
		*sec_fp_id = fp_id;

	CCCI_UTIL_DBG_MSG("sec_open file ptr = (0x%x)!\n", (unsigned int)osal_get_filp_struct(fp_id)); 

	return (struct file *)osal_get_filp_struct(fp_id);
#else
	CCCI_UTIL_DBG_MSG("std_open!\n");
	return filp_open(name, O_RDONLY, 0644);
#endif
}