some coverity fixes.
[minix.git] / lib / libc / sys-minix / chdir.c
blobe514326abd9fc7452c8d134d448b5dec9fd746cf
1 #include <sys/cdefs.h>
2 #include "namespace.h"
3 #include <lib.h>
5 #include <unistd.h>
7 #ifdef __weak_alias
8 __weak_alias(chdir, _chdir)
9 __weak_alias(fchdir, _fchdir)
10 #endif
12 int chdir(name)
13 const char *name;
15 message m;
17 _loadname(name, &m);
18 return(_syscall(VFS_PROC_NR, CHDIR, &m));
21 int fchdir(fd)
22 int fd;
24 message m;
26 m.m1_i1 = fd;
27 return(_syscall(VFS_PROC_NR, FCHDIR, &m));