summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-08-08 19:55:32 +0000
committerrwatson <rwatson@FreeBSD.org>2005-08-08 19:55:32 +0000
commitdaa1c89f450d2c308009c125db1d28bbd9c044fa (patch)
treed655c312aefcf63bff80cd1977af84d2c685fd16 /sys/net/bpf.c
parent540e708ef59e78a3e053a16463d855a75422f2bc (diff)
downloadFreeBSD-src-daa1c89f450d2c308009c125db1d28bbd9c044fa.zip
FreeBSD-src-daa1c89f450d2c308009c125db1d28bbd9c044fa.tar.gz
Merge the dev_clone and dev_clone_cred event handlers into a single
event handler, dev_clone, which accepts a credential argument. Implementors of the event can ignore it if they're not interested, and most do. This avoids having multiple event handler types and fall-back/precedence logic in devfs. This changes the kernel API for /dev cloning, and may affect third party packages containg cloning kernel modules. Requested by: phk MFC after: 3 days
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r--sys/net/bpf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index c42ea81..9ae3a96 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -108,7 +108,7 @@ static int bpf_setdlt(struct bpf_d *, u_int);
static void filt_bpfdetach(struct knote *);
static int filt_bpfread(struct knote *, long);
static void bpf_drvinit(void *);
-static void bpf_clone(void *, char *, int, struct cdev **);
+static void bpf_clone(void *, struct ucred *, char *, int, struct cdev **);
static int bpf_stats_sysctl(SYSCTL_HANDLER_ARGS);
/*
@@ -1614,8 +1614,9 @@ bpf_setdlt(d, dlt)
}
static void
-bpf_clone(arg, name, namelen, dev)
+bpf_clone(arg, cred, name, namelen, dev)
void *arg;
+ struct ucred *cred;
char *name;
int namelen;
struct cdev **dev;
OpenPOWER on IntegriCloud