Changeset 260 for soft/giet_vm/giet_libs


Ignore:
Timestamp:
Dec 9, 2013, 5:26:37 PM (11 years ago)
Author:
devigne
Message:

Add a new syscall : giet_fat_fstat, allowing to a user application to know the
size (in sectors) of an open file.

Location:
soft/giet_vm/giet_libs
Files:
2 edited

Legend:

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

    r258 r260  
    744744                     0 );
    745745}
     746
     747///////////////////////////////////////////////////////////////////////////////////
     748// giet_fat_fstat()
     749///////////////////////////////////////////////////////////////////////////////////
     750// Return stats of a file identified by "fd".
     751// (Only the file_size in sectors for this moment)
     752///////////////////////////////////////////////////////////////////////////////////
     753int giet_fat_fstat( unsigned int fd )
     754{
     755    return sys_call( SYSCALL_FAT_FSTAT,
     756                     fd,
     757                     0, 0, 0 );
     758}
     759
    746760///////////////////////////////////////////////////////////////////////////////////
    747761// giet_fat_close()
  • soft/giet_vm/giet_libs/stdio.h

    r259 r260  
    5050#define SYSCALL_FAT_WRITE         0x22
    5151#define SYSCALL_FAT_LSEEK         0x23
    52 #define SYSCALL_FAT_CLOSE         0x24
     52#define SYSCALL_FAT_FSTAT         0x24
     53#define SYSCALL_FAT_CLOSE         0x25
    5354
    5455//////////////////////////////////////////////////////////////////////////////////
     
    182183                           unsigned int whence );
    183184
     185extern int giet_fat_fstat( unsigned int fd );
     186
    184187extern int giet_fat_close( unsigned int fd );
    185188
Note: See TracChangeset for help on using the changeset viewer.