RetroArch
Classes | Typedefs | Functions | Variables
iosuhax_devoptab.c File Reference
#include <errno.h>
#include <sys/statvfs.h>
#include <sys/dirent.h>
#include <sys/iosupport.h>
#include <string.h>
#include <malloc.h>
#include <stdint.h>
#include <fcntl.h>
#include <stdio.h>
#include "os_functions.h"
#include "iosuhax.h"
Include dependency graph for iosuhax_devoptab.c:

Classes

struct  _fs_dev_private_t
 
struct  _fs_dev_file_state_t
 
struct  _fs_dev_dir_entry_t
 

Typedefs

typedef struct _fs_dev_private_t fs_dev_private_t
 
typedef struct _fs_dev_file_state_t fs_dev_file_state_t
 
typedef struct _fs_dev_dir_entry_t fs_dev_dir_entry_t
 

Functions

static fs_dev_private_tfs_dev_get_device_data (const char *path)
 
static char * fs_dev_real_path (const char *path, fs_dev_private_t *dev)
 
static int fs_dev_open_r (struct _reent *r, void *fileStruct, const char *path, int flags, int mode)
 
static int fs_dev_close_r (struct _reent *r, void *fd)
 
static off_t fs_dev_seek_r (struct _reent *r, void *fd, off_t pos, int dir)
 
static ssize_t fs_dev_write_r (struct _reent *r, void *fd, const char *ptr, size_t len)
 
static ssize_t fs_dev_read_r (struct _reent *r, void *fd, char *ptr, size_t len)
 
static int fs_dev_fstat_r (struct _reent *r, void *fd, struct stat *st)
 
static int fs_dev_ftruncate_r (struct _reent *r, void *fd, off_t len)
 
static int fs_dev_fsync_r (struct _reent *r, void *fd)
 
static int fs_dev_stat_r (struct _reent *r, const char *path, struct stat *st)
 
static int fs_dev_link_r (struct _reent *r, const char *existing, const char *newLink)
 
static int fs_dev_unlink_r (struct _reent *r, const char *name)
 
static int fs_dev_chdir_r (struct _reent *r, const char *name)
 
static int fs_dev_rename_r (struct _reent *r, const char *oldName, const char *newName)
 
static int fs_dev_mkdir_r (struct _reent *r, const char *path, int mode)
 
static int fs_dev_chmod_r (struct _reent *r, const char *path, int mode)
 
static int fs_dev_statvfs_r (struct _reent *r, const char *path, struct statvfs *buf)
 
static DIR_ITER * fs_dev_diropen_r (struct _reent *r, DIR_ITER *dirState, const char *path)
 
static int fs_dev_dirclose_r (struct _reent *r, DIR_ITER *dirState)
 
static int fs_dev_dirreset_r (struct _reent *r, DIR_ITER *dirState)
 
static int fs_dev_dirnext_r (struct _reent *r, DIR_ITER *dirState, char *filename, struct stat *st)
 
static int fs_dev_add_device (const char *name, const char *mount_path, int fsaFd, int isMounted)
 
static int fs_dev_remove_device (const char *path)
 
int mount_fs (const char *virt_name, int fsaFd, const char *dev_path, const char *mount_path)
 
int unmount_fs (const char *virt_name)
 

Variables

static const devoptab_t devops_fs
 

Typedef Documentation

◆ fs_dev_dir_entry_t

◆ fs_dev_file_state_t

◆ fs_dev_private_t

Function Documentation

◆ fs_dev_add_device()

