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/dev/snp/snp.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/dev/snp/snp.c')
-rw-r--r-- | sys/dev/snp/snp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 8be2b19..3e190c7 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -114,7 +114,7 @@ static LIST_HEAD(, snoop) snp_sclist = LIST_HEAD_INITIALIZER(&snp_sclist); static struct clonedevs *snpclones; static struct tty *snpdevtotty(struct cdev *dev); -static void snp_clone(void *arg, char *name, +static void snp_clone(void *arg, struct ucred *cred, char *name, int namelen, struct cdev **dev); static int snp_detach(struct snoop *snp); static int snp_down(struct snoop *snp); @@ -627,8 +627,9 @@ snppoll(dev, events, td) } static void -snp_clone(arg, name, namelen, dev) +snp_clone(arg, cred, name, namelen, dev) void *arg; + struct ucred *cred; char *name; int namelen; struct cdev **dev; |