Added stubs for chmod(2) and fchmod(2).

This commit is contained in:
Jonas 'Sortie' Termansen 2012-03-04 22:57:44 +01:00
parent 9b2de25f9b
commit 6f9b8b2f64
2 changed files with 16 additions and 0 deletions

View File

@ -45,6 +45,8 @@ __END_DECLS
#include <sortix/stat.h>
__BEGIN_DECLS
int chmod(const char* path, mode_t mode);
int fchmod(int fd, mode_t mode);
int fstat(int fd, struct stat* st);
int mkdir(const char *path, mode_t mode);
int stat(const char* restrict path, struct stat* restrict st);

View File

@ -299,6 +299,20 @@ namespace Maxsi
return SysFCntl(fd, cmd, arg);
}
// TODO: Implement these in the kernel.
extern "C" int chmod(const char* path, mode_t mode)
{
errno = ENOTSUP;
return -1;
}
// TODO: Implement these in the kernel.
extern "C" int fchmod(int fd, mode_t mode)
{
errno = ENOTSUP;
return -1;
}
// TODO: This is a hacky implementation of a stupid function.
char* mktemp(char* templ)
{