Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Dec 1997 07:08:56 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, jlemon@americantv.com
Cc:        current@FreeBSD.ORG, gjp@erols.com, gjp@erols.net, hasty@rah.star-gate.com, pb@fasterix.freenix.org
Subject:   Re: cvs commit: src/sys/i386/linux linux.h linux_ioctl.c
Message-ID:  <199712192008.HAA25067@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712192008.HAA25067>