fdopendir.c revision 2
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * CDDL HEADER START
940d71d237794874e18a0eb72f6564821a823517eschrock * The contents of this file are subject to the terms of the
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * Common Development and Distribution License (the "License").
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * You may not use this file except in compliance with the License.
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * See the License for the specific language governing permissions
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * and limitations under the License.
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * When distributing Covered Code, include this CDDL HEADER in each
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * If applicable, add the following below this CDDL HEADER, with the
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * fields enclosed by brackets "[]" replaced with your own identifying
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * information: Portions Copyright [yyyy] [name of copyright owner]
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * CDDL HEADER END
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * fdopendir, dirfd -- C library extension routines
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * We use lmalloc()/lfree() rather than malloc()/free() in
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * order to allow opendir()/readdir()/closedir() to be called
ca6d7ba96138ee0d42364692a5e413bb220c4675jl * while holding internal libc locks.
int error = 0;
goto fail;
goto fail;
goto fail;
goto fail;
return (dirp);
fail:
if (error)
return (NULL);