pass the flag to fdclone.
This commit is contained in:
parent
7b10f1cabc
commit
be3704c73f
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_net.c,v 1.37 2004/11/30 04:25:43 christos Exp $ */
|
||||
/* $NetBSD: svr4_net.c,v 1.38 2005/02/12 23:14:03 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_net.c,v 1.37 2004/11/30 04:25:43 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_net.c,v 1.38 2005/02/12 23:14:03 christos Exp $");
|
||||
|
||||
#define COMPAT_SVR4 1
|
||||
|
||||
|
@ -211,7 +211,7 @@ svr4_netopen(dev, flag, mode, p)
|
|||
return error;
|
||||
}
|
||||
|
||||
error = fdclone(p, fp, fd, &svr4_netops, so);
|
||||
error = fdclone(p, fp, fd, flag, &svr4_netops, so);
|
||||
fp->f_type = DTYPE_SOCKET;
|
||||
(void)svr4_stream_get(fp);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dmover_io.c,v 1.16 2004/12/05 22:42:27 he Exp $ */
|
||||
/* $NetBSD: dmover_io.c,v 1.17 2005/02/12 23:14:03 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2003 Wasabi Systems, Inc.
|
||||
|
@ -55,7 +55,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dmover_io.c,v 1.16 2004/12/05 22:42:27 he Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dmover_io.c,v 1.17 2005/02/12 23:14:03 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/queue.h>
|
||||
|
@ -712,5 +712,5 @@ dmoverioopen(dev_t dev, int flag, int mode, struct proc *p)
|
|||
TAILQ_INIT(&ds->ds_pending);
|
||||
TAILQ_INIT(&ds->ds_complete);
|
||||
|
||||
return fdclone(p, fp, fd, &dmio_fileops, ds);
|
||||
return fdclone(p, fp, fd, flag, &dmio_fileops, ds);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_descrip.c,v 1.129 2005/01/14 00:25:12 cube Exp $ */
|
||||
/* $NetBSD: kern_descrip.c,v 1.130 2005/02/12 23:14:03 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.129 2005/01/14 00:25:12 cube Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.130 2005/02/12 23:14:03 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -1845,10 +1845,10 @@ fownsignal(pid_t pgid, int signo, int code, int band, void *fdescdata)
|
|||
}
|
||||
|
||||
int
|
||||
fdclone(struct proc *p, struct file *fp, int fd, const struct fileops *fops,
|
||||
void *data)
|
||||
fdclone(struct proc *p, struct file *fp, int fd, int flag,
|
||||
const struct fileops *fops, void *data)
|
||||
{
|
||||
fp->f_flag = FREAD | FWRITE;
|
||||
fp->f_flag = flag;
|
||||
fp->f_type = DTYPE_MISC;
|
||||
fp->f_ops = fops;
|
||||
fp->f_data = data;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_systrace.c,v 1.42 2004/11/30 04:25:43 christos Exp $ */
|
||||
/* $NetBSD: kern_systrace.c,v 1.43 2005/02/12 23:14:03 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002, 2003 Niels Provos <provos@citi.umich.edu>
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.42 2004/11/30 04:25:43 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.43 2005/02/12 23:14:03 christos Exp $");
|
||||
|
||||
#include "opt_systrace.h"
|
||||
|
||||
|
@ -572,7 +572,7 @@ systraceopen(dev_t dev, int flag, int mode, struct proc *p)
|
|||
fst->p_ruid = p->p_cred->p_ruid;
|
||||
fst->p_rgid = p->p_cred->p_rgid;
|
||||
|
||||
return fdclone(p, fp, fd, &systracefops, fst);
|
||||
return fdclone(p, fp, fd, flag, &systracefops, fst);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bpf.c,v 1.105 2004/11/30 04:28:43 christos Exp $ */
|
||||
/* $NetBSD: bpf.c,v 1.106 2005/02/12 23:14:03 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1991, 1993
|
||||
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.105 2004/11/30 04:28:43 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.106 2005/02/12 23:14:03 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -392,7 +392,7 @@ bpfopen(dev, flag, mode, p)
|
|||
|
||||
LIST_INSERT_HEAD(&bpf_list, d, bd_list);
|
||||
|
||||
return fdclone(p, fp, fd, &bpf_fileops, d);
|
||||
return fdclone(p, fp, fd, flag, &bpf_fileops, d);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_tap.c,v 1.4 2005/01/25 09:57:15 ragge Exp $ */
|
||||
/* $NetBSD: if_tap.c,v 1.5 2005/02/12 23:14:03 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003, 2004 The NetBSD Foundation.
|
||||
|
@ -43,7 +43,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.4 2005/01/25 09:57:15 ragge Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.5 2005/02/12 23:14:03 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "bpfilter.h"
|
||||
|
@ -709,7 +709,8 @@ tap_dev_cloner(struct proc *p)
|
|||
|
||||
sc->sc_flags |= TAP_INUSE;
|
||||
|
||||
return fdclone(p, fp, fd, &tap_fileops, (void *)(intptr_t)sc->sc_dev.dv_unit);
|
||||
return fdclone(p, fp, fd, FREAD|FWRITE, &tap_fileops,
|
||||
(void *)(intptr_t)sc->sc_dev.dv_unit);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: file.h,v 1.52 2004/12/18 08:43:08 christos Exp $ */
|
||||
/* $NetBSD: file.h,v 1.53 2005/02/12 23:14:03 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -169,7 +169,7 @@ int fsetown(struct proc *, pid_t *, int, const void *);
|
|||
int fgetown(struct proc *, pid_t, int, void *);
|
||||
void fownsignal(pid_t, int, int, int, void *);
|
||||
|
||||
int fdclone(struct proc *, struct file *, int, const struct fileops *,
|
||||
int fdclone(struct proc *, struct file *, int, int, const struct fileops *,
|
||||
void *);
|
||||
|
||||
/* Commonly used fileops */
|
||||
|
|
Loading…
Reference in New Issue