From 6d371d35bffb0cd819663fd2838ecf5c99e35543 Mon Sep 17 00:00:00 2001 From: shinyquagsire23 Date: Fri, 26 Aug 2016 16:35:30 -0700 Subject: [PATCH] Implement fs_chmod in devoptab --- crt/fs_dev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crt/fs_dev.c b/crt/fs_dev.c index 45f7aa3..9f5bdee 100644 --- a/crt/fs_dev.c +++ b/crt/fs_dev.c @@ -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; }