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

View File

@ -370,6 +370,35 @@ FSCloseDirAsync(FSClient *client,
FSDirectoryHandle handle,
uint32_t flags,
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
FSGetStatFile(FSClient *client,
@ -572,6 +601,19 @@ FSUnmount(FSClient *client,
const char *target,
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
}
#endif

View File

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