svn commit: r209667 - stable/8/sys/kern

Konstantin Belousov kib at FreeBSD.org
Sat Jul 3 18:09:12 UTC 2010


Author: kib
Date: Sat Jul  3 18:09:11 2010
New Revision: 209667
URL: http://svn.freebsd.org/changeset/base/209667

Log:
  MFC r209105:
  When make_dev_credf(MAKEDEV_WAITOK) is called, use
  devctl_notify_f(M_WAITOK) for devfs notifications.

Modified:
  stable/8/sys/kern/kern_conf.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/kern/kern_conf.c
==============================================================================
--- stable/8/sys/kern/kern_conf.c	Sat Jul  3 17:57:59 2010	(r209666)
+++ stable/8/sys/kern/kern_conf.c	Sat Jul  3 18:09:11 2010	(r209667)
@@ -512,18 +512,18 @@ notify(struct cdev *dev, const char *ev,
 {
 	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);
 }
 


More information about the svn-src-stable-8 mailing list