Subject: cu changes
To: None <tech-userlevel@netbsd.org>
From: Allen Briggs <briggs@wasabisystems.com>
List: tech-userlevel
Date: 10/24/2001 17:10:51
To talk with the sandpoint, I need to use a serial link to download a
kernel. The ROM doesn't understand flow control, and I've found the
verbosity of 'cu' on downloads to be annoying, so I've added the
following options:
-f to select no h/w flow control
-q to select a quiet download
Here are the diffs. Anyone have any thoughts or objections?
-allen
Index: cu.1
===================================================================
RCS file: /cvsroot/gnusrc/gnu/libexec/uucp/cu/cu.1,v
retrieving revision 1.5
diff -u -r1.5 cu.1
--- cu.1 2001/04/06 14:06:02 1.5
+++ cu.1 2001/10/24 21:02:00
@@ -215,6 +215,12 @@
.B \-e, \-\-parity=even
Use even parity.
.TP 5
+.B \-f, \-F
+Use hardware flow control
+.B (\-F, default)
+or not
+.B (-f).
+.TP 5
.B \-o, \-\-parity=odd
Use odd parity.
.TP 5
@@ -249,6 +255,11 @@
.B \-a port
Equivalent to
.B \-\-port port.
+.TP 5
+.B \-q
+Be quiet during file transfers.
+.I cu
+is normally quite verbose.
.TP 5
.B \-l line, \-\-line line
Name the line to use by giving a device name. This may be used to
Index: cu.c
===================================================================
RCS file: /cvsroot/gnusrc/gnu/libexec/uucp/cu/cu.c,v
retrieving revision 1.6
diff -u -r1.6 cu.c
--- cu.c 2000/03/23 19:05:40 1.6
+++ cu.c 2001/10/24 21:02:02
@@ -258,6 +258,8 @@
enum txonxoffsetting txonxoff = XONXOFF_ON;
/* -I: configuration file name. */
const char *zconfig = NULL;
+ /* -F/-f: Hard/Soft flow control. */
+ boolean hflow = TRUE;
int iopt;
pointer puuconf;
int iuuconf;
@@ -295,7 +297,7 @@
}
}
- while ((iopt = getopt_long (argc, argv, "a:c:deE:hnI:l:op:s:tvx:z:",
+ while ((iopt = getopt_long (argc, argv, "a:c:deE:fFhnI:l:op:qs:tvx:z:",
asCulongopts, (int *) NULL)) != EOF)
{
switch (iopt)
@@ -322,6 +324,16 @@
zCuvar_escape = optarg;
break;
+ case 'f':
+ /* No h/w flow control. */
+ hflow = FALSE;
+ break;
+
+ case 'F':
+ /* Use h/w flow control. */
+ hflow = TRUE;
+ break;
+
case 'h':
/* Local echo. */
fCulocalecho = TRUE;
@@ -348,6 +360,11 @@
zport = optarg;
break;
+ case 'q':
+ /* non-verbose file transfers */
+ fCuvar_verbose = FALSE;
+ break;
+
case 's':
/* Speed. */
ibaud = strtol (optarg, (char **) NULL, 10);
@@ -599,7 +616,7 @@
sport.uuconf_u.uuconf_sdirect.uuconf_zdevice = NULL;
sport.uuconf_u.uuconf_sdirect.uuconf_ibaud = ibaud;
sport.uuconf_u.uuconf_sdirect.uuconf_fcarrier = FALSE;
- sport.uuconf_u.uuconf_sdirect.uuconf_fhardflow = TRUE;
+ sport.uuconf_u.uuconf_sdirect.uuconf_fhardflow = hflow;
if (! fconn_init (&sport, &sconn, UUCONF_PORTTYPE_UNKNOWN))
ucuabort ();