how to implement ioctl ?
Aaron J. Grier
aaron at frye.com
Mon Dec 16 18:44:25 UTC 2002
On Mon, Dec 16, 2002 at 12:38:59PM +0100, Stan wrote:
> I don't use termios.
a shame. it's more portable that way.
> how to implement 'console_control' to do that:
>
> ioctl(fd, MY_MODE_SETTING, my_struct_for_setting);
> or
> ioctl(fd, MY_MODE_GETTING, my_struct_for_getting);
> ...
[snip]
> and in console.c :
>
> rtems_device_driver console_control( rtems_device_major_number major,
> rtems_device_minor_number minor, void* arg)
> {
rtems_libio_ioctl_args_t *ioctlargs = arg;
unsigned32 mode = ioctlargs->command;
passatruct_s *passastruct = ioctlargs->buffer;
> ...
> what to make here to recover the arguments?
> ...
>
> switch(mode){
look at rtems_libio_ioctl_args_t structure in src/lib/libc/libio.h .
--
Aaron J. Grier | Frye Electronics, Tigard, OR | aaron at frye.com
More information about the users
mailing list