-/*
-lstat.c
-*/
-
-#define stat _stat
-
+#include <lib.h>
+#define lstat _lstat
#include <sys/stat.h>
+#include <string.h>
-int lstat(const char *path, struct stat *sb)
+PUBLIC int lstat(name, buffer)
+_CONST char *name;
+struct stat *buffer;
{
- /* Without symlinks, lstat is equal to stat */
- return stat(path, sb);
+ message m;
+
+ m.m1_i1 = strlen(name) + 1;
+ m.m1_p1 = (char *) name;
+ m.m1_p2 = (char *) buffer;
+ return(_syscall(FS, LSTAT, &m));
}
-/*
-readlink.c
-*/
-
+#include <lib.h>
#include <unistd.h>
-#include <errno.h>
+#include <string.h>
-int readlink(const char *path, char *buf, int bufsiz)
+PUBLIC int readlink(name, buffer, bufsiz)
+_CONST char *name;
+char *buffer;
+size_t bufsiz;
{
- errno = EINVAL; /* "The named file is not a symbolic link" */
- return -1;
+ message m;
+
+ m.m1_i1 = strlen(name) + 1;
+ m.m1_i2 = bufsiz;
+ m.m1_p1 = (char *) name;
+ m.m1_p2 = (char *) buffer;
+
+ return(_syscall(FS, RDLNK, &m));
}
-/*
-symlink.c
-*/
-
-#include <errno.h>
+#include <lib.h>
+#define symlink _symlink
+#include <string.h>
#include <unistd.h>
-int symlink(const char *path1, const char *path2)
+PUBLIC int symlink(name, name2)
+_CONST char *name, *name2;
{
- errno= ENOSYS;
- return -1;
+ message m;
+
+ m.m1_i1 = strlen(name) + 1;
+ m.m1_i2 = strlen(name2) + 1;
+ m.m1_p1 = (char *) name;
+ m.m1_p2 = (char *) name2;
+ return(_syscall(FS, SYMLINK, &m));
}