Re: Weirdness in TTY & VT

2016-09-08 Thread Lundberg, Johannes
Thanks for the feedback. I solved it by asking for next free vt (#nr) and then simply opening /dev/ttyv[#nr+1]. On Thu, Sep 8, 2016 at 10:36 AM, Jilles Tjoelker wrote: > On Fri, Sep 02, 2016 at 05:12:12PM -0700, Lundberg, Johannes wrote: > > I'm porting some Linux code and have some weird behav

Re: Weirdness in TTY & VT

2016-09-08 Thread Jilles Tjoelker
On Fri, Sep 02, 2016 at 05:12:12PM -0700, Lundberg, Johannes wrote: > I'm porting some Linux code and have some weird behavior. > In this (Linux) code fstat() and minor() is used on a /dev/tty file > descriptor to get a tty number to map to. In FreeBSD this returns a number > around 60-70 for st_r

Re: Weirdness in TTY & VT

2016-09-03 Thread Edward Tomasz Napierała
On 0902T1712, Lundberg, Johannes wrote: > ​Hi > > I'm porting some Linux code and have some weird behavior. > > In this (Linux) code fstat() and minor() is used on a /dev/tty file > descriptor to get a tty number to map to. In FreeBSD this returns a number > around 60-70 for st_rdev which means V

Weirdness in TTY & VT

2016-09-02 Thread Lundberg, Johannes
​Hi I'm porting some Linux code and have some weird behavior. In this (Linux) code fstat() and minor() is used on a /dev/tty file descriptor to get a tty number to map to. In FreeBSD this returns a number around 60-70 for st_rdev which means VT_ACTIVATE ioctl call will fail because it only allows