Merge pull request #41 from shinyquagsire23/fs_additions

FS Additions
This commit is contained in:
James 2016-08-28 00:18:57 +01:00 committed by GitHub
commit ecf370b49c
3 changed files with 56 additions and 3 deletions

View File

@ -938,10 +938,14 @@ fs_chmod(struct _reent *r,
return -1; return -1;
} }
rc = FSChangeMode(fsClient, fsCmd, path_fix, (FSMode)mode, -1)
free(path_fix); free(path_fix);
//TODO: FSChangeMode if (rc >= 0) {
r->_errno = ENOSYS; return 0;
}
r->_errno = fs_translate_error(rc);
return -1; return -1;
} }
@ -950,7 +954,8 @@ fs_fchmod(struct _reent *r,
int fd, int fd,
mode_t mode) mode_t mode)
{ {
//TODO: FSChangeMode //TODO: FSChangeMode and FSStatFile?
r->_errno = ENOSYS; r->_errno = ENOSYS;
return -1; return -1;
} }

View File

@ -370,6 +370,35 @@ FSCloseDirAsync(FSClient *client,
FSDirectoryHandle handle, FSDirectoryHandle handle,
uint32_t flags, uint32_t flags,
FSAsyncData *asyncData); FSAsyncData *asyncData);
FSStatus
FSChangeMode(FSClient *client,
FSCmdBlock *block,
char *path,
FSMode mode,
uint32_t flags);
FSStatus
FSChangeModeAsync(FSClient *client,
FSCmdBlock *block,
char *path,
FSMode mode,
uint32_t flags,
FSAsyncData *asyncData);
FSStatus
FSGetFreeSpaceSize(FSClient *client,
FSCmdBlock *block,
char *path,
u64 *outSize,
uint32_t flags);
FSStatus
FSGetFreeSpaceSizeAsync(FSClient *client,
FSCmdBlock *block,
char *path,
u64 *outSize,
uint32_t flags,
FSAsyncData *asyncData);
FSStatus FSStatus
FSGetStatFile(FSClient *client, FSGetStatFile(FSClient *client,
@ -572,6 +601,19 @@ FSUnmount(FSClient *client,
const char *target, const char *target,
uint32_t flags); uint32_t flags);
FSStatus
FSBindMount(FSClient *client,
FSCmdBlock *cmd,
const char *source,
const char *target,
uint32_t flags);
FSStatus
FSbindUnmount(FSClient *client,
FSCmdBlock *cmd,
const char *target,
uint32_t flags);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -138,6 +138,10 @@ EXPORT(FSSetStateChangeNotification);
EXPORT(FSGetCwd); EXPORT(FSGetCwd);
EXPORT(FSChangeDir); EXPORT(FSChangeDir);
EXPORT(FSChangeDirAsync); EXPORT(FSChangeDirAsync);
EXPORT(FSChangeMode);
EXPORT(FSChangeModeAsync);
EXPORT(FSGetFreeSpaceSize);
EXPORT(FSGetFreeSpaceSizeAsync);
EXPORT(FSGetStat); EXPORT(FSGetStat);
EXPORT(FSGetStatAsync); EXPORT(FSGetStatAsync);
EXPORT(FSRemove); EXPORT(FSRemove);
@ -180,6 +184,8 @@ EXPORT(FSGetLastErrorCodeForViewer);
EXPORT(FSGetMountSource); EXPORT(FSGetMountSource);
EXPORT(FSMount); EXPORT(FSMount);
EXPORT(FSUnmount); EXPORT(FSUnmount);
EXPORT(FSBindMount);
EXPORT(FSBindUnmount);
// coreinit/foreground.h // coreinit/foreground.h
EXPORT(OSEnableForegroundExit); EXPORT(OSEnableForegroundExit);