The version comparison is an overkill and potentially wrong since whatever is implementing /dev/cons may decide to update the version each write, as is our practice in other places. That should work in general as long as the namespace hasn't been changed twixt the opening of the fd and the dirstat. Otherwise /dev/cons may be under a different mount point number and hence a different c.dev. The question isatty is usually trying to answer is "does the fd has an interacting user behind it?". A hard question to answer in a world where the geography can shift so easily.