X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Forg%2Fibex%2Fnestedvm%2Fsupport_aux.c;h=244ae169698ae2719f0091c860465042693d5a28;hb=5b0cc721fd63727616d6e0bb8ec4e8f0dbc39f9b;hp=03bf2e9ff1a910168f18d00dad4c7d19d4922624;hpb=74c9fe2438225d551687f06f51e86925f8e8c13c;p=nestedvm.git diff --git a/src/org/ibex/nestedvm/support_aux.c b/src/org/ibex/nestedvm/support_aux.c index 03bf2e9..244ae16 100644 --- a/src/org/ibex/nestedvm/support_aux.c +++ b/src/org/ibex/nestedvm/support_aux.c @@ -85,7 +85,7 @@ REENT_WRAPPER0(vfork) REENT_WRAPPER1(chroot,const char *) REENT_WRAPPER3(mknod,const char *,mode_t,dev_t) REENT_WRAPPER2(ftruncate,int,off_t) -REENT_WRAPPER1(usleep,unsigned int) +REENT_WRAPPER1R(usleep,unsigned int,unsigned int) REENT_WRAPPER2(mkfifo,const char *, mode_t) REENT_WRAPPER3(klogctl,int,char*,int) REENT_WRAPPER2R(realpath,char *,const char *,char *) @@ -117,6 +117,7 @@ REENT_WRAPPER1(setgid,gid_t) REENT_WRAPPER1(setegid,gid_t) REENT_WRAPPER2(setgroups,int,const gid_t *) REENT_WRAPPER0R(setsid,pid_t) +REENT_WRAPPER1(fsync,int) extern int __execve_r(struct _reent *ptr, const char *path, char *const argv[], char *const envp[]); int _execve(const char *path, char *const argv[], char *const envp[]) { @@ -166,12 +167,8 @@ int _sysctl_r(struct _reent *ptr, int *name, int namelen, void *oldp, size_t *ol } } -void sync() { +int sync() { /* do nothing*/ -} - -int fsync(int fd) { - /* do nothing */ return 0; } @@ -521,6 +518,11 @@ int vasprintf(char **ret, const char *fmt, va_list ap) { } } +// FIXME: This needs to be in a header +char *getlogin() { + return getenv("USER"); +} + /* * Other People's Code