* Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34363 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,35 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2004-2007, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2004-2009, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <syscalls.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <syscalls.h>
|
||||||
|
#include <syscall_utils.h>
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
dup(int fd)
|
dup(int fd)
|
||||||
{
|
{
|
||||||
int status = _kern_dup(fd);
|
RETURN_AND_SET_ERRNO(_kern_dup(fd));
|
||||||
if (status < 0) {
|
|
||||||
errno = status;
|
|
||||||
status = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
dup2(int oldFD, int newFD)
|
dup2(int oldFD, int newFD)
|
||||||
{
|
{
|
||||||
int status = _kern_dup2(oldFD, newFD);
|
RETURN_AND_SET_ERRNO(_kern_dup2(oldFD, newFD));
|
||||||
if (status < 0) {
|
|
||||||
errno = status;
|
|
||||||
status = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user