- add some open-flag defines
- some design changes
This commit is contained in:
parent
33be04bfcd
commit
34641f4338
3 changed files with 25 additions and 11 deletions
|
@ -37,6 +37,31 @@
|
|||
//#define FS_SYMLINK 0x06
|
||||
//#define FS_MOUNTPOINT 0x08 // Is the file an active mountpoint?
|
||||
|
||||
/*open flags*/
|
||||
#define O_RDONLY 0
|
||||
#define O_WRONLY 1
|
||||
#define O_RDWR 2
|
||||
|
||||
#define O_CREAT 64
|
||||
#define O_EXCL 128
|
||||
#define O_NOCTTY 256
|
||||
#define O_TRUNC 512
|
||||
#define O_APPEND 1024
|
||||
#define O_NDELAY 2048
|
||||
#define O_SYNC 4096
|
||||
#define O_ASYNC 8192
|
||||
|
||||
/*lseek defines*/
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0 /* set file offset to offset */
|
||||
#endif
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1 /* set file offset to current plus offset */
|
||||
#endif
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END 2 /* set file offset to EOF plus offset */
|
||||
#endif
|
||||
|
||||
struct vfs_node;
|
||||
|
||||
/** @defgroup fsprototypes FS access function prototypes
|
||||
|
|
|
@ -23,16 +23,6 @@
|
|||
* @brief Stringstream related functions. Mainly printf-stuff.
|
||||
*/
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0 /* set file offset to offset */
|
||||
#endif
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1 /* set file offset to current plus offset */
|
||||
#endif
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END 2 /* set file offset to EOF plus offset */
|
||||
#endif
|
||||
|
||||
#ifndef __STDIO_H__
|
||||
#define __STDIO_H__
|
||||
|
||||
|
|
|
@ -78,7 +78,6 @@ static int sys_lseek(int fd, off_t pos, int origin)
|
|||
|
||||
if (BUILTIN_EXPECT(per_core(current_task)->fildes_table[fd].node->type != FS_FILE, 0))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
switch(origin)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue