* syscall.c (cb_syscall) <case CB_SYS_rename>: New case.

This commit is contained in:
Hans-Peter Nilsson 2004-12-13 00:46:05 +00:00
parent 23193ce4ab
commit 82571856a8
2 changed files with 28 additions and 0 deletions

View File

@ -2,6 +2,7 @@
* syscall.c (cb_syscall) <case CB_SYS_lstat>: New case.
* callback.c (os_lstat): New function.
(cb_syscall) <case CB_SYS_rename>: New case.
2004-12-08 Hans-Peter Nilsson <hp@axis.com>

View File

@ -400,6 +400,33 @@ cb_syscall (cb, sc)
}
break;
case CB_SYS_rename :
{
char *path1, *path2;
errcode = get_path (cb, sc, sc->arg1, &path1);
if (errcode != 0)
{
result = -1;
errcode = EFAULT;
goto FinishSyscall;
}
errcode = get_path (cb, sc, sc->arg2, &path2);
if (errcode != 0)
{
result = -1;
errcode = EFAULT;
free (path1);
goto FinishSyscall;
}
result = (*cb->rename) (cb, path1, path2);
free (path1);
free (path2);
if (result < 0)
goto ErrorFinish;
}
break;
case CB_SYS_stat :
{
char *path,*buf;