agileRTOS (zrtos)  Version 0.8.0 (ghostbuster)
vfs_plugin.h File Reference
#include <stdarg.h>
#include <zrtos/types.h>
#include <zrtos/error.h>
Include dependency graph for vfs_plugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  zrtos_vfs_plugin_t
 

Macros

#define ZRTOS_VFS_PLUGIN_OPERATION__OPEN   open
 
#define ZRTOS_VFS_PLUGIN_OPERATION__CLOSE   close
 
#define ZRTOS_VFS_PLUGIN_OPERATION__MOUNT   mount
 
#define ZRTOS_VFS_PLUGIN_OPERATION__UMOUNT   umount
 
#define ZRTOS_VFS_PLUGIN_OPERATION__READ   read
 
#define ZRTOS_VFS_PLUGIN_OPERATION__WRITE   write
 
#define ZRTOS_VFS_PLUGIN_OPERATION__CAN_READ   can_read
 
#define ZRTOS_VFS_PLUGIN_OPERATION__CAN_WRITE   can_write
 
#define ZRTOS_VFS_PLUGIN_OPERATION__SEEK   seek
 
#define ZRTOS_VFS_PLUGIN_OPERATION__IOCTL   ioctl
 
#define ZRTOS_VFS_PLUGIN__ARG(type)   va_arg(args,type)
 
#define ZRTOS_VFS_PLUGIN__RETURN(val)
 
#define ZRTOS_VFS_PLUGIN__INIT(name, ...)
 
#define ZRTOS_VFS_PLUGIN(name)   (&zrtos_vfs_plugin_module_##name)
 
#define ZRTOS_VFS_PLUGIN__INVOKE(thiz, operation, ...)   (thiz->operation(__VA_ARGS__))
 
#define ZRTOS_VFS_PLUGIN__0_ON_OPEN(callback)   .open=callback
 
#define ZRTOS_VFS_PLUGIN__0_ON_OPEN_DEFAULT()   .open = zrtos_vfs_plugin__default_open
 
#define ZRTOS_VFS_PLUGIN__1_ON_CLOSE(callback)   ,.close=callback
 
#define ZRTOS_VFS_PLUGIN__1_ON_CLOSE_DEFAULT()   ,.close = zrtos_vfs_plugin__default_close
 
#define ZRTOS_VFS_PLUGIN__2_ON_MOUNT(callback)   ,.mount=callback
 
#define ZRTOS_VFS_PLUGIN__2_ON_MOUNT_DEFAULT()   ,.mount = zrtos_vfs_plugin__default_mount
 
#define ZRTOS_VFS_PLUGIN__3_ON_UMOUNT(callback)   ,.umount=callback
 
#define ZRTOS_VFS_PLUGIN__3_ON_UMOUNT_DEFAULT()   ,.umount = zrtos_vfs_plugin__default_umount
 
#define ZRTOS_VFS_PLUGIN__4_ON_READ(callback)   ,.read=callback
 
#define ZRTOS_VFS_PLUGIN__4_ON_READ_DEFAULT()   ,.read = zrtos_vfs_plugin__default_read
 
#define ZRTOS_VFS_PLUGIN__5_ON_WRITE(callback)   ,.write=callback
 
#define ZRTOS_VFS_PLUGIN__5_ON_WRITE_DEFAULT()   ,.write = zrtos_vfs_plugin__default_write
 
#define ZRTOS_VFS_PLUGIN__6_ON_CAN_READ(callback)   ,.can_read=callback
 
#define ZRTOS_VFS_PLUGIN__6_ON_CAN_READ_DEFAULT()   ,.can_read = zrtos_vfs_plugin__default_can_read
 
#define ZRTOS_VFS_PLUGIN__7_ON_CAN_WRITE(callback)   ,.can_write=callback
 
#define ZRTOS_VFS_PLUGIN__7_ON_CAN_WRITE_DEFAULT()   ,.can_write = zrtos_vfs_plugin__default_can_write
 
#define ZRTOS_VFS_PLUGIN__8_ON_SEEK(callback)   ,.seek=callback
 
#define ZRTOS_VFS_PLUGIN__8_ON_SEEK_DEFAULT()   ,.seek = zrtos_vfs_plugin__default_seek
 
#define ZRTOS_VFS_PLUGIN__9_ON_IOCTL(callback)   ,.ioctl=callback
 
