Lines Matching refs:vt_num
40 unsigned long vt_num;
70 ret = ioctl(fd, VT_OPENQRY, (int *)&TT.vt_num);
71 if (ret != 0 || TT.vt_num <= 0) perror_exit("can't find open VT");
73 return TT.vt_num;
98 sprintf(toybuf, "/dev/tty%lu", TT.vt_num);
105 ioctl(vt_fd, VT_ACTIVATE, TT.vt_num);
106 ioctl(vt_fd, VT_WAITACTIVE, TT.vt_num);
130 xioctl(fd, VT_DISALLOCATE, (void *)(ptrdiff_t)TT.vt_num);
137 long vt_num = 0; // 0 deallocates all unused consoles
140 if (*toys.optargs) vt_num = atolx_range(*toys.optargs, 1, 63);
143 xioctl(fd, VT_DISALLOCATE, (void *)vt_num);