next up previous contents index
Next: 30.5.2 oskit_freebsd_xlate_errno: Translate a Up: 30.5 ``Back door'' Interfaces Previous: 30.5 ``Back door'' Interfaces

30.5.1 oskit_freebsd_chardev_open: Open a character device using a FreeBSD major/minor device value

 

SYNOPSIS

#include <oskit/dev/freebsd.h>

oskit_error_t oskit_freebsd_chardev_open(int major, int minor, int flags, [out] oskit_ttystream_t **tty_stream);

DIRECTION

OS tex2html_wrap_inline32841 Component

DESCRIPTION

Opens a character device given a FreeBSD major and minor device value. Returns a pointer to an oskit_ttystream_t interface as though oskit_ttydev_open was called on an OSKit oskit_ttydev_t interface.

PARAMETERS

major
Major device number. In FreeBSD, this is the index of the device in the character device switch.
minor
Minor device number. In FreeBSD, the interpretation of the minor device number is device specific.
flags
POSIX open flags.
tty_stream
Returned oskit_ttystream_t interface.

RETURNS

Returns 0 on success, an error from <oskit/dev/error.h> otherwise.



University of Utah Flux Research Group