Get the size of a character device
#include <sys/dcmd_chr.h> #define DCMD_CHR_GETSIZE __DIOF(_CMD_IOCTL_TTY, 104, struct winsize) /* TIOCGWINSZ */
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_CHR_GETSIZE |
dev_data_ptr | A pointer to a struct winsize (see below) |
n_bytes | sizeof(struct winsize) |
dev_info_ptr | NULL |
This command gets the size of a character device. It's also implemented as the TIOCGSIZE or TIOCGWINSZ ioctl() command.
None.
The winsize structure is defined in <sys/ioctl.h> as follows:
struct winsize { unsigned short ws_row; unsigned short ws_col; unsigned short ws_xpixel; unsigned short ws_ypixel; };
DCMD_CHR_SETSIZE, TIOCGSIZE, TIOCGWINSZ
devctl(), tcgetsize() in the QNX Neutrino C Library Reference