summaryrefslogtreecommitdiff
path: root/ttymodes.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-25 05:24:16 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-25 05:24:16 +0000
commit491bbb811a2983cc98beb788d845066f54ba9d3c (patch)
treedde3200c17e069ea4f08950ac1e01131a811ce55 /ttymodes.c
parent126c56ad9e54ab6149f6e8c147d53a7b87c01256 (diff)
- markus@cvs.openbsd.org 2001/06/24 17:18:31
[ttymodes.c] passing modes works fine: debug2->3
Diffstat (limited to 'ttymodes.c')
-rw-r--r--ttymodes.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ttymodes.c b/ttymodes.c
index 6124cb4b1..c0bb0b1f8 100644
--- a/ttymodes.c
+++ b/ttymodes.c
@@ -43,7 +43,7 @@
43 */ 43 */
44 44
45#include "includes.h" 45#include "includes.h"
46RCSID("$OpenBSD: ttymodes.c,v 1.13 2001/04/15 01:35:22 stevesk Exp $"); 46RCSID("$OpenBSD: ttymodes.c,v 1.14 2001/06/24 17:18:31 markus Exp $");
47 47
48#include "packet.h" 48#include "packet.h"
49#include "log.h" 49#include "log.h"
@@ -275,22 +275,22 @@ tty_make_modes(int fd, struct termios *tiop)
275 275
276 /* Store input and output baud rates. */ 276 /* Store input and output baud rates. */
277 baud = speed_to_baud(cfgetospeed(&tio)); 277 baud = speed_to_baud(cfgetospeed(&tio));
278 debug2("tty_make_modes: ospeed %d", baud); 278 debug3("tty_make_modes: ospeed %d", baud);
279 buffer_put_char(&buf, tty_op_ospeed); 279 buffer_put_char(&buf, tty_op_ospeed);
280 buffer_put_int(&buf, baud); 280 buffer_put_int(&buf, baud);
281 baud = speed_to_baud(cfgetispeed(&tio)); 281 baud = speed_to_baud(cfgetispeed(&tio));
282 debug2("tty_make_modes: ispeed %d", baud); 282 debug3("tty_make_modes: ispeed %d", baud);
283 buffer_put_char(&buf, tty_op_ispeed); 283 buffer_put_char(&buf, tty_op_ispeed);
284 buffer_put_int(&buf, baud); 284 buffer_put_int(&buf, baud);
285 285
286 /* Store values of mode flags. */ 286 /* Store values of mode flags. */
287#define TTYCHAR(NAME, OP) \ 287#define TTYCHAR(NAME, OP) \
288 debug2("tty_make_modes: %d %d", OP, tio.c_cc[NAME]); \ 288 debug3("tty_make_modes: %d %d", OP, tio.c_cc[NAME]); \
289 buffer_put_char(&buf, OP); \ 289 buffer_put_char(&buf, OP); \
290 put_arg(&buf, tio.c_cc[NAME]); 290 put_arg(&buf, tio.c_cc[NAME]);
291 291
292#define TTYMODE(NAME, FIELD, OP) \ 292#define TTYMODE(NAME, FIELD, OP) \
293 debug2("tty_make_modes: %d %d", OP, ((tio.FIELD & NAME) != 0)); \ 293 debug3("tty_make_modes: %d %d", OP, ((tio.FIELD & NAME) != 0)); \
294 buffer_put_char(&buf, OP); \ 294 buffer_put_char(&buf, OP); \
295 put_arg(&buf, ((tio.FIELD & NAME) != 0)); 295 put_arg(&buf, ((tio.FIELD & NAME) != 0));
296 296
@@ -326,7 +326,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
326 326
327 if (compat20) { 327 if (compat20) {
328 *n_bytes_ptr = packet_get_int(); 328 *n_bytes_ptr = packet_get_int();
329 debug2("tty_parse_modes: SSH2 n_bytes %d", *n_bytes_ptr); 329 debug3("tty_parse_modes: SSH2 n_bytes %d", *n_bytes_ptr);
330 if (*n_bytes_ptr == 0) 330 if (*n_bytes_ptr == 0)
331 return; 331 return;
332 get_arg = packet_get_int; 332 get_arg = packet_get_int;
@@ -358,7 +358,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
358 case TTY_OP_ISPEED_PROTO2: 358 case TTY_OP_ISPEED_PROTO2:
359 n_bytes += 4; 359 n_bytes += 4;
360 baud = packet_get_int(); 360 baud = packet_get_int();
361 debug2("tty_parse_modes: ispeed %d", baud); 361 debug3("tty_parse_modes: ispeed %d", baud);
362 if (failure != -1 && cfsetispeed(&tio, baud_to_speed(baud)) == -1) 362 if (failure != -1 && cfsetispeed(&tio, baud_to_speed(baud)) == -1)
363 error("cfsetispeed failed for %d", baud); 363 error("cfsetispeed failed for %d", baud);
364 break; 364 break;
@@ -368,7 +368,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
368 case TTY_OP_OSPEED_PROTO2: 368 case TTY_OP_OSPEED_PROTO2:
369 n_bytes += 4; 369 n_bytes += 4;
370 baud = packet_get_int(); 370 baud = packet_get_int();
371 debug2("tty_parse_modes: ospeed %d", baud); 371 debug3("tty_parse_modes: ospeed %d", baud);
372 if (failure != -1 && cfsetospeed(&tio, baud_to_speed(baud)) == -1) 372 if (failure != -1 && cfsetospeed(&tio, baud_to_speed(baud)) == -1)
373 error("cfsetospeed failed for %d", baud); 373 error("cfsetospeed failed for %d", baud);
374 break; 374 break;
@@ -377,7 +377,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
377 case OP: \ 377 case OP: \
378 n_bytes += arg_size; \ 378 n_bytes += arg_size; \
379 tio.c_cc[NAME] = get_arg(); \ 379 tio.c_cc[NAME] = get_arg(); \
380 debug2("tty_parse_modes: %d %d", OP, tio.c_cc[NAME]); \ 380 debug3("tty_parse_modes: %d %d", OP, tio.c_cc[NAME]); \
381 break; 381 break;
382#define TTYMODE(NAME, FIELD, OP) \ 382#define TTYMODE(NAME, FIELD, OP) \
383 case OP: \ 383 case OP: \
@@ -386,7 +386,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
386 tio.FIELD |= NAME; \ 386 tio.FIELD |= NAME; \
387 else \ 387 else \
388 tio.FIELD &= ~NAME; \ 388 tio.FIELD &= ~NAME; \
389 debug2("tty_parse_modes: %d %d", OP, arg); \ 389 debug3("tty_parse_modes: %d %d", OP, arg); \
390 break; 390 break;
391 391
392#include "ttymodes.h" 392#include "ttymodes.h"