[PATCH] Revert "tty: Use /dev/tty instead of tty0"

Tiago Vignatti tiago.vignatti at intel.com
Fri Aug 19 05:12:07 PDT 2011


Both /dev/tty0 and /dev/tty fd reads the current virtual console. In
practice, the only difference I see is when I use a remote terminal for
development and tty reads the local machine console, whereas tty0
forwards the read to the remote one, behaving as I wished. I had this
error using tty, which makes the console useless until I reset it:
"failed to set KD_GRAPHICS mode on tty: Invalid argument"

Xorg is using tty0 as well and I bet users are happy with that for
awhile. I don't see any improvement on using tty, thus this reverts
commit c1ace8c465079b8d5fc8f60ba9f0f5078de62cfe.
---
 compositor/tty.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compositor/tty.c b/compositor/tty.c
index e74f0eb..229bd7e 100644
--- a/compositor/tty.c
+++ b/compositor/tty.c
@@ -104,7 +104,7 @@ tty_create(struct wlsc_compositor *compositor, tty_vt_func_t vt_func)
 	memset(tty, 0, sizeof *tty);
 	tty->compositor = compositor;
 	tty->vt_func = vt_func;
-	tty->fd = open("/dev/tty", O_RDWR | O_NOCTTY);
+	tty->fd = open("/dev/tty0", O_RDWR | O_NOCTTY);
 	if (tty->fd <= 0) {
 		fprintf(stderr, "failed to open active tty: %m\n");
 		return NULL;
-- 
1.7.2.2



More information about the wayland-devel mailing list