RetroArch
Classes | Macros | Typedefs | Functions | Variables
sd_fat_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 <fcntl.h>
#include <stdio.h>
#include "fs_utils.h"
#include <wiiu/os/mutex.h>
#include <wiiu/fs.h>
Include dependency graph for sd_fat_devoptab.c:

Classes

struct  FSDirEntry
 
struct  _sd_fat_private_t
 
struct  _sd_fat_file_state_t
 
struct  _sd_fat_dir_entry_t
 

Macros

#define FS_ALIGNMENT   0x40
 
#define FS_ALIGN(x)   (((x) + FS_ALIGNMENT - 1) & ~(FS_ALIGNMENT - 1))
 

Typedefs

typedef struct _sd_fat_private_t sd_fat_private_t
 
typedef struct _sd_fat_file_state_t sd_fat_file_state_t
 
typedef struct _sd_fat_dir_entry_t sd_fat_dir_entry_t
 

Functions

struct __attribute__ ((packed))
 
static sd_fat_private_tsd_fat_get_device_data (const char *path)
 
static char * sd_fat_real_path (const char *path, sd_fat_private_t *dev)
 
static int sd_fat_open_r (struct _reent *r, void *fileStruct, const char *path, int flags, int mode)
 
static int sd_fat_close_r (struct _reent *r, void *fd)
 
static off_t sd_fat_seek_r (struct _reent *r, void *fd, off_t pos, int dir)
 
static ssize_t sd_fat_write_r (struct _reent *r, void *fd, const char *ptr, size_t len)
 
static ssize_t sd_fat_read_r (struct _reent *r, void *fd, char *ptr, size_t len)
 
static int sd_fat_fstat_r (struct _reent *r, void *fd, struct stat *st)
 
static int sd_fat_ftruncate_r (struct _reent *r, void *fd, off_t len)
 
static int sd_fat_fsync_r (struct _reent *r, void *fd)
 
static int sd_fat_stat_r (struct _reent *r, const char *path, struct stat *st)
 
static int sd_fat_link_r (struct _reent *r, const char *existing, const char *newLink)
 
static int sd_fat_unlink_r (struct _reent *r, const char *name)
 
static int sd_fat_chdir_r (struct _reent *r, const char *name)
 
static int sd_fat_rename_r (struct _reent *r, const char *oldName, const char *newName)
 
static int sd_fat_mkdir_r (struct _reent *r, const char *path, int mode)
 
static int sd_fat_statvfs_r (struct _reent *r, const char *path, struct statvfs *buf)
 
static DIR_ITER * sd_fat_diropen_r (struct _reent *r, DIR_ITER *dirState, const char *path)
 
static int sd_fat_dirclose_r (struct _reent *r, DIR_ITER *dirState)
 
static int sd_fat_dirreset_r (struct _reent *r, DIR_ITER *dirState)
 
static int sd_fat_dirnext_r (struct _reent *r, DIR_ITER *dirState, char *filename, struct stat *st)
 
static int sd_fat_add_device (const char *name, const char *mount_path, void *pClient, void *pCmd)
 
static int sd_fat_remove_device (const char *path, void **pClient, void **pCmd, char **mountPath)
 
int mount_sd_fat (const char *path)
 
int unmount_sd_fat (const char *path)
 

Variables

 FSStat__
 
static const devoptab_t devops_sd_fat
 

Macro Definition Documentation

◆ FS_ALIGN

#define FS_ALIGN (   x)    (((x) + FS_ALIGNMENT - 1) & ~(FS_ALIGNMENT - 1))

◆ FS_ALIGNMENT

#define FS_ALIGNMENT   0x40

Typedef Documentation

◆ sd_fat_dir_entry_t

◆ sd_fat_file_state_t

◆ sd_fat_private_t

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed )

◆ mount_sd_fat()

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

◆ sd_fat_add_device()

