Name

comedi_fileno — get file descriptor for open Comedilib device

Synopsis

#include <comedilib.h>
int comedi_fileno(comedi_t * device);
 

Description

The function comedi_fileno returns the file descriptor for the device device. This descriptor can then be used as the file descriptor parameter of read, write, etc. This function is intended to mimic the standard C library function fileno.

The returned file descriptor should not be closed, and will become invalid when comedi_close is called on device.

Return value

A file descriptor, or -1 on error.