mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
STABLE14-tiger-sysctl-20060117
FIXES 25327 implementation of sysctl for tiger (cherry picked from commit ebf35c3f884b40616700b4b0b2462731cda290ae)
This commit is contained in:
parent
eb72bfe0b2
commit
39b8b95820
@ -503,8 +503,23 @@ int afs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
|
||||
switch (name[2]) {
|
||||
case AFS_SC_DARWIN_ALL_REALMODES:
|
||||
#ifdef AFS_DARWIN80_ENV
|
||||
newlen;
|
||||
/* XXX complicated */
|
||||
if (oldp != USER_ADDR_NULL && oldlenp == NULL)
|
||||
return (EFAULT);
|
||||
if (oldp && *oldlenp < sizeof(u_int32_t))
|
||||
return (ENOMEM);
|
||||
if (newp && newlen != sizeof(u_int32_t))
|
||||
return (EINVAL);
|
||||
*oldlenp = sizeof(u_int32_t);
|
||||
if (oldp) {
|
||||
if ((error = copyout(&afs_darwin_realmodes,
|
||||
oldp, sizeof(u_int32_t)))) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
if (newp)
|
||||
return copyin(newp, &afs_darwin_realmodes,
|
||||
sizeof(u_int32_t));
|
||||
return 0;
|
||||
#else
|
||||
return sysctl_int(oldp, oldlenp, newp, newlen,
|
||||
&afs_darwin_realmodes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user