svn commit: r278773 - head/sys/dev/netmap
Luigi Rizzo
luigi at FreeBSD.org
Sat Feb 14 18:59:32 UTC 2015
Author: luigi
Date: Sat Feb 14 18:59:31 2015
New Revision: 278773
URL: https://svnweb.freebsd.org/changeset/base/278773
Log:
whitespace change:
clarify the role of MAKEDEV_ETERNAL_KLD, and remove an old
#ifdef __FreeBSD__ since the code is valid on all platforms.
Modified:
head/sys/dev/netmap/netmap.c
Modified: head/sys/dev/netmap/netmap.c
==============================================================================
--- head/sys/dev/netmap/netmap.c Sat Feb 14 18:57:02 2015 (r278772)
+++ head/sys/dev/netmap/netmap.c Sat Feb 14 18:59:31 2015 (r278773)
@@ -3071,16 +3071,14 @@ netmap_init(void)
error = netmap_mem_init();
if (error != 0)
goto fail;
- /* XXX could use make_dev_credv() to get error number */
-#ifdef __FreeBSD__
- /* support for the 'eternal' flag */
+ /*
+ * MAKEDEV_ETERNAL_KLD avoids an expensive check on syscalls
+ * when the module is compiled in.
+ * XXX could use make_dev_credv() to get error number
+ */
netmap_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD,
&netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0600,
"netmap");
-#else
- netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
- "netmap");
-#endif
if (!netmap_dev)
goto fail;
More information about the svn-src-head
mailing list