#define ZRTOS_VFS_PLUGIN__9_ON_IOCTL_DEFAULT()   ,.ioctl = zrtos_vfs_plugin__default_ioctl
 

Typedefs

typedef size_t zrtos_vfs_offset_t
 

Enumerations

enum  zrtos_vfs_plugin_type_t {
  ZRTOS_VFS_PLUGIN_TYPE__FILE,
  ZRTOS_VFS_PLUGIN_TYPE__DIRECTORY,
  ZRTOS_VFS_PLUGIN_TYPE__FILESYSTEM
}
 

Functions

zrtos_error_t zrtos_vfs_plugin__default_open (struct _zrtos_vfs_file_t *thiz)
 
zrtos_error_t zrtos_vfs_plugin__default_close (struct _zrtos_vfs_file_t *thiz)
 
zrtos_error_t zrtos_vfs_plugin__default_mount (struct _zrtos_vfs_dentry_t *thiz)
 
zrtos_error_t zrtos_vfs_plugin__default_umount (struct _zrtos_vfs_dentry_t *thiz)
 
zrtos_error_t zrtos_vfs_plugin__default_read (struct _zrtos_vfs_file_t *thiz, char *path, void *buf, size_t len, zrtos_vfs_offset_t offset, size_t *out)
 
zrtos_error_t zrtos_vfs_plugin__default_write (struct _zrtos_vfs_file_t *thiz, char *path, void *buf, size_t len, zrtos_vfs_offset_t offset, size_t *out)
 
zrtos_error_t zrtos_vfs_plugin__default_can_read (struct _zrtos_vfs_file_t *thiz)
 
zrtos_error_t zrtos_vfs_plugin__default_can_write (struct _zrtos_vfs_file_t *thiz)
 
zrtos_error_t zrtos_vfs_plugin__default_can_write_read_only (struct _zrtos_vfs_file_t *thiz)
 
zrtos_error_t zrtos_vfs_plugin__default_seek (struct _zrtos_vfs_file_t *thiz, zrtos_vfs_offset_t offset, int whence, zrtos_vfs_offset_t *out)
 
zrtos_error_t zrtos_vfs_plugin__default_ioctl (struct _zrtos_vfs_file_t *thiz, char *path, int request, va_list args)
 

Macro Definition Documentation

◆ ZRTOS_VFS_PLUGIN

#define ZRTOS_VFS_PLUGIN (   name)    (&zrtos_vfs_plugin_module_##name)

Definition at line 136 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__0_ON_OPEN

#define ZRTOS_VFS_PLUGIN__0_ON_OPEN (   callback)    .open=callback

Definition at line 147 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__0_ON_OPEN_DEFAULT

#define ZRTOS_VFS_PLUGIN__0_ON_OPEN_DEFAULT ( )    .open = zrtos_vfs_plugin__default_open

Definition at line 148 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__1_ON_CLOSE

#define ZRTOS_VFS_PLUGIN__1_ON_CLOSE (   callback)    ,.close=callback

Definition at line 164 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__1_ON_CLOSE_DEFAULT

#define ZRTOS_VFS_PLUGIN__1_ON_CLOSE_DEFAULT ( )    ,.close = zrtos_vfs_plugin__default_close

Definition at line 165 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__2_ON_MOUNT

#define ZRTOS_VFS_PLUGIN__2_ON_MOUNT (   callback)    ,.mount=callback

Definition at line 181 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__2_ON_MOUNT_DEFAULT

#define ZRTOS_VFS_PLUGIN__2_ON_MOUNT_DEFAULT ( )    ,.mount = zrtos_vfs_plugin__default_mount

Definition at line 182 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__3_ON_UMOUNT

#define ZRTOS_VFS_PLUGIN__3_ON_UMOUNT (   callback)    ,.umount=callback

Definition at line 198 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__3_ON_UMOUNT_DEFAULT

#define ZRTOS_VFS_PLUGIN__3_ON_UMOUNT_DEFAULT ( )    ,.umount = zrtos_vfs_plugin__default_umount

Definition at line 199 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__4_ON_READ

#define ZRTOS_VFS_PLUGIN__4_ON_READ (   callback)    ,.read=callback

Definition at line 215 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__4_ON_READ_DEFAULT

#define ZRTOS_VFS_PLUGIN__4_ON_READ_DEFAULT ( )    ,.read = zrtos_vfs_plugin__default_read

Definition at line 216 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__5_ON_WRITE

