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