2018-05-02 06:20:06 +03:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <syscall.h>
|
2018-12-10 04:09:27 +03:00
|
|
|
#include <syscall_nums.h>
|
2018-05-02 06:20:06 +03:00
|
|
|
|
2018-12-10 04:09:27 +03:00
|
|
|
DEFN_SYSCALL2(getcwd, SYS_GETCWD, char *, size_t);
|
2018-05-02 06:20:06 +03:00
|
|
|
|
|
|
|
char *getcwd(char *buf, size_t size) {
|
|
|
|
if (!buf) buf = malloc(size);
|
|
|
|
return (char *)syscall_getcwd(buf, size);
|
|
|
|
}
|
|
|
|
|