Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/MyPty.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp index 23d4966..b2f6a74 100644 --- a/noncore/apps/opie-console/MyPty.cpp +++ b/noncore/apps/opie-console/MyPty.cpp | |||
@@ -205,16 +205,16 @@ int MyPty::openPty() | |||
205 | { | 205 | { |
206 | // This is code from the Qt DumbTerminal example | 206 | // This is code from the Qt DumbTerminal example |
207 | int ptyfd = -1; | 207 | int ptyfd = -1; |
208 | 208 | ||
209 | #ifdef HAVE_OPENPTY | 209 | #ifdef HAVE_OPENPTY |
210 | int ttyfd; | 210 | int ttyfd; |
211 | if ( openpty(&ptyfd,&ttyfd,ttynam,0,0) ) | 211 | if ( openpty(&ptyfd,&ttyfd,m_ttynam,0,0) ) |
212 | ptyfd = -1; | 212 | ptyfd = -1; |
213 | else | 213 | else |
214 | close(ttyfd); // we open the ttynam ourselves. | 214 | ::close(ttyfd); // we open the ttynam ourselves. |
215 | #else | 215 | #else |
216 | for (const char* c0 = "pqrstuvwxyzabcde"; ptyfd < 0 && *c0 != 0; c0++) { | 216 | for (const char* c0 = "pqrstuvwxyzabcde"; ptyfd < 0 && *c0 != 0; c0++) { |
217 | for (const char* c1 = "0123456789abcdef"; ptyfd < 0 && *c1 != 0; c1++) { | 217 | for (const char* c1 = "0123456789abcdef"; ptyfd < 0 && *c1 != 0; c1++) { |
218 | sprintf(m_ptynam,"/dev/pty%c%c",*c0,*c1); | 218 | sprintf(m_ptynam,"/dev/pty%c%c",*c0,*c1); |
219 | sprintf(m_ttynam,"/dev/tty%c%c",*c0,*c1); | 219 | sprintf(m_ttynam,"/dev/tty%c%c",*c0,*c1); |
220 | if ((ptyfd = ::open(m_ptynam,O_RDWR)) >= 0) { | 220 | if ((ptyfd = ::open(m_ptynam,O_RDWR)) >= 0) { |