2026-03-06 20:17:23 +00:00
|
|
|
#ifndef _FS_FILE_H_
|
|
|
|
|
#define _FS_FILE_H_
|
|
|
|
|
|
|
|
|
|
#include "btree.h"
|
|
|
|
|
|
2026-03-10 19:15:26 +00:00
|
|
|
#include <fs/dentry.h>
|
2026-03-06 20:17:23 +00:00
|
|
|
#include <fs/file.h>
|
2026-03-10 19:15:26 +00:00
|
|
|
#include <fs/inode.h>
|
2026-03-06 20:17:23 +00:00
|
|
|
|
|
|
|
|
struct fs_file {
|
|
|
|
|
/* id of the open file, equal to the koid of the port being used to
|
|
|
|
|
* access the file */
|
|
|
|
|
unsigned long f_id;
|
|
|
|
|
struct btree_node f_node;
|
|
|
|
|
|
|
|
|
|
const struct fs_file_ops *f_ops;
|
2026-03-10 19:15:26 +00:00
|
|
|
|
|
|
|
|
off_t f_seek;
|
|
|
|
|
struct fs_inode *f_inode;
|
|
|
|
|
struct fs_dentry *f_dent;
|
2026-03-06 20:17:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|