Module Name:    src
Committed By:   pooka
Date:           Thu Jan  7 21:09:01 UTC 2016

Modified Files:
        src/sys/rump/kern/lib/libtty: tty_component.c

Log Message:
Initialize non-VFS parts of tty subsystem already at RUMP_COMPONENT_KERN.

That way components under RUMP__FACTION_DEV can call tty routines.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libtty/tty_component.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/kern/lib/libtty/tty_component.c
diff -u src/sys/rump/kern/lib/libtty/tty_component.c:1.2 src/sys/rump/kern/lib/libtty/tty_component.c:1.3
--- src/sys/rump/kern/lib/libtty/tty_component.c:1.2	Thu Aug 20 11:59:16 2015
+++ src/sys/rump/kern/lib/libtty/tty_component.c	Thu Jan  7 21:09:01 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty_component.c,v 1.2 2015/08/20 11:59:16 christos Exp $	*/
+/*	$NetBSD: tty_component.c,v 1.3 2016/01/07 21:09:01 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty_component.c,v 1.2 2015/08/20 11:59:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_component.c,v 1.3 2016/01/07 21:09:01 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -38,6 +38,15 @@ __KERNEL_RCSID(0, "$NetBSD: tty_componen
 
 #include "ioconf.h"
 
+RUMP_COMPONENT(RUMP_COMPONENT_KERN)
+{
+
+	tty_init();
+	ttyldisc_init();
+
+	rump_ttycomponent = true;
+}
+
 RUMP_COMPONENT(RUMP_COMPONENT_KERN_VFS)
 {
 	extern const struct cdevsw ctty_cdevsw, ptc_cdevsw, pts_cdevsw;
@@ -64,10 +73,5 @@ RUMP_COMPONENT(RUMP_COMPONENT_KERN_VFS)
 	FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/ptmx", cmaj, 0));
 	FLAWLESSCALL(rump_vfs_makeonedevnode(S_IFCHR, "/dev/ptm", cmaj, 1));
 
-	tty_init();
-	ttyldisc_init();
-
 	ptyattach(1);
-
-	rump_ttycomponent = true;
 }

Reply via email to