1/*
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 2000
5 * Poul-Henning Kamp. All rights reserved.
6 *
7 * This code is derived from software donated to Berkeley by
8 * Jan-Simon Pendry.
--- 17 unchanged lines hidden (view full) ---
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95
32 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vnops.c 1.43
33 *
34 * $FreeBSD: head/sys/fs/devfs/devfs_vnops.c 111119 2003-02-19 05:47:46Z imp $
35 */
36
37/*
38 * TODO:
39 * remove empty directories
40 * mknod: hunt down DE_DELETED, compare name, reinstantiate.
41 * mkdir: want it ?
42 */
--- 551 unchanged lines hidden (view full) ---
594 else
595 de = dd;
596 dp = dd->de_dirent;
597 if (dp->d_reclen > uio->uio_resid)
598 break;
599 dp->d_fileno = de->de_inode;
600 if (off >= uio->uio_offset) {
601 ncookies++;
602 error = uiomove((caddr_t)dp, dp->d_reclen, uio);
603 if (error)
604 break;
605 }
606 off += dp->d_reclen;
607 }
608 if( !error && ap->a_ncookies != NULL && ap->a_cookies != NULL ) {
609 MALLOC(cookiebuf, u_long *, ncookies * sizeof(u_long),
610 M_TEMP, M_WAITOK);
--- 308 unchanged lines hidden ---
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 2000
5 * Poul-Henning Kamp. All rights reserved.
6 *
7 * This code is derived from software donated to Berkeley by
8 * Jan-Simon Pendry.
--- 17 unchanged lines hidden (view full) ---
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95
32 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vnops.c 1.43
33 *
34 * $FreeBSD: head/sys/fs/devfs/devfs_vnops.c 111119 2003-02-19 05:47:46Z imp $
35 */
36
37/*
38 * TODO:
39 * remove empty directories
40 * mknod: hunt down DE_DELETED, compare name, reinstantiate.
41 * mkdir: want it ?
42 */
--- 551 unchanged lines hidden (view full) ---
594 else
595 de = dd;
596 dp = dd->de_dirent;
597 if (dp->d_reclen > uio->uio_resid)
598 break;
599 dp->d_fileno = de->de_inode;
600 if (off >= uio->uio_offset) {
601 ncookies++;
602 error = uiomove((caddr_t)dp, dp->d_reclen, uio);
603 if (error)
604 break;
605 }
606 off += dp->d_reclen;
607 }
608 if( !error && ap->a_ncookies != NULL && ap->a_cookies != NULL ) {
609 MALLOC(cookiebuf, u_long *, ncookies * sizeof(u_long),
610 M_TEMP, M_WAITOK);
--- 308 unchanged lines hidden ---