#define ZRTOS_VFS_PLUGIN__5_ON_WRITE (   callback)    ,.write=callback

Definition at line 237 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__5_ON_WRITE_DEFAULT

#define ZRTOS_VFS_PLUGIN__5_ON_WRITE_DEFAULT ( )    ,.write = zrtos_vfs_plugin__default_write

Definition at line 238 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__6_ON_CAN_READ

#define ZRTOS_VFS_PLUGIN__6_ON_CAN_READ (   callback)    ,.can_read=callback

Definition at line 259 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__6_ON_CAN_READ_DEFAULT

#define ZRTOS_VFS_PLUGIN__6_ON_CAN_READ_DEFAULT ( )    ,.can_read = zrtos_vfs_plugin__default_can_read

Definition at line 260 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__7_ON_CAN_WRITE

#define ZRTOS_VFS_PLUGIN__7_ON_CAN_WRITE (   callback)    ,.can_write=callback

Definition at line 276 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__7_ON_CAN_WRITE_DEFAULT

#define ZRTOS_VFS_PLUGIN__7_ON_CAN_WRITE_DEFAULT ( )    ,.can_write = zrtos_vfs_plugin__default_can_write

Definition at line 277 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__8_ON_SEEK

#define ZRTOS_VFS_PLUGIN__8_ON_SEEK (   callback)    ,.seek=callback

Definition at line 293 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__8_ON_SEEK_DEFAULT

#define ZRTOS_VFS_PLUGIN__8_ON_SEEK_DEFAULT ( )    ,.seek = zrtos_vfs_plugin__default_seek

Definition at line 294 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__9_ON_IOCTL

#define ZRTOS_VFS_PLUGIN__9_ON_IOCTL (   callback)    ,.ioctl=callback

Definition at line 318 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__9_ON_IOCTL_DEFAULT

#define ZRTOS_VFS_PLUGIN__9_ON_IOCTL_DEFAULT ( )    ,.ioctl = zrtos_vfs_plugin__default_ioctl

Definition at line 319 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__ARG

#define ZRTOS_VFS_PLUGIN__ARG (   type)    va_arg(args,type)

Definition at line 87 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__INIT

#define ZRTOS_VFS_PLUGIN__INIT (   name,
  ... 
)
Value:
zrtos_vfs_plugin_t zrtos_vfs_plugin_module_##name = {\
__VA_ARGS__\
};

Definition at line 130 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__INVOKE

#define ZRTOS_VFS_PLUGIN__INVOKE (   thiz,
  operation,
  ... 
)    (thiz->operation(__VA_ARGS__))

Definition at line 139 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN__RETURN

#define ZRTOS_VFS_PLUGIN__RETURN (   val)
Value:
do{\
ret = val;\
goto L_RETURN;\
}while(0);

Definition at line 88 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__CAN_READ

#define ZRTOS_VFS_PLUGIN_OPERATION__CAN_READ   can_read

Definition at line 81 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__CAN_WRITE

#define ZRTOS_VFS_PLUGIN_OPERATION__CAN_WRITE   can_write

Definition at line 82 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__CLOSE

#define ZRTOS_VFS_PLUGIN_OPERATION__CLOSE   close

Definition at line 76 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__IOCTL

#define ZRTOS_VFS_PLUGIN_OPERATION__IOCTL   ioctl

Definition at line 84 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__MOUNT

#define ZRTOS_VFS_PLUGIN_OPERATION__MOUNT   mount

Definition at line 77 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__OPEN

#define ZRTOS_VFS_PLUGIN_OPERATION__OPEN   open

Definition at line 75 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__READ

#define ZRTOS_VFS_PLUGIN_OPERATION__READ   read

Definition at line 79 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__SEEK

#define ZRTOS_VFS_PLUGIN_OPERATION__SEEK   seek

Definition at line 83 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__UMOUNT

#define ZRTOS_VFS_PLUGIN_OPERATION__UMOUNT   umount

Definition at line 78 of file vfs_plugin.h.

◆ ZRTOS_VFS_PLUGIN_OPERATION__WRITE

#define ZRTOS_VFS_PLUGIN_OPERATION__WRITE   write

Definition at line 80 of file vfs_plugin.h.

Typedef Documentation

◆ zrtos_vfs_offset_t

Definition at line 49 of file vfs_plugin.h.

Enumeration Type Documentation

◆ zrtos_vfs_plugin_type_t

