diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-09-19 20:47:18 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-09-19 20:47:18 +0000 |
commit | e4375a41f732f9258f20b5a6602514f804152b06 (patch) | |
tree | a28ed5a80ad0f65448b83dedbe48ae35a309e5b6 /usr.bin | |
parent | b88c954ff781fe3faae4f43443eb770a00e80b28 (diff) |
Make -m flag turn on progress meter in all situations
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ftp/ftp.1 | 5 | ||||
-rw-r--r-- | usr.bin/ftp/ftp.c | 16 | ||||
-rw-r--r-- | usr.bin/ftp/main.c | 6 |
3 files changed, 16 insertions, 11 deletions
diff --git a/usr.bin/ftp/ftp.1 b/usr.bin/ftp/ftp.1 index c89ce7b9c1a..d97a502bc1a 100644 --- a/usr.bin/ftp/ftp.1 +++ b/usr.bin/ftp/ftp.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ftp.1,v 1.20 1998/09/19 20:12:31 millert Exp $ +.\" $OpenBSD: ftp.1,v 1.21 1998/09/19 20:47:16 millert Exp $ .\" $NetBSD: ftp.1,v 1.22 1997/08/18 10:20:22 lukem Exp $ .\" .\" Copyright (c) 1985, 1989, 1990, 1993 @@ -107,7 +107,8 @@ multiple file transfers. .It Fl m Causes .Nm -to display the progress meter even if in non-verbose mode. +to always display the progress meter in cases where it would not do +so by default. .It Fl n Restrains .Nm diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c index 0798d3247c6..fb16a0c2009 100644 --- a/usr.bin/ftp/ftp.c +++ b/usr.bin/ftp/ftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp.c,v 1.30 1998/09/19 20:02:23 millert Exp $ */ +/* $OpenBSD: ftp.c,v 1.31 1998/09/19 20:47:16 millert Exp $ */ /* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else -static char rcsid[] = "$OpenBSD: ftp.c,v 1.30 1998/09/19 20:02:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: ftp.c,v 1.31 1998/09/19 20:47:16 millert Exp $"; #endif #endif /* not lint */ @@ -483,7 +483,8 @@ sendrequest(cmd, local, remote, printnames) oldinti = signal(SIGINFO, psummary); if (strcmp(local, "-") == 0) { fin = stdin; - progress = 0; + if (progress == 1) + progress = 0; } else if (*local == '|') { oldintp = signal(SIGPIPE, SIG_IGN); fin = popen(local + 1, "r"); @@ -495,7 +496,8 @@ sendrequest(cmd, local, remote, printnames) code = -1; return; } - progress = 0; + if (progress == 1) + progress = 0; closefunc = pclose; } else { fin = fopen(local, "r"); @@ -879,7 +881,8 @@ recvrequest(cmd, local, remote, lmode, printnames, ignorespecial) warn("%s", local+1); goto abort; } - progress = 0; + if (progress == 1) + progress = 0; preserve = 0; closefunc = pclose; } else { @@ -904,7 +907,8 @@ recvrequest(cmd, local, remote, lmode, printnames, ignorespecial) bufsize = st.st_blksize; } if ((st.st_mode & S_IFMT) != S_IFREG) { - progress = 0; + if (progress == 1) + progress = 0; preserve = 0; } progressmeter(-1); diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index b66ca977b06..02155dac22e 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.41 1998/09/19 20:12:31 millert Exp $ */ +/* $OpenBSD: main.c,v 1.42 1998/09/19 20:47:17 millert Exp $ */ /* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.41 1998/09/19 20:12:31 millert Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.42 1998/09/19 20:47:17 millert Exp $"; #endif #endif /* not lint */ @@ -202,7 +202,7 @@ main(argc, argv) break; case 'm': - progress = 1; + progress = -1; break; case 'n': |