Up to [local] / src / usr.bin / cu
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.31 / (download) - annotate - [select for diffs], Sat Feb 10 15:29:04 2024 UTC (3 months, 1 week ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
HEAD
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)
If anything goes wrong with reading the 'sysctl hw.ucomnames', act like it is the empty string, rather than considering it an error. ok krw
Revision 1.30 / (download) - annotate - [select for diffs], Thu Dec 21 11:25:38 2023 UTC (4 months, 4 weeks ago) by jca
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)
Tweak comment, the actual format is "ucom<unit#>:<usb id>" ok krw@
Revision 1.29 / (download) - annotate - [select for diffs], Mon Oct 2 14:48:11 2023 UTC (7 months, 2 weeks ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE,
OPENBSD_7_4
Changes since 1.28: +66 -2 lines
Diff to previous 1.28 (colored)
Enable cu(1) -l to accept the usb paths shown in hw.ucomnames. Usual man page tweaks from jmc@ and schwarze@. Testing various iterations by deraadt@, nicm@, kettenis@, drahn@. ok deraadt@
Revision 1.28 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:00 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE,
OPENBSD_7_3,
OPENBSD_7_2_BASE,
OPENBSD_7_2,
OPENBSD_7_1_BASE,
OPENBSD_7_1,
OPENBSD_7_0_BASE,
OPENBSD_7_0,
OPENBSD_6_9_BASE,
OPENBSD_6_9,
OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7,
OPENBSD_6_6_BASE,
OPENBSD_6_6
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
Revision 1.27 / (download) - annotate - [select for diffs], Fri Mar 22 07:03:23 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.26: +19 -9 lines
Diff to previous 1.26 (colored)
Add -E to change the escape character, from Artturi Alm. no objections from deraadt, ok millert
Revision 1.26 / (download) - annotate - [select for diffs], Sun Dec 10 01:03:46 2017 UTC (6 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE,
OPENBSD_6_4,
OPENBSD_6_3_BASE,
OPENBSD_6_3
Changes since 1.25: +11 -3 lines
Diff to previous 1.25 (colored)
-r restricted mode blocks certain operations as ~ operations. from Jan Klemkow ok nicm
Revision 1.25 / (download) - annotate - [select for diffs], Tue Aug 22 16:32:37 2017 UTC (6 years, 8 months ago) by mestre
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE,
OPENBSD_6_2
Changes since 1.24: +3 -1 lines
Diff to previous 1.24 (colored)
Call isatty(3) prior to ioctl(TIOCEXCL) to check if cu(1) was invoked on a non-TTY and if that's the case then close the application. Otherwise without this verification if it's really a non-TTY then cu(1) will be aborted by pledge(2). feedback and OK by deraadt@
Revision 1.24 / (download) - annotate - [select for diffs], Fri Oct 16 07:01:53 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE,
OPENBSD_6_1,
OPENBSD_6_0_BASE,
OPENBSD_6_0,
OPENBSD_5_9_BASE,
OPENBSD_5_9
Changes since 1.23: +5 -1 lines
Diff to previous 1.23 (colored)
doug and I think the kernel has enough features to support pledge "stdio rpath wpath cpath getpw proc exec tty" now. It will be hard to drop many of those features unless cu becomes privsep for the "upload" commands.
Revision 1.23 / (download) - annotate - [select for diffs], Mon Oct 5 23:15:31 2015 UTC (8 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.22: +18 -2 lines
Diff to previous 1.22 (colored)
Set the line file descriptor nonblocking and make it blocking again for xmodem and child processes, makes xmodem work with -d. Reported by Kim Zeitler via guenther@, tested by Jiri B. ok (and a small change) guenther
Revision 1.22 / (download) - annotate - [select for diffs], Mon May 18 09:35:05 2015 UTC (9 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE,
OPENBSD_5_8
Changes since 1.21: +18 -6 lines
Diff to previous 1.21 (colored)
Add -d flag and dc capability to open devices non-blocking, used for the few drivers that do not support cua* so tty* must be used. ok miod millert
Revision 1.21 / (download) - annotate - [select for diffs], Sun Feb 8 17:33:35 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE,
OPENBSD_5_7
Changes since 1.20: +20 -15 lines
Diff to previous 1.20 (colored)
Separate the two usages for cu so you can either give it -l and -s (like cu) or you can give it a host to look up in /etc/remote (like tip). Mixing the two was unclear and caused mixups with -l and the HOST environment variable. So usage is now: usage: cu [-l line] [-s speed | -speed] cu [host] And HOST and REMOTE are ignored for the first form. ok deraadt claudio
Revision 1.20 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:06 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
Revision 1.19 / (download) - annotate - [select for diffs], Sat Apr 12 12:47:43 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6
Changes since 1.18: +5 -4 lines
Diff to previous 1.18 (colored)
-l should override HOST, pointed out by claudio@
Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 31 09:16:26 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.17: +10 -6 lines
Diff to previous 1.17 (colored)
If HOST or the host argument starts with a /, treat it as a device name (so, for example, "cu /dev/cuaU0" will work).
Revision 1.17 / (download) - annotate - [select for diffs], Mon Mar 31 09:09:19 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.16: +15 -10 lines
Diff to previous 1.16 (colored)
Fix REMOTE to work like tip(1) - it can be either a path to a remote(5) database or a description (for example "foo:dv=/dev/bar"). Add support for HOST which works as I thought REMOTE did. Manpage help from jmc@.
Revision 1.16 / (download) - annotate - [select for diffs], Wed Mar 26 13:00:50 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.15: +71 -20 lines
Diff to previous 1.15 (colored)
Add support for retrieving the line and speed from the /etc/remote dv and br capabilities like tip(1). No other capabilities are supported. Also handle REMOTE in the environment as either a separate remote(5) file or a host. Discussed with and approval from several, man page help from schwarze@.
Revision 1.15 / (download) - annotate - [select for diffs], Wed Nov 20 20:55:09 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)
unsigned char casts with ctype macros are pretty obvious when dealing with argv or optarg ok ratchov
Revision 1.14 / (download) - annotate - [select for diffs], Wed Apr 24 16:01:10 2013 UTC (11 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.13: +14 -13 lines
Diff to previous 1.13 (colored)
simplify tilde expand as seen in ssh. ok nicm
Revision 1.13 / (download) - annotate - [select for diffs], Thu Jan 17 21:10:24 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)
Fix a couple of spacing/style nits.
Revision 1.12 / (download) - annotate - [select for diffs], Thu Jan 17 11:15:22 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.11: +10 -7 lines
Diff to previous 1.11 (colored)
Instead of creating line termios from scratch, call tcgetattr() and adjust it (per POSIX), reported by kettenis.
Revision 1.11 / (download) - annotate - [select for diffs], Fri Jul 13 14:45:24 2012 UTC (11 years, 10 months ago) by halex
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)
kill unused variable ok dlg@ nicm@ while at it, kill one more and add #include <ctype.h> per nicm's request
Revision 1.10 / (download) - annotate - [select for diffs], Fri Jul 13 05:29:01 2012 UTC (11 years, 10 months ago) by dlg
Branch: MAIN
Changes since 1.9: +8 -21 lines
Diff to previous 1.9 (colored)
make the compat for -XXX to -s XXX simpler. sometimes you dont need to use goto. ok nicm@
Revision 1.9 / (download) - annotate - [select for diffs], Thu Jul 12 14:00:05 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)
Set CLOCAL in remove c_cflag or line noise is likely to make cu exit as discovered by naddy.
Revision 1.8 / (download) - annotate - [select for diffs], Thu Jul 12 13:50:02 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.7: +4 -1 lines
Diff to previous 1.7 (colored)
Add handler for SIGHUP.
Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 10 13:00:09 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)
Fix usage.
Revision 1.6 / (download) - annotate - [select for diffs], Tue Jul 10 12:47:23 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.5: +4 -1 lines
Diff to previous 1.5 (colored)
Add ~R command to start recording output to a file.
Revision 1.5 / (download) - annotate - [select for diffs], Tue Jul 10 12:20:23 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.4: +3 -5 lines
Diff to previous 1.4 (colored)
Use function to restore termios and add ~X to help.
Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 10 10:28:05 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.3: +9 -14 lines
Diff to previous 1.3 (colored)
Once we've set up termios, lines need to be \r\n terminated, and we need to reset termios before exiting. So add custom versions of err(), errx(), warn(), warnx() to handle this.
Revision 1.3 / (download) - annotate - [select for diffs], Tue Jul 10 08:42:43 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.2: +6 -1 lines
Diff to previous 1.2 (colored)
Restore termios and signal handlers before ~$ so ^C will kill child.
Revision 1.2 / (download) - annotate - [select for diffs], Tue Jul 10 08:16:27 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1: +23 -12 lines
Diff to previous 1.1 (colored)
Add a ~S escape to change the speed interactively (not using ~s since may want to use it for variables later).
Revision 1.1 / (download) - annotate - [select for diffs], Tue Jul 10 08:02:27 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Add first cut of replacement for tip/cu. Not linked to the build. Currently supports only -l and -s (no parity), no variables and ~., ~>, ~$, ~#, ~^Z, ~?. More to come. Tested by naddy, otto. ok miod deraadt