@@ -434,13 +434,14 @@ static int char_dev_fopen(struct dfs_file *fd)
434434
435435 return RT_EOK ;
436436}
437+
437438#ifdef RT_USING_DFS_V2
438- static ssize_t char_dev_fread (struct dfs_file * fd , void * buf , size_t count , off_t * pos )
439+ static rt_ssize_t char_dev_fread (struct dfs_file * fd , void * buf , size_t count , off_t * pos )
439440#else
440- static ssize_t char_dev_fread (struct dfs_file * fd , void * buf , size_t count )
441+ static rt_ssize_t char_dev_fread (struct dfs_file * fd , void * buf , size_t count )
441442#endif
442443{
443- ssize_t ret = 0 ;
444+ rt_ssize_t ret = 0 ;
444445 struct fal_char_device * part = (struct fal_char_device * ) fd -> vnode -> data ;
445446#ifndef RT_USING_DFS_V2
446447 off_t * pos = & (fd -> pos );
@@ -453,20 +454,21 @@ static ssize_t char_dev_fread(struct dfs_file *fd, void *buf, size_t count)
453454
454455 ret = fal_partition_read (part -> fal_part , * pos , buf , count );
455456
456- if (ret != (ssize_t )(count ))
457+ if (ret != (rt_ssize_t )(count ))
457458 return 0 ;
458459
459460 * pos += ret ;
460461
461462 return ret ;
462463}
464+
463465#ifdef RT_USING_DFS_V2
464- static ssize_t char_dev_fwrite (struct dfs_file * fd , const void * buf , size_t count , off_t * pos )
466+ static rt_ssize_t char_dev_fwrite (struct dfs_file * fd , const void * buf , size_t count , off_t * pos )
465467#else
466- static ssize_t char_dev_fwrite (struct dfs_file * fd , const void * buf , size_t count )
468+ static rt_ssize_t char_dev_fwrite (struct dfs_file * fd , const void * buf , size_t count )
467469#endif
468470{
469- ssize_t ret = 0 ;
471+ rt_ssize_t ret = 0 ;
470472 struct fal_char_device * part = (struct fal_char_device * ) fd -> vnode -> data ;
471473#ifndef RT_USING_DFS_V2
472474 off_t * pos = & (fd -> pos );
@@ -479,7 +481,7 @@ static ssize_t char_dev_fwrite(struct dfs_file *fd, const void *buf, size_t coun
479481
480482 ret = fal_partition_write (part -> fal_part , * pos , buf , count );
481483
482- if (ret != (ssize_t ) count )
484+ if (ret != (rt_ssize_t ) count )
483485 return 0 ;
484486
485487 * pos += ret ;
0 commit comments