Changeset 623 for soft/giet_vm/giet_libs


Ignore:
Timestamp:
Jul 17, 2015, 4:34:54 PM (9 years ago)
Author:
guerin
Message:

fat32: use struct for _fat_file_info(), pass is_dir

Location:
soft/giet_vm/giet_libs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/stdio.c

    r614 r623  
    907907
    908908/////////////////////////////////////////////
    909 int giet_fat_file_info( unsigned int  fd_id,
    910                         unsigned int* size,
    911                         unsigned int* offset )
     909int giet_fat_file_info( unsigned int            fd_id,
     910                        struct fat_file_info_s* info )
    912911{
    913912    return sys_call( SYSCALL_FAT_FINFO,
    914913                     fd_id,
    915                      (unsigned int)size,
    916                      (unsigned int)offset,
    917                      0 );
     914                     (unsigned int)info,
     915                     0, 0 );
    918916}
    919917
  • soft/giet_vm/giet_libs/stdio.h

    r614 r623  
    8888////////////////////////////////////////////////////////////////////////////
    8989
     90#ifndef _FAT32_SHARED
     91#define _FAT32_SHARED
     92typedef struct fat_file_info_s
     93{
     94    unsigned int size;
     95    unsigned int offset;
     96    unsigned int is_dir;
     97}   fat_file_info_t;
     98
    9099#define SEEK_SET            0          // argument for giet_fat_lseek()
    91100#define SEEK_CUR            1          // argument for giet_fat_lseek
     
    93102#define O_CREATE            0x20       // argument for giet_fat_open()
    94103#define O_RDONLY            0x01       // argument for giet_fat_open()
     104#endif // _FAT32_SHARED
    95105
    96106////////////////////////////////////////////////////////////////////////////
     
    284294extern int giet_fat_close( unsigned int fd_id );
    285295
    286 extern int giet_fat_file_info( unsigned int  fd_id,
    287                                unsigned int* size,
    288                                unsigned int* offset );
     296extern int giet_fat_file_info( unsigned int             fd_id,
     297                               struct fat_file_info_s*  info );
    289298
    290299extern int giet_fat_read( unsigned int fd_id,
Note: See TracChangeset for help on using the changeset viewer.