| 105 | } |
| 106 | |
| 107 | U32 DevTTY::writeNative(U8* buffer, U32 len) { |
| 108 | BString s = BString::copy((char*)buffer, len); |
| 109 | // winemenubuilder was removed because it is not necessary and this will speed up start time |
| 110 | if (s.contains("winemenubuilder")) { |
| 111 | return len; |
| 112 | } |
| 113 | // for now I don't want users seeing this and assuming its a problem |
| 114 | if (s.contains("WS_getaddrinfo Failed to resolve your host name IP")) { |
| 115 | return len; |
| 116 | } |
| 117 | if (s.contains("winebus")) { |
| 118 | return len; |
| 119 | } |
| 120 | if (KSystem::logFile.isOpen()) { |
| 121 | KSystem::logFile.write((char*)buffer, len); |
| 122 | } |
| 123 | if (KSystem::watchTTY) { |
| 124 | KSystem::watchTTY(s); |
| 125 | } |
| 126 | if (KSystem::ttyPrepend) { |
| 127 | thread_local static bool newLine = true; |
| 128 | if (newLine) { |
| 129 | static_cast<void>(::write(1, "TTY:", 4)); |
| 130 | BString name = KThread::currentThread()->process->name; |
| 131 | static_cast<void>(::write(1, name.c_str(), (U32)name.length())); |
| 132 | static_cast<void>(::write(1, ":", 1)); |
| 133 | newLine = false; |
| 134 | } |
| 135 | if (buffer[len - 1] == '\n') { |
| 136 | newLine = true; |
| 137 | } |
| 138 | } |
| 139 | return (U32)::write(1, buffer, len); |
| 140 | } |
| 141 | |
| 142 | |
| 143 | U32 DevTTY::ioctl(KThread* thread, U32 request) { |