diff options
| author | Jonathan Mini <mini@FreeBSD.org> | 2002-09-16 19:52:52 +0000 |
|---|---|---|
| committer | Jonathan Mini <mini@FreeBSD.org> | 2002-09-16 19:52:52 +0000 |
| commit | 255ab70cdf6eb0005e7494657f35d318f666de50 (patch) | |
| tree | 19954471d255ce812e704c80bd079f406bc31378 /lib/libpthread/thread/thr_open.c | |
| parent | 51f42932d165603bcfdafe9d900a392fd821a9eb (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_open.c')
| -rw-r--r-- | lib/libpthread/thread/thr_open.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/lib/libpthread/thread/thr_open.c b/lib/libpthread/thread/thr_open.c index 3e0da32af7bc..b8a663523457 100644 --- a/lib/libpthread/thread/thr_open.c +++ b/lib/libpthread/thread/thr_open.c @@ -43,36 +43,6 @@ __weak_reference(__open, open); int -_open(const char *path, int flags,...) -{ - int fd; - int mode = 0; - va_list ap; - - /* Check if the file is being created: */ - if (flags & O_CREAT) { - /* Get the creation mode: */ - va_start(ap, flags); - mode = va_arg(ap, int); - va_end(ap); - } - /* Open the file: */ - if ((fd = __sys_open(path, flags, mode)) < 0) { - } - /* Initialise the file descriptor table entry: */ - else if (_thread_fd_table_init(fd) != 0) { - /* Quietly close the file: */ - __sys_close(fd); - - /* Reset the file descriptor: */ - fd = -1; - } - - /* Return the file descriptor or -1 on error: */ - return (fd); -} - -int __open(const char *path, int flags,...) { int ret; @@ -89,7 +59,7 @@ __open(const char *path, int flags,...) va_end(ap); } - ret = _open(path, flags, mode); + ret = __sys_open(path, flags, mode); _thread_leave_cancellation_point(); return ret; |
