Added ELOOP message to errlist.
"No locks available", /* ENOLCK */
"Function not implemented", /* ENOSYS */
"Directory not empty", /* ENOTEMPTY */
- unknown, /* 40 */
+ "Too many levels of symbolic links", /* ELOOP */
unknown, /* 41 */
unknown, /* 42 */
unknown, /* 43 */
_kill.o \
_link.o \
_lseek.o \
+ _lstat.o \
_mkdir.o \
_mkfifo.o \
_mknod.o \
_rename.o \
_rewinddir.o \
_rmdir.o \
+ _readlink.o \
_select.o \
_setgid.o \
_setsid.o \
_sleep.o \
_stat.o \
_stime.o \
+ _symlink.o \
_sync.o \
_tcdrain.o \
_tcflow.o \
_tcsetattr.o \
_time.o \
_times.o \
+ _truncate.o \
_umask.o \
_umount.o \
_uname.o \
_wait.o \
_waitpid.o \
_write.o \
- gettimeofday.o \
+ getloadavg.o \
getopt.o \
- _lstat.o \
+ gettimeofday.o \
priority.o \
- _readlink.o \
- _symlink.o \
usleep.o \
- getloadavg.o
include ../Makefile.inc
--- /dev/null
+#include <lib.h>
+#define truncate _truncate
+#define ftruncate _ftruncate
+#include <unistd.h>
+
+PUBLIC int truncate(const char *_path, off_t _length)
+{
+ message m;
+ m.m1_p1 = (char *) _path;
+ m.m1_i1 = _length;
+
+ return(_syscall(FS, TRUNCATE, &m));
+}
+
+PUBLIC int ftruncate(int _fd, off_t _length)
+{
+ message m;
+ m.m1_i2 = _fd;
+ m.m1_i1 = _length;
+
+ return(_syscall(FS, FTRUNCATE, &m));
+}
tcsetattr.o \
time.o \
times.o \
+ truncate.o \
umask.o \
umount.o \
uname.o \
--- /dev/null
+.sect .text
+.extern __truncate
+.extern __ftruncate
+.define _truncate
+.define _ftruncate
+.align 2
+
+_truncate:
+ jmp __truncate
+
+.align 2
+_ftruncate:
+ jmp __ftruncate