diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-08-08 19:55:32 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-08-08 19:55:32 +0000 |
commit | daa1c89f450d2c308009c125db1d28bbd9c044fa (patch) | |
tree | d655c312aefcf63bff80cd1977af84d2c685fd16 /sys/net/if_tun.c | |
parent | 540e708ef59e78a3e053a16463d855a75422f2bc (diff) | |
download | FreeBSD-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/if_tun.c')
-rw-r--r-- | sys/net/if_tun.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 4c23fa8..d9c31e2 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -107,7 +107,8 @@ static struct clonedevs *tunclones; static TAILQ_HEAD(,tun_softc) tunhead = TAILQ_HEAD_INITIALIZER(tunhead); SYSCTL_INT(_debug, OID_AUTO, if_tun_debug, CTLFLAG_RW, &tundebug, 0, ""); -static void tunclone(void *arg, char *name, int namelen, struct cdev **dev); +static void tunclone(void *arg, struct ucred *cred, char *name, + int namelen, struct cdev **dev); static void tuncreate(struct cdev *dev); static int tunifioctl(struct ifnet *, u_long, caddr_t); static int tuninit(struct ifnet *); @@ -136,7 +137,8 @@ static struct cdevsw tun_cdevsw = { }; static void -tunclone(void *arg, char *name, int namelen, struct cdev **dev) +tunclone(void *arg, struct ucred *cred, char *name, int namelen, + struct cdev **dev) { int u, i; |