summaryrefslogtreecommitdiff
path: root/init/init.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-03-21 16:49:37 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-03-21 16:49:37 +0000
commita01de8fee1fa47ef4893d2017ac8c390c3c08a00 (patch)
tree1800bcce718f95f8bf046e205947923067c4240c /init/init.cpp
parent5b8ab65123726f358d1e88d8b996119ca056103f (diff)
parent70daa67062c016eea1a30be2e1de0dcba1d23a13 (diff)
Merge "Multiple consoles"
Diffstat (limited to 'init/init.cpp')
-rw-r--r--init/init.cpp33
1 files changed, 2 insertions, 31 deletions
diff --git a/init/init.cpp b/init/init.cpp
index bac27df88..9b7d10881 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -74,8 +74,7 @@ static int property_triggers_enabled = 0;
static char qemu[32];
-int have_console;
-std::string console_name = "/dev/console";
+std::string default_console = "/dev/console";
static time_t process_needs_restart;
const char *ENV[32];
@@ -300,36 +299,8 @@ static int console_init_action(const std::vector<std::string>& args)
{
std::string console = property_get("ro.boot.console");
if (!console.empty()) {
- console_name = "/dev/" + console;
- }
-
- int fd = open(console_name.c_str(), O_RDWR | O_CLOEXEC);
- if (fd >= 0)
- have_console = 1;
- close(fd);
-
- fd = open("/dev/tty0", O_WRONLY | O_CLOEXEC);
- if (fd >= 0) {
- const char *msg;
- msg = "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- "\n" // console is 40 cols x 30 lines
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- "\n"
- " A N D R O I D ";
- write(fd, msg, strlen(msg));
- close(fd);
+ default_console = "/dev/" + console;
}
-
return 0;
}