summaryrefslogtreecommitdiff
path: root/userspace/sys/sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/sys/sys.c')
-rw-r--r--userspace/sys/sys.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/userspace/sys/sys.c b/userspace/sys/sys.c
index ecdf556..ef0d1df 100644
--- a/userspace/sys/sys.c
+++ b/userspace/sys/sys.c
@@ -3,53 +3,61 @@
#include <sys/stat.h>
-// building binutils required this stubs!
+// required by binutils!
long sysconf(int name)
{
+ printf("SYSCONF CALLED WITH : %s",name);
return 0;
}
+// set file mode creation mask
mode_t umask(mode_t mask)
{
return mask;
}
+// chmod
int chmod(const char * path, mode_t mode)
{
- return 0;
-}
-
-int fcntl(int fd, int cmd, ...)
-{
return -1;
}
-int lstat(const char *path, struct stat *buf)
+// manipulating file descriptor
+int fcntl(int fd, int cmd, ...)
{
return -1;
}
+// working directory
char *getwd(char *buf)
{
+ static char wd[]="/";
+ buf=wd;
return buf;
}
+
+// check if access allowed
int access(const char *pathname, int mode)
{
+ //TODO: at leas check if this file exists!
return 0;
}
+// update time
int utime(const char *filename, const int *x)
{
- return 0;
+ return -1;
}
+// rmdir
int rmdir (const char *pathname)
{
return -1;
}
+// chonw
int chown(const char *path, uid_t owner, gid_t group)
{
- return 0;
+ return -1;
}