mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-09 16:01:19 +01:00
Check if module was compiled without SMP support and running on
an SMP system.
This commit is contained in:
parent
6cca21b14d
commit
1e77d7a17d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56034
@ -411,7 +411,16 @@ nwfs_quotactl(mp, cmd, uid, arg, p)
|
||||
int
|
||||
nwfs_init(struct vfsconf *vfsp)
|
||||
{
|
||||
#ifndef SMP
|
||||
int name[2];
|
||||
int olen, ncpu, plen, error;
|
||||
|
||||
name[0] = CTL_HW;
|
||||
name[1] = HW_NCPU;
|
||||
error = kernel_sysctl(curproc, name, 2, &ncpu, &olen, NULL, 0, &plen);
|
||||
if (error == 0 && ncpu > 1)
|
||||
printf("warning: nwfs module compiled without SMP support.");
|
||||
#endif
|
||||
nwfs_hash_init();
|
||||
nwfs_pbuf_freecnt = nswbuf / 2 + 1;
|
||||
NCPVODEBUG("always happy to load!\n");
|
||||
|
@ -411,7 +411,16 @@ nwfs_quotactl(mp, cmd, uid, arg, p)
|
||||
int
|
||||
nwfs_init(struct vfsconf *vfsp)
|
||||
{
|
||||
#ifndef SMP
|
||||
int name[2];
|
||||
int olen, ncpu, plen, error;
|
||||
|
||||
name[0] = CTL_HW;
|
||||
name[1] = HW_NCPU;
|
||||
error = kernel_sysctl(curproc, name, 2, &ncpu, &olen, NULL, 0, &plen);
|
||||
if (error == 0 && ncpu > 1)
|
||||
printf("warning: nwfs module compiled without SMP support.");
|
||||
#endif
|
||||
nwfs_hash_init();
|
||||
nwfs_pbuf_freecnt = nswbuf / 2 + 1;
|
||||
NCPVODEBUG("always happy to load!\n");
|
||||
|
Loading…
Reference in New Issue
Block a user