#include <oskit/dev/freebsd.h>oskit_error_t oskit_freebsd_chardev_open(int major, int minor, int flags, [out] oskit_ttystream_t **tty_stream);
OS Component
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.
- 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 0 on success, an error from <oskit/dev/error.h> otherwise.