static int sd_fat_add_device ( const char *  name,
const char *  mount_path,
void pClient,
void pCmd 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sd_fat_chdir_r()

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

◆ sd_fat_close_r()

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

◆ sd_fat_dirclose_r()

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

◆ sd_fat_dirnext_r()

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

◆ sd_fat_diropen_r()

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

◆ sd_fat_dirreset_r()

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

◆ sd_fat_fstat_r()

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

◆ sd_fat_fsync_r()

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

◆ sd_fat_ftruncate_r()

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

◆ sd_fat_get_device_data()

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

◆ sd_fat_link_r()

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

◆ sd_fat_mkdir_r()

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

◆ sd_fat_open_r()

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

◆ sd_fat_read_r()

static ssize_t sd_fat_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:

◆ sd_fat_real_path()

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

◆ sd_fat_remove_device()

static int sd_fat_remove_device ( const char *  path,
void **  pClient,
void **  pCmd,
char **  mountPath 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sd_fat_rename_r()

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

◆ sd_fat_seek_r()

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

◆ sd_fat_stat_r()

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

◆ sd_fat_statvfs_r()

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

◆ sd_fat_unlink_r()

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

◆ sd_fat_write_r()

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

◆ unmount_sd_fat()

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

Variable Documentation

◆ devops_sd_fat

const devoptab_t devops_sd_fat
static
Initial value:
= {
NULL,
NULL,
NULL,
}
struct _sd_fat_file_state_t sd_fat_file_state_t
static int sd_fat_fsync_r(struct _reent *r, void *fd)
Definition: sd_fat_devoptab.c:447
Definition: sd_fat_devoptab.c:80
static DIR_ITER * sd_fat_diropen_r(struct _reent *r, DIR_ITER *dirState, const char *path)
Definition: sd_fat_devoptab.c:724
static int sd_fat_dirreset_r(struct _reent *r, DIR_ITER *dirState)
Definition: sd_fat_devoptab.c:785
static ssize_t sd_fat_write_r(struct _reent *r, void *fd, const char *ptr, size_t len)
Definition: sd_fat_devoptab.c:267
static int sd_fat_open_r(struct _reent *r, void *fileStruct, const char *path, int flags, int mode)
Definition: sd_fat_devoptab.c:133
static int sd_fat_dirnext_r(struct _reent *r, DIR_ITER *dirState, char *filename, struct stat *st)
Definition: sd_fat_devoptab.c:807
static int sd_fat_fstat_r(struct _reent *r, void *fd, struct stat *st)
Definition: sd_fat_devoptab.c:387
static off_t sd_fat_seek_r(struct _reent *r, void *fd, off_t pos, int dir)
Definition: sd_fat_devoptab.c:229
static int sd_fat_ftruncate_r(struct _reent *r, void *fd, off_t len)
Definition: sd_fat_devoptab.c:425
static int sd_fat_link_r(struct _reent *r, const char *existing, const char *newLink)
Definition: sd_fat_devoptab.c:520
static int sd_fat_close_r(struct _reent *r, void *fd)
Definition: sd_fat_devoptab.c:207
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static ssize_t sd_fat_read_r(struct _reent *r, void *fd, char *ptr, size_t len)
Definition: sd_fat_devoptab.c:328
static int sd_fat_unlink_r(struct _reent *r, const char *name)
Definition: sd_fat_devoptab.c:526
static int sd_fat_stat_r(struct _reent *r, const char *path, struct stat *st)
Definition: sd_fat_devoptab.c:469
static int sd_fat_statvfs_r(struct _reent *r, const char *path, struct statvfs *buf)
Definition: sd_fat_devoptab.c:660
static int sd_fat_dirclose_r(struct _reent *r, DIR_ITER *dirState)
Definition: sd_fat_devoptab.c:763
static int sd_fat_mkdir_r(struct _reent *r, const char *path, int mode)
Definition: sd_fat_devoptab.c:629
static int sd_fat_rename_r(struct _reent *r, const char *oldName, const char *newName)
Definition: sd_fat_devoptab.c:589
static int sd_fat_chdir_r(struct _reent *r, const char *name)
Definition: sd_fat_devoptab.c:558

◆ FSStat__

FSStat__