summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/cu/command.c3
-rw-r--r--usr.bin/cu/cu.c8
2 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/cu/command.c b/usr.bin/cu/command.c
index 91d1c7cce00..d902748efdb 100644
--- a/usr.bin/cu/command.c
+++ b/usr.bin/cu/command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: command.c,v 1.8 2012/07/10 11:42:02 nicm Exp $ */
+/* $OpenBSD: command.c,v 1.9 2012/07/10 12:20:23 nicm Exp $ */
/*
* Copyright (c) 2012 Nicholas Marriott <nicm@openbsd.org>
@@ -234,6 +234,7 @@ do_command(char c)
"~> send file to remote host\r\n"
"~C connect program to remote host\r\n"
"~S set speed\r\n"
+ "~X send file with XMODEM\r\n"
"~? get this summary\r\n"
);
break;
diff --git a/usr.bin/cu/cu.c b/usr.bin/cu/cu.c
index ad06b9ac273..587711dad47 100644
--- a/usr.bin/cu/cu.c
+++ b/usr.bin/cu/cu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cu.c,v 1.4 2012/07/10 10:28:05 nicm Exp $ */
+/* $OpenBSD: cu.c,v 1.5 2012/07/10 12:20:23 nicm Exp $ */
/*
* Copyright (c) 2012 Nicholas Marriott <nicm@openbsd.org>
@@ -163,8 +163,7 @@ getopt:
printf("Connected (speed %u)\r\n", speed);
event_dispatch();
- if (isatty(STDIN_FILENO))
- tcsetattr(STDIN_FILENO, TCSAFLUSH, &saved_tio);
+ restore_termios();
printf("\r\n[EOT]\n");
exit(0);
@@ -173,8 +172,7 @@ getopt:
void
signal_event(int fd, short events, void *data)
{
- if (isatty(STDIN_FILENO))
- tcsetattr(STDIN_FILENO, TCSAFLUSH, &saved_tio);
+ restore_termios();
printf("\r\n[SIG%s]\n", sys_signame[fd]);
exit(0);