2019-12-30 16:31:03 +01:00
|
|
|
#ifndef __FILE_H__
|
|
|
|
# define __FILE_H__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stddef.h>
|
2020-03-30 00:40:59 +02:00
|
|
|
#include <asm/types.h>
|
2020-01-05 09:00:43 +01:00
|
|
|
#include <kernel/fs/filesystem.h>
|
2019-12-30 16:31:03 +01:00
|
|
|
|
|
|
|
#ifndef FILE_OPEN_NUMBER
|
|
|
|
# define FILE_OPEN_NUMBER 4
|
|
|
|
#endif
|
|
|
|
|
2020-03-30 00:40:59 +02:00
|
|
|
// FILE type
|
2019-12-30 16:31:03 +01:00
|
|
|
struct file_s
|
|
|
|
{
|
2020-01-05 09:00:43 +01:00
|
|
|
void *private;
|
2019-12-30 16:31:03 +01:00
|
|
|
off_t cursor;
|
2020-01-05 09:00:43 +01:00
|
|
|
int permission;
|
|
|
|
struct file_operations *file_op;
|
2019-12-30 16:31:03 +01:00
|
|
|
};
|
|
|
|
typedef struct file_s FILE;
|
|
|
|
|
|
|
|
#endif /*__FILE_H__*/
|