Deleted Added
full compact
fdesc_vnops.c (205223) fdesc_vnops.c (218909)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
33 *
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
33 *
34 * $FreeBSD: head/sys/fs/fdescfs/fdesc_vnops.c 205223 2010-03-16 19:59:14Z jkim $
34 * $FreeBSD: head/sys/fs/fdescfs/fdesc_vnops.c 218909 2011-02-21 09:01:34Z brucec $
35 */
36
37/*
38 * /dev/fd Filesystem
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>

--- 320 unchanged lines hidden (view full) ---

363 } */ *ap;
364{
365 struct vnode *vp = ap->a_vp;
366
367 if (VTOFDESC(vp)->fd_type == Froot)
368 return (0);
369
370 /*
35 */
36
37/*
38 * /dev/fd Filesystem
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>

--- 320 unchanged lines hidden (view full) ---

363 } */ *ap;
364{
365 struct vnode *vp = ap->a_vp;
366
367 if (VTOFDESC(vp)->fd_type == Froot)
368 return (0);
369
370 /*
371 * XXX Kludge: set td->td_proc->p_dupfd to contain the value of the the file
371 * XXX Kludge: set td->td_proc->p_dupfd to contain the value of the file
372 * descriptor being sought for duplication. The error return ensures
373 * that the vnode for this device will be released by vn_open. Open
374 * will detect this special error and take the actions in dupfdopen.
375 * Other callers of vn_open or VOP_OPEN will simply report the
376 * error.
377 */
378 ap->a_td->td_dupfd = VTOFDESC(vp)->fd_fd; /* XXX */
379 return (ENODEV);

--- 201 unchanged lines hidden ---
372 * descriptor being sought for duplication. The error return ensures
373 * that the vnode for this device will be released by vn_open. Open
374 * will detect this special error and take the actions in dupfdopen.
375 * Other callers of vn_open or VOP_OPEN will simply report the
376 * error.
377 */
378 ap->a_td->td_dupfd = VTOFDESC(vp)->fd_fd; /* XXX */
379 return (ENODEV);

--- 201 unchanged lines hidden ---