diff options
author | kib <kib@FreeBSD.org> | 2010-06-12 13:21:25 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-06-12 13:21:25 +0000 |
commit | 9e98593ebc5fa55b58e828b7f0b743e801532ca6 (patch) | |
tree | 9ffaa78011b7fc77dcbf99a17800c599be696e63 /sys | |
parent | 2605a178f6cbf6e7cfb6b504bb08b984305a055d (diff) | |
download | FreeBSD-src-9e98593ebc5fa55b58e828b7f0b743e801532ca6.zip FreeBSD-src-9e98593ebc5fa55b58e828b7f0b743e801532ca6.tar.gz |
When make_dev_credf(MAKEDEV_WAITOK) is called, use
devctl_notify_f(M_WAITOK) for devfs notifications.
Suggested by: jh
Reviewed by: imp, jh
MFC after: 3 weeks
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_conf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 17a6827..e499407 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -509,18 +509,18 @@ notify(struct cdev *dev, const char *ev, int flags) { static const char prefix[] = "cdev="; char *data; - int namelen; + int namelen, mflags; if (cold) return; + mflags = (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK; namelen = strlen(dev->si_name); - data = malloc(namelen + sizeof(prefix), M_TEMP, - (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK); + data = malloc(namelen + sizeof(prefix), M_TEMP, mflags); if (data == NULL) return; memcpy(data, prefix, sizeof(prefix) - 1); memcpy(data + sizeof(prefix) - 1, dev->si_name, namelen + 1); - devctl_notify("DEVFS", "CDEV", ev, data); + devctl_notify_f("DEVFS", "CDEV", ev, data, mflags); free(data, M_TEMP); } |