From owner-freebsd-current Fri Dec 19 11:14:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA09825 for current-outgoing; Fri, 19 Dec 1997 11:14:51 -0800 (PST) (envelope-from owner-freebsd-current) Received: from sumatra.americantv.com (sumatra.americantv.com [207.170.17.37]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA09816 for ; Fri, 19 Dec 1997 11:14:42 -0800 (PST) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id NAA07909; Fri, 19 Dec 1997 13:13:09 -0600 (CST) Received: (from jlemon@localhost) by right.PCS (8.6.13/8.6.4) id NAA25797; Fri, 19 Dec 1997 13:12:37 -0600 Message-ID: <19971219131237.61997@right.PCS> Date: Fri, 19 Dec 1997 13:12:37 -0600 From: Jonathan Lemon To: Bruce Evans Cc: hasty@rah.star-gate.com, pb@fasterix.freenix.org, current@FreeBSD.ORG, gjp@erols.com, gjp@erols.net Subject: Re: cvs commit: src/sys/i386/linux linux.h linux_ioctl.c References: <199712191232.XAA12685@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: <199712191232.XAA12685@godzilla.zeta.org.au>; from Bruce Evans on Dec 12, 1997 at 11:32:20PM +1100 Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Dec 12, 1997 at 11:32:20PM +1100, Bruce Evans wrote: > That's not what Linux ioperm does. Linux ioperm sets or clears bits in > the i/o permissions bitmap. It is like FreeBSD ioperm except it has a > cleaner interface and is presumably less buggy. FreeBSD ioperm is not > completely implemented. It is only available if the kernel was configured > with `options "VM86"'. It is a subcall of sysarch(undocumented). You > have to pass it a pointer to a poorly laid out struct giving the args, > something like this: > > Linux: int ioperm(u_long from, u_long num, int turn_on); > FreeBSD: struct i386_ioperm_args { u_short from, num; u_char turn_on; } foo; > sysarch(I386_SET_IOPERM, /* XXX 1970's interface */ (char *)&foo); Heh. I never claimed to be a wonderful interface designer. I guess it comes from working too much with SysV during the daytime. Would you care to submit a better interface? Should it be upgraded to a full system call instead of a sysarch() call? -- Jonathan