| 146 | } |
| 147 | |
| 148 | PTY::PTY(const char* name) : masterFile(name), slaveFile(name){ |
| 149 | slaveFile.flags = FS_NODE_CHARDEVICE; |
| 150 | |
| 151 | master.ignoreBackspace = true; |
| 152 | slave.ignoreBackspace = false; |
| 153 | master.Flush(); |
| 154 | slave.Flush(); |
| 155 | tios.c_lflag = ECHO | ICANON; |
| 156 | |
| 157 | masterFile.pty = this; |
| 158 | masterFile.device = PTYMasterDevice; |
| 159 | |
| 160 | slaveFile.pty = this; |
| 161 | slaveFile.device = PTYSlaveDevice; |
| 162 | |
| 163 | for(int i = 0; i < NCCS; i++) tios.c_cc[i] = c_cc_default[i]; |
| 164 | |
| 165 | DeviceManager::RegisterDevice(slaveFile); |
| 166 | |
| 167 | ptys->add_back(this); |
| 168 | } |
| 169 | |
| 170 | size_t PTY::Master_Read(char* buffer, size_t count){ |
| 171 | return master.Read(buffer, count); |
nothing calls this directly
no test coverage detected