DCMD_CHR_GETSIZE

Get the size of a character device

Synopsis:

#include <sys/dcmd_chr.h>

#define DCMD_CHR_GETSIZE   __DIOF(_CMD_IOCTL_TTY, 104, struct winsize)    /* TIOCGWINSZ */

Arguments to devctl():

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

Description:

This command gets the size of a character device. It's also implemented as the TIOCGSIZE or TIOCGWINSZ ioctl() command.

Note: This command is for internal use, and you shouldn't use it directly. Instead use the tcgetsize() cover function.

Input:

None.

Output:

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; 
};

See also:

DCMD_CHR_SETSIZE, TIOCGSIZE, TIOCGWINSZ

devctl(), tcgetsize() in the QNX Neutrino C Library Reference