用文件函数获取文件的大小代码片段

来源:互联网 发布:linux 进程启动时间 编辑:程序博客网 时间:2024/06/05 15:14


/*is filesize right?*/
fseek(fp, 0, SEEK_END);
filesize = ftell(fp);
if((filesize != EDID_MIN_LEN) && (filesize != EDID_MAX_LEN)){
        RPT(RPT_ERR, "edid file size=<%d>, error!!, the correct file size is 128-byte or 256-byte", 
filesize);
return -1;
}
fseek(fp, 0, SEEK_SET);

1 0
原创粉丝点击