whitespace change:

clarify the role of MAKEDEV_ETERNAL_KLD, and remove an old
#ifdef __FreeBSD__ since the code is valid on all platforms.
This commit is contained in:
Luigi Rizzo 2015-02-14 18:59:31 +00:00
parent 8e6dd301f0
commit c929ca72c9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=278773

View File

@ -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;