| Updated: October 28, 2024 |
Get information about a terminal device
#include <sys/dcmd_chr.h> #define DCMD_CHR_TTYINFO __DIOF(_DCMD_CHR, 10, struct _ttyinfo)
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening the device. |
| dcmd | DCMD_CHR_TTYINFO |
| dev_data_ptr | A pointer to a struct _ttyinfo (see below) |
| n_bytes | sizeof(struct _ttyinfo) |
| dev_info_ptr | NULL |
This command obtains information about a terminal device. It returns the name of the device associated with its file descriptor, and the number of clients that have an open file descriptor to this terminal device.
None.
A filled-in _ttyinfo structure:
struct _ttyinfo {
int opencount;
char ttyname[32];
};
devctl() in the QNX Neutrino C Library Reference