telldir.c
FreeBSD getdirentries syscall referenceUses telldir
SHA-25624cb0d239bcfba91df8404df77cf84659b0fd06626507d3f752dffcb84ff2fac
MaleculeO(Er)H(F)
Evidence
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1983, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must repr …
21:6… PLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABL …
28:47… VISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#include "namespace.h"
33#include <sys/param.h>
34#include <sys/queue.h>
35#include <dirent.h>
36#include <pthread.h>
37#include <stdlib.h>
38#include <unistd.h>
39#include "un-namespace.h"
40
41#include "libc_private.h"
42#include "gen-private.h"
43#include "telldir.h"
44
45/*
46 * return a pointer into a directory
47 */
48long
49telldir(DIR *dirp)
50{
⋯5 lines
145:12… go back to 0 don't make the next readdir
146 * trigger a call to getdirentries().
147 */
148 if (loc_loc == 0)
⋯5 lines