#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <sys/kassert.h>
#include <sys/kdebug.h>
#include <sys/spinlock.h>
#include <sys/disk.h>
#include <sys/vfs.h>
#include <sys/handle.h>
#include <sys/vfsuio.h>
Go to the source code of this file.
◆ VFSUIO_Close()
static int VFSUIO_Close |
( |
Handle * |
handle | ) |
|
|
static |
Definition at line 43 of file vfsuio.c.
44{
45 int status;
46
48
50 Handle_Free(handle);
51
52 return status;
53}
◆ VFSUIO_Flush()
static int VFSUIO_Flush |
( |
Handle * |
handle | ) |
|
|
static |
◆ VFSUIO_Open()
int VFSUIO_Open |
( |
const char * |
path, |
|
|
Handle ** |
handle |
|
) |
| |
Definition at line 56 of file vfsuio.c.
57{
58 int status;
59
60 Handle *hdl = Handle_Alloc();
61 if (!hdl) {
63 }
64
66 if (!vn) {
67 Handle_Free(hdl);
69 }
70
72 if (status != 0) {
73
74 Handle_Free(hdl);
75 return status;
76 }
77
84
85 *handle = hdl;
86
87 return 0;
88}
int(* write)(Handle *, void *, uint64_t, uint64_t)
int(* read)(Handle *, void *, uint64_t, uint64_t)
VNode * VFS_Lookup(const char *path)
static int VFSUIO_Write(Handle *handle, void *buf, uint64_t len, uint64_t off)
static int VFSUIO_Read(Handle *handle, void *buf, uint64_t len, uint64_t off)
static int VFSUIO_Flush(Handle *handle)
static int VFSUIO_Close(Handle *handle)
◆ VFSUIO_Read()
Definition at line 16 of file vfsuio.c.
17{
19
20
21
23}
int VFS_Read(VNode *fn, void *buf, uint64_t off, uint64_t len)
◆ VFSUIO_Write()
Definition at line 26 of file vfsuio.c.
27{
29
30
31
33}
int VFS_Write(VNode *fn, void *buf, uint64_t off, uint64_t len)