From owner-freebsd-current Fri Dec 19 12:11:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA14231 for current-outgoing; Fri, 19 Dec 1997 12:11:49 -0800 (PST) (envelope-from owner-freebsd-current) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA14220 for ; Fri, 19 Dec 1997 12:11:39 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id HAA25067; Sat, 20 Dec 1997 07:08:56 +1100 Date: Sat, 20 Dec 1997 07:08:56 +1100 From: Bruce Evans Message-Id: <199712192008.HAA25067@godzilla.zeta.org.au> To: bde@zeta.org.au, jlemon@americantv.com Subject: Re: cvs commit: src/sys/i386/linux linux.h linux_ioctl.c Cc: current@FreeBSD.ORG, gjp@erols.com, gjp@erols.net, hasty@rah.star-gate.com, pb@fasterix.freenix.org Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> 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 I thought is was for BSDI compatibility :-). >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? If sysarch() is good for anything, it is good for this. I'm not sure if it is. For sysarch(), the struct should have the same types as the Linux ioperm args, or maybe fixed-szied types. Note that the Linux emulator should do its own arg checking if it converts the args to a smaller type. It's easier to check everything at only one level. Bruce