RTEMS Logo

RTEMS 4.9.4 On-Line Library


device_ioctl() for Devices

PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

6.4.4.5: device_ioctl() for Devices

Corresponding Structure Element:

ioctl

Arguments:

rtems_libio_t     *iop,
unsigned32         command,
void              *buffer

File:

deviceio.c

Description:

This handler will obtain status information about a device.

The form of status is device dependent.

The rtems_io_control() function uses the major and minor number of the device to obtain the status information.

rtems_io_control() requires an rtems_libio_ioctl_args_t argument list which contains the file control block, device specific command and a buffer pointer to return the device status information.

The device specific command should indicate the nature of the information that is desired from the device.

After the rtems_io_control() is processed, the buffer should contain the requested device information.

If the device information is not obtained properly a -1 will be returned to the calling program, otherwise the ioctl_return value is returned.


PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

Copyright © 1988-2008 OAR Corporation