svn commit: r333635 - head/sys/compat/freebsd32
Brooks Davis
brooks at FreeBSD.org
Tue May 15 16:24:59 UTC 2018
Author: brooks
Date: Tue May 15 16:24:58 2018
New Revision: 333635
URL: https://svnweb.freebsd.org/changeset/base/333635
Log:
Allow freebsd32 __sysctl(2) to return ENOMEM.
This is required by programs like sockstat that read variably sized
sysctls such as kern.file. The normal path has no such restriction and
the restriction was added without comment along with initial support for
freebsd32 in 2002 (r100384).
Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15438
Modified:
head/sys/compat/freebsd32/freebsd32_misc.c
Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c Tue May 15 15:56:52 2018 (r333634)
+++ head/sys/compat/freebsd32/freebsd32_misc.c Tue May 15 16:24:58 2018 (r333635)
@@ -2263,7 +2263,7 @@ freebsd32_sysctl(struct thread *td, struct freebsd32_s
error = userland_sysctl(td, name, uap->namelen,
uap->old, &oldlen, 1,
uap->new, uap->newlen, &j, SCTL_MASK32);
- if (error && error != ENOMEM)
+ if (error)
return (error);
if (uap->oldlenp)
suword32(uap->oldlenp, j);
More information about the svn-src-head
mailing list