mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-20 13:55:26 +08:00
实现_sys_flen()函数
This commit is contained in:
@@ -265,7 +265,17 @@ void _sys_exit(int return_code)
|
|||||||
*/
|
*/
|
||||||
long _sys_flen(FILEHANDLE fh)
|
long _sys_flen(FILEHANDLE fh)
|
||||||
{
|
{
|
||||||
|
struct stat stat;
|
||||||
|
|
||||||
|
if (fh < STDERR)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
#ifndef RT_USING_DFS
|
||||||
return -1;
|
return -1;
|
||||||
|
#else
|
||||||
|
fstat(fh, &stat);
|
||||||
|
return stat.st_size;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int _sys_istty(FILEHANDLE fh)
|
int _sys_istty(FILEHANDLE fh)
|
||||||
|
Reference in New Issue
Block a user