1/*- |
2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#if defined(LIBC_SCCS) && !defined(lint) 31static char sccsid[] = "@(#)opendir.c 8.8 (Berkeley) 5/1/95"; 32#endif /* LIBC_SCCS and not lint */ 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/lib/libc/gen/opendir.c 178253 2008-04-16 18:40:52Z delphij $"); |
35 36#include "namespace.h" 37#include <sys/param.h> 38#include <sys/mount.h> 39#include <sys/stat.h> 40 41#include <dirent.h> 42#include <errno.h> 43#include <fcntl.h> 44#include <stdlib.h> 45#include <string.h> 46#include <unistd.h> 47#include "un-namespace.h" 48 49#include "telldir.h" 50/* 51 * Open a directory. 52 */ 53DIR * |
54opendir(const char *name) |
55{ 56 57 return (__opendir2(name, DTF_HIDEW|DTF_NODUP)); 58} 59 60DIR * |
61__opendir2(const char *name, int flags) |
62{ 63 DIR *dirp; 64 int fd; 65 int incr; 66 int saved_errno; 67 int unionstack; 68 struct stat statb; 69 --- 211 unchanged lines hidden --- |