diff options
Diffstat (limited to 'init/init.cpp')
-rw-r--r-- | init/init.cpp | 33 |
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; } |