static int fs_dev_add_device ( const char *  name,
const char *  mount_path,
int  fsaFd,
int  isMounted 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fs_dev_chdir_r()

static int fs_dev_chdir_r ( struct _reent *  r,
const char *  name 
)
static
Here is the call graph for this function:

◆ fs_dev_chmod_r()

static int fs_dev_chmod_r ( struct _reent *  r,
const char *  path,
int  mode 
)
static
Here is the call graph for this function:

◆ fs_dev_close_r()

static int fs_dev_close_r ( struct _reent *  r,
void fd 
)
static
Here is the call graph for this function:

◆ fs_dev_dirclose_r()

static int fs_dev_dirclose_r ( struct _reent *  r,
DIR_ITER *  dirState 
)
static
Here is the call graph for this function:

◆ fs_dev_dirnext_r()

static int fs_dev_dirnext_r ( struct _reent *  r,
DIR_ITER *  dirState,
char *  filename,
struct stat *  st 
)
static
Here is the call graph for this function:

◆ fs_dev_diropen_r()

static DIR_ITER* fs_dev_diropen_r ( struct _reent *  r,
DIR_ITER *  dirState,
const char *  path 
)
static
Here is the call graph for this function:

◆ fs_dev_dirreset_r()

static int fs_dev_dirreset_r ( struct _reent *  r,
DIR_ITER *  dirState 
)
static
Here is the call graph for this function:

◆ fs_dev_fstat_r()

static int fs_dev_fstat_r ( struct _reent *  r,
void fd,
struct stat *  st 
)
static
Here is the call graph for this function:

◆ fs_dev_fsync_r()

static int fs_dev_fsync_r ( struct _reent *  r,
void fd 
)
static

◆ fs_dev_ftruncate_r()

static int fs_dev_ftruncate_r ( struct _reent *  r,
void fd,
off_t  len 
)
static

◆ fs_dev_get_device_data()

static fs_dev_private_t* fs_dev_get_device_data ( const char *  path)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fs_dev_link_r()

static int fs_dev_link_r ( struct _reent *  r,
const char *  existing,
const char *  newLink 
)
static

◆ fs_dev_mkdir_r()

static int fs_dev_mkdir_r ( struct _reent *  r,
const char *  path,
int  mode 
)
static
Here is the call graph for this function:

◆ fs_dev_open_r()

static int fs_dev_open_r ( struct _reent *  r,
void fileStruct,
const char *  path,
int  flags,
int  mode 
)
static
Here is the call graph for this function:

◆ fs_dev_read_r()

static ssize_t fs_dev_read_r ( struct _reent *  r,
void fd,
char *  ptr,
size_t  len 
)
static

TODO: error on read_size > 0

Here is the call graph for this function:

◆ fs_dev_real_path()

static char* fs_dev_real_path ( const char *  path,
fs_dev_private_t dev 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fs_dev_remove_device()

static int fs_dev_remove_device ( const char *  path)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fs_dev_rename_r()

static int fs_dev_rename_r ( struct _reent *  r,
const char *  oldName,
const char *  newName 
)
static

TODO

Here is the call graph for this function:

◆ fs_dev_seek_r()

static off_t fs_dev_seek_r ( struct _reent *  r,
void fd,
off_t  pos,
int  dir 
)
static
Here is the call graph for this function:

◆ fs_dev_stat_r()

static int fs_dev_stat_r ( struct _reent *  r,
const char *  path,
struct stat *  st 
)
static
Here is the call graph for this function:

◆ fs_dev_statvfs_r()

static int fs_dev_statvfs_r ( struct _reent *  r,
const char *  path,
struct statvfs *  buf 
)
static
Here is the call graph for this function:

◆ fs_dev_unlink_r()

static int fs_dev_unlink_r ( struct _reent *  r,
const char *  name 
)
static
Here is the call graph for this function:

◆ fs_dev_write_r()

static ssize_t fs_dev_write_r ( struct _reent *  r,
void fd,
const char *  ptr,
size_t  len 
)
static
Here is the call graph for this function:

◆ mount_fs()

int mount_fs ( const char *  virt_name,
int  fsaFd,
const char *  dev_path,
const char *  mount_path 
)

virtual name example: sd or odd (for sd:/ or odd:/ access) fsaFd: fd received by IOSUHAX_FSA_Open(); dev_path: (optional) if a device should be mounted to the mount_path. If NULL no IOSUHAX_FSA_Mount is not executed. mount_path: path to map to virtual device name

Here is the call graph for this function:

◆ unmount_fs()

int unmount_fs ( const char *  virt_name)
Here is the call graph for this function:

Variable Documentation

◆ devops_fs

const devoptab_t devops_fs
static
Initial value:
= {
NULL,
NULL,
}
static int fs_dev_statvfs_r(struct _reent *r, const char *path, struct statvfs *buf)
Definition: iosuhax_devoptab.c:725
static DIR_ITER * fs_dev_diropen_r(struct _reent *r, DIR_ITER *dirState, const char *path)
Definition: iosuhax_devoptab.c:798
static int fs_dev_close_r(struct _reent *r, void *fd)
Definition: iosuhax_devoptab.c:193
static int fs_dev_mkdir_r(struct _reent *r, const char *path, int mode)
Definition: iosuhax_devoptab.c:655
static off_t fs_dev_seek_r(struct _reent *r, void *fd, off_t pos, int dir)
Definition: iosuhax_devoptab.c:224
static ssize_t fs_dev_write_r(struct _reent *r, void *fd, const char *ptr, size_t len)
Definition: iosuhax_devoptab.c:271
static int fs_dev_chmod_r(struct _reent *r, const char *path, int mode)
Definition: iosuhax_devoptab.c:690
static int fs_dev_link_r(struct _reent *r, const char *existing, const char *newLink)
Definition: iosuhax_devoptab.c:526
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static int fs_dev_stat_r(struct _reent *r, const char *path, struct stat *st)
Definition: iosuhax_devoptab.c:471
static int fs_dev_fstat_r(struct _reent *r, void *fd, struct stat *st)
Definition: iosuhax_devoptab.c:380
static int fs_dev_chdir_r(struct _reent *r, const char *name)
Definition: iosuhax_devoptab.c:570
static int fs_dev_dirclose_r(struct _reent *r, DIR_ITER *dirState)
Definition: iosuhax_devoptab.c:846
static int fs_dev_unlink_r(struct _reent *r, const char *name)
Definition: iosuhax_devoptab.c:535
static int fs_dev_ftruncate_r(struct _reent *r, void *fd, off_t len)
Definition: iosuhax_devoptab.c:427
static int fs_dev_open_r(struct _reent *r, void *fileStruct, const char *path, int flags, int mode)
Definition: iosuhax_devoptab.c:112
static ssize_t fs_dev_read_r(struct _reent *r, void *fd, char *ptr, size_t len)
Definition: iosuhax_devoptab.c:325
static int fs_dev_dirreset_r(struct _reent *r, DIR_ITER *dirState)
Definition: iosuhax_devoptab.c:879
struct _fs_dev_file_state_t fs_dev_file_state_t
static int fs_dev_fsync_r(struct _reent *r, void *fd)
Definition: iosuhax_devoptab.c:449
static int fs_dev_rename_r(struct _reent *r, const char *oldName, const char *newName)
Definition: iosuhax_devoptab.c:605
Definition: iosuhax_devoptab.c:56
static int fs_dev_dirnext_r(struct _reent *r, DIR_ITER *dirState, char *filename, struct stat *st)
Definition: iosuhax_devoptab.c:912