Determine the number of characters waiting to be read
#include <sys/dcmd_chr.h> #define DCMD_CHR_ISCHARS __DIOF('f', 127, unsigned) /* FIONREAD */
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_CHR_ISCHARS |
dev_data_ptr | A pointer to an unsigned |
n_bytes | sizeof(unsigned) |
dev_info_ptr | NULL |
This command determine the number of characters waiting to be read. It's also implemented as the FIONREAD ioctl() command.
None.
The number of characters.