diff options
-rw-r--r-- | sys/i386/ibcs2/ibcs2_sysi86.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/i386/ibcs2/ibcs2_sysi86.c b/sys/i386/ibcs2/ibcs2_sysi86.c index a5670bd..36d02f8 100644 --- a/sys/i386/ibcs2/ibcs2_sysi86.c +++ b/sys/i386/ibcs2/ibcs2_sysi86.c @@ -73,14 +73,16 @@ ibcs2_sysi86(struct proc *p, struct ibcs2_sysi86_args *args, int *retval) return EINVAL; case SETNAME: { /* set hostname given string w/ len <= 7 chars */ - int name; + int name[2]; int error; if ((error = suser(p->p_ucred, &p->p_acflag))) return (error); - name = KERN_HOSTNAME; - return (kern_sysctl(&name, 1, 0, 0, SCARG(args, arg), 7, p)); - } + name[0] = CTL_KERN; + name[1] = KERN_HOSTNAME; + return (userland_sysctl(p, name, 2, 0, 0, 0, + SCARG(args, arg), 7, 0)); + } case SI86_MEM: /* size of physical memory */ *retval = ctob(physmem); |