Changeset 772 for soft/giet_vm/giet_fat32
- Timestamp:
- Feb 3, 2016, 9:59:18 AM (9 years ago)
- Location:
- soft/giet_vm/giet_fat32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_fat32/fat32.c
r761 r772 2721 2721 // This function implements the giet_fat_open() system call. 2722 2722 // The semantic is similar to the UNIX open() function, with some limitations: 2723 // - only the O_CREAT E, O_RDONLY, and O_TRUNC flags are supported.2723 // - only the O_CREAT, O_RDONLY, and O_TRUNC flags are supported. 2724 2724 // - the UNIX access rights are not supported. 2725 2725 // If the file does not exist in the specified directory, it is created when 2726 // the O_CREAT Eflag is set.2726 // the O_CREAT flag is set. 2727 2727 // If the specified directory does not exist, an error is returned. 2728 2728 // It allocates a file descriptor to the calling task, for the file identified … … 2740 2740 /////////////////////////////////////////////////////////////////////////////// 2741 2741 int _fat_open( char* pathname, // absolute path from root 2742 unsigned int flags ) // O_CREAT Eand O_RDONLY2742 unsigned int flags ) // O_CREAT and O_RDONLY 2743 2743 { 2744 2744 unsigned int fd_id; // index in File-Descriptor-Array … … 2749 2749 2750 2750 // get flags 2751 unsigned int create = ((flags & O_CREAT E)!= 0);2751 unsigned int create = ((flags & O_CREAT) != 0); 2752 2752 unsigned int read_only = ((flags & O_RDONLY) != 0); 2753 2753 unsigned int truncate = ((flags & O_TRUNC) != 0); -
soft/giet_vm/giet_fat32/fat32.h
r761 r772 228 228 229 229 extern int _fat_open( char* pathname, // path from root 230 unsigned int flags ); // O_CREAT E/O_RDONLY230 unsigned int flags ); // O_CREAT/O_RDONLY 231 231 232 232 extern int _fat_close( unsigned int fd_id ); // file descriptor -
soft/giet_vm/giet_fat32/fat32_shared.h
r746 r772 38 38 #define O_RDONLY 0x01 39 39 #define O_TRUNC 0x10 40 #define O_CREAT E0x2040 #define O_CREAT 0x20 41 41 42 42 /********************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.