Enumerator
ZRTOS_VFS_PLUGIN_TYPE__FILE 
ZRTOS_VFS_PLUGIN_TYPE__DIRECTORY 
ZRTOS_VFS_PLUGIN_TYPE__FILESYSTEM 

Definition at line 53 of file vfs_plugin.h.

Function Documentation

◆ zrtos_vfs_plugin__default_can_read()

zrtos_error_t zrtos_vfs_plugin__default_can_read ( struct _zrtos_vfs_file_t thiz)

Definition at line 125 of file vfs_plugin.h.

125 {return ZRTOS_ERROR__SUCCESS;}
Successful program execution status.
Definition: error.h:22

◆ zrtos_vfs_plugin__default_can_write()

zrtos_error_t zrtos_vfs_plugin__default_can_write ( struct _zrtos_vfs_file_t thiz)

Definition at line 126 of file vfs_plugin.h.

126 {return ZRTOS_ERROR__SUCCESS;}
Successful program execution status.
Definition: error.h:22

◆ zrtos_vfs_plugin__default_can_write_read_only()

zrtos_error_t zrtos_vfs_plugin__default_can_write_read_only ( struct _zrtos_vfs_file_t thiz)

Definition at line 127 of file vfs_plugin.h.

127 {return ZRTOS_ERROR__AGAIN;}
Try again.
Definition: error.h:35
Here is the caller graph for this function:

◆ zrtos_vfs_plugin__default_close()

zrtos_error_t zrtos_vfs_plugin__default_close ( struct _zrtos_vfs_file_t thiz)

Definition at line 120 of file vfs_plugin.h.

120 {return ZRTOS_ERROR__SUCCESS;}
Successful program execution status.
Definition: error.h:22

◆ zrtos_vfs_plugin__default_ioctl()

zrtos_error_t zrtos_vfs_plugin__default_ioctl ( struct _zrtos_vfs_file_t thiz,
char *  path,
int  request,
va_list  args 
)

Definition at line 129 of file vfs_plugin.h.

129 {return ZRTOS_ERROR__NOSYS;}
Function not implemented.
Definition: error.h:62

◆ zrtos_vfs_plugin__default_mount()

zrtos_error_t zrtos_vfs_plugin__default_mount ( struct _zrtos_vfs_dentry_t thiz)

Definition at line 121 of file vfs_plugin.h.

121 {return ZRTOS_ERROR__SUCCESS;}
Successful program execution status.
Definition: error.h:22

◆ zrtos_vfs_plugin__default_open()

zrtos_error_t zrtos_vfs_plugin__default_open ( struct _zrtos_vfs_file_t thiz)

Definition at line 119 of file vfs_plugin.h.

119 {return ZRTOS_ERROR__SUCCESS;}
Successful program execution status.
Definition: error.h:22

◆ zrtos_vfs_plugin__default_read()

zrtos_error_t zrtos_vfs_plugin__default_read ( struct _zrtos_vfs_file_t thiz,
char *  path,
void *  buf,
size_t  len,
zrtos_vfs_offset_t  offset,
size_t out 
)

Definition at line 123 of file vfs_plugin.h.

123 {return ZRTOS_ERROR__NOSYS;}
Function not implemented.
Definition: error.h:62

◆ zrtos_vfs_plugin__default_seek()

zrtos_error_t zrtos_vfs_plugin__default_seek ( struct _zrtos_vfs_file_t thiz,
zrtos_vfs_offset_t  offset,
int  whence,
zrtos_vfs_offset_t out 
)

Definition at line 128 of file vfs_plugin.h.

128 {return ZRTOS_ERROR__NOSYS;}
Function not implemented.
Definition: error.h:62

◆ zrtos_vfs_plugin__default_umount()

zrtos_error_t zrtos_vfs_plugin__default_umount ( struct _zrtos_vfs_dentry_t thiz)

Definition at line 122 of file vfs_plugin.h.

122 {return ZRTOS_ERROR__SUCCESS;}
Successful program execution status.
Definition: error.h:22

◆ zrtos_vfs_plugin__default_write()

zrtos_error_t zrtos_vfs_plugin__default_write ( struct _zrtos_vfs_file_t thiz,
char *  path,
void *  buf,
size_t  len,
zrtos_vfs_offset_t  offset,
size_t out 
)

Definition at line 124 of file vfs_plugin.h.

124 {return ZRTOS_ERROR__NOSYS;}
Function not implemented.
Definition: error.h:62