9#ifndef __OSAL_FILEOPS_H__
10#define __OSAL_FILEOPS_H__
18#define OSAL_O_RDONLY 00000000
19#define OSAL_O_WRONLY 00000001
20#define OSAL_O_RDWR 00000002
21#define OSAL_O_ACCMODE 00000003
23#define OSAL_O_CREAT 00000100
24#define OSAL_O_EXCL 00000200
25#define OSAL_O_TRUNC 00001000
26#define OSAL_O_APPEND 00002000
27#define OSAL_O_CLOEXEC 02000000
29#define OSAL_SEEK_SET 0
30#define OSAL_SEEK_CUR 1
31#define OSAL_SEEK_END 2
int osal_klib_fwrite(const char *buf, unsigned long size, void *filp)
kernel write function.
Definition osal_fileops.c:52
void * osal_klib_fopen(const char *file, int flags, int mode)
open file and return file pointer.
Definition osal_fileops.c:20
int osal_klib_unlink(const char *path)
Removes a file or directory.
int osal_klib_fseek(long long offset, int whence, void *filp)
Kernel file seek function.
Definition osal_fileops.c:70
int osal_klib_ftruncate(void *filp, unsigned long len)
Truncates the size of the file to the specified size.
void osal_klib_fsync(void *filp)
Perform a fsync or fdatasync on a file
Definition osal_fileops.c:86
int osal_klib_fread(char *buf, unsigned long size, void *filp)
Kernel read function.
Definition osal_fileops.c:61
void osal_klib_fclose(void *filp)
close file.
Definition osal_fileops.c:42