diff --git a/include/minix/callnr.h b/include/minix/callnr.h index 29dbff2d2..b4a81effc 100755 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -82,5 +82,7 @@ #define GETPRIORITY 88 /* to PM */ #define SETPRIORITY 89 /* to PM */ #define GETTIMEOFDAY 90 /* to PM */ -#define SETEUID 91 /* to PM (and PM -> FS) */ -#define SETEGID 92 /* to PM (and PM -> FS) */ +#define SETEUID 91 /* to PM */ +#define SETEGID 92 /* to PM */ +#define TRUNCATE 93 /* to FS */ +#define FTRUNCATE 94 /* to FS */ diff --git a/include/sys/stat.h b/include/sys/stat.h index e792f6c5b..45debc803 100755 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -65,7 +65,6 @@ struct stat { #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) /* is a block spec */ #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) /* is a symlink */ #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) /* is a pipe/FIFO */ -#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) /* is a sym link */ /* Function Prototypes. */ _PROTOTYPE( int chmod, (const char *_path, _mnx_Mode_t _mode) ); diff --git a/include/unistd.h b/include/unistd.h index 2b8d45150..7940789a1 100755 --- a/include/unistd.h +++ b/include/unistd.h @@ -139,6 +139,7 @@ _PROTOTYPE( ssize_t write, (int _fd, const void *_buf, size_t _n) ); /* Open Group Base Specifications Issue 6 (not complete) */ _PROTOTYPE( int symlink, (const char *path1, const char *path2) ); +_PROTOTYPE( int readlink, (const char *, char *, int) ); _PROTOTYPE( int getopt, (int _argc, char **_argv, char *_opts) ); extern char *optarg; extern int optind, opterr, optopt; @@ -173,6 +174,8 @@ _PROTOTYPE( int getpprocnr, (void) ); _PROTOTYPE( int findproc, (char *proc_name, int *proc_nr) ); _PROTOTYPE( int allocmem, (phys_bytes size, phys_bytes *base) ); _PROTOTYPE( int freemem, (phys_bytes size, phys_bytes base) ); +_PROTOTYPE( int truncate, (const char *_path, off_t _length) ); +_PROTOTYPE( int ftruncate, (int _fd, off_t _length) ); #define DEV_MAP 1 #define DEV_UNMAP 2 #define mapdriver(driver, device, style) devctl(DEV_MAP, driver, device, style)