summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire
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/dev/firewire
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/dev/firewire')
-rw-r--r--sys/dev/firewire/firewirereg.h2
-rw-r--r--sys/dev/firewire/fwdev.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h
index 3b991ea..4061b8b 100644
--- a/sys/dev/firewire/firewirereg.h
+++ b/sys/dev/firewire/firewirereg.h
@@ -303,7 +303,7 @@ struct fw_bind *fw_bindlookup (struct firewire_comm *, uint16_t, uint32_t);
void fw_drain_txq (struct firewire_comm *);
int fwdev_makedev (struct firewire_softc *);
int fwdev_destroydev (struct firewire_softc *);
-void fwdev_clone (void *, char *, int, struct cdev **);
+void fwdev_clone (void *, struct ucred *, char *, int, struct cdev **);
extern int firewire_debug;
extern devclass_t firewire_devclass;
diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c
index ecd56c4..e42c30a 100644
--- a/sys/dev/firewire/fwdev.c
+++ b/sys/dev/firewire/fwdev.c
@@ -840,7 +840,8 @@ fwdev_destroydev(struct firewire_softc *sc)
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
#define NDEVTYPE 2
void
-fwdev_clone(void *arg, char *name, int namelen, struct cdev **dev)
+fwdev_clone(void *arg, struct ucred *cred, char *name, int namelen,
+ struct cdev **dev)
{
struct firewire_softc *sc;
char *devnames[NDEVTYPE] = {"fw", "fwmem"};
OpenPOWER on IntegriCloud