Skip to content
Snippets Groups Projects
Commit 9c801a32 authored by Avi Kivity's avatar Avi Kivity
Browse files

Merge branch 'master' of github.com:cloudius-systems/osv

parents bdb08b03 3c81b9d8
No related branches found
No related tags found
No related merge requests found
Subproject commit 1aa7453760873926164d197f4909c2513edac0cf
Subproject commit ea88fa9ea46bea5ce159ae15f93c154ac0c51173
......@@ -709,12 +709,19 @@ out_errno:
/*
* Duplicate a file descriptor to a particular value.
*/
int dup2(int oldfd, int newfd)
int dup3(int oldfd, int newfd, int flags)
{
struct task *t = main_task;
file_t fp, org;
int error;
/*
* Don't allow any argument but O_CLOEXEC. But we even ignore
* that as we don't support exec() and thus don't care.
*/
if ((flags & ~O_CLOEXEC) != 0)
return -EINVAL;
error = EBADF;
if (oldfd >= OPEN_MAX || newfd >= OPEN_MAX)
goto out_errno;
......@@ -737,6 +744,11 @@ out_errno:
return -1;
}
int dup2(int oldfd, int newfd)
{
return dup3(oldfd, newfd, 0);
}
/*
* The file control system call.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment