Home | History | Annotate | only in /src/usr.bin/progress
History log of /src/usr.bin/progress
RevisionDateAuthorComments
 1.2 22-Jan-2003  lukem branches: 1.2.2;
need bsd.own.mk for NETBSDSRCDIR
 1.1 22-Jan-2003  jhawk progress(1) is a standalone version of lukemftp's progress bar
(pulled in via reachover makefile) suitable for measuring the
input to arbitrary pipes.
This is intended for use by sysinst.
 1.2.2.2 22-Jan-2003  lukem need bsd.own.mk for NETBSDSRCDIR
 1.2.2.1 22-Jan-2003  lukem file Makefile was added on branch netbsd-1-6 on 2003-01-22 02:56:31 +0000
 1.15 13-Apr-2014  snj Change some standard exit status text to ".Ex -std"
From Eitan Adler in PR bin/47790.
 1.14 30-Apr-2008  martin branches: 1.14.4; 1.14.26; 1.14.38;
Convert TNF licenses to new 2 clause variant
 1.13 06-Jun-2007  briggs branches: 1.13.10;
Dynamically allocate the buffer used for reading data from the input
handle and default to 64k instead of the 1k (BUFSIZ) static buffer.
This makes a large difference in performance of some applications.
Make the buffer size tunable from the command line.
 1.12 12-Apr-2007  lukem Update example to use KiB per recent change to ../ftp/progressbar.c
 1.11 12-Jan-2006  wiz Bump date for -e.
 1.10 12-Jan-2006  garbled Apply patch from PR bin/28717
This adds a -e option to progress which causes the progress bar to be
sent to stderr. This allows using progress mid-pipe, such as:
tar -cf . | progress -e bzip -1c | ssh host "cat > file"
 1.9 03-Apr-2004  lukem Support strsuftoll(3) suffixes for '-l length'.
Provide an example of copying raw disks using dd, with a progress bar.
 1.8 25-Mar-2004  hubertf -z actually passes the input file through gunzip(1).
Having an option to really pass it through gzip(1) would be nice...
 1.7 09-Mar-2004  wiz Drop trailing whitespace.
 1.6 09-Mar-2004  hubertf Allow custom text printed before (left of) the progress bar from progress(1):

miyu# cat openoffice-linux-1.1.0.tgz | progress -z -p 'Bytes written: ' dd of=/dev/null bs=1m
Bytes written: 193 MB 13.83 MB/s 0+195211 records in
and:
miyu# progress -f openoffice-linux-1.1.0.tgz -z -p 'Bytes written: ' dd of=/dev/null bs=1m
Bytes written: 28% |****** | 57919 KB 14.12 MB/s 00:09 ETA

OK'd by lukem.
 1.5 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.4 10-Feb-2003  grant remove section name comments -- they're in the template.
 1.3 22-Jan-2003  enami branches: 1.3.2;
Remove second item in BUGS section; it is fixed in progress.c rev. 1.2.
 1.2 22-Jan-2003  lukem use ftp(1) instead of lukemftp
 1.1 22-Jan-2003  jhawk progress(1) is a standalone version of lukemftp's progress bar
(pulled in via reachover makefile) suitable for measuring the
input to arbitrary pipes.
This is intended for use by sysinst.
 1.3.2.2 22-Jan-2003  enami Remove second item in BUGS section; it is fixed in progress.c rev. 1.2.
 1.3.2.1 22-Jan-2003  enami file progress.1 was added on branch netbsd-1-6 on 2003-01-22 03:40:34 +0000
 1.13.10.1 18-May-2008  yamt sync with head.
 1.14.38.1 10-Aug-2014  tls Rebase.
 1.14.26.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25 17-Aug-2021  gson Add missing check for error returns from read(). Found by inspection
while reviewing the changes suggested by RVP in PR install/56303, but
not believed to be the cause of the failure reported in that PR.
 1.24 09-Aug-2021  gson Test errno when the return value from wait() indicates an error, not
when it indicates success. PR install/56303.
 1.23 07-Jan-2021  lukem progress: handle EINTR in writes. PR/55914
 1.22 25-Apr-2020  simonb Whitespace nit.
 1.21 17-Jan-2015  gson branches: 1.21.18;
Retry read() on EINTR. Fixes premature exit of
</dev/random progress -e cat >/dev/null
 1.20 27-Jun-2012  riastradh branches: 1.20.10;
Clean up #includes in progress(1).

Sort them, omit needless ones, and add omitted needful ones.

Omissions revealed by pilfering the code and trying to build it on
Mac OS X. We ought to have a better way to reveal these omissions...
 1.19 16-Sep-2011  joerg branches: 1.19.2;
Use __dead
 1.18 17-Jul-2010  tron Fix argument handling of the "-b" option on 64bit platforms. Using
"-b 1024k" would previously fail with this error message:

progress: buffer size 1048576 is greater than -1.
 1.17 26-May-2008  dholland branches: 1.17.4;
Cosmetic fix: don't exit without completing the progress bar, either on
write error or by receiving SIGPIPE. This avoids leaving the tty in a
mess. Probably addresses PR 30287.
 1.16 29-Apr-2008  martin branches: 1.16.2;
Convert to new 2 clause license
 1.15 06-Jun-2007  briggs branches: 1.15.10;
Dynamically allocate the buffer used for reading data from the input
handle and default to 64k instead of the 1k (BUFSIZ) static buffer.
This makes a large difference in performance of some applications.
Make the buffer size tunable from the command line.
 1.14 07-Feb-2007  hubertf #include inttypes.h, for strtoimax(3).
Suggested by Slava Semushin <slava.semushin@gmail.com> in private email.
 1.13 07-Feb-2007  hubertf * Remove unneeded ctype.h
* remove unneeded {}s
* add some whitespace for readability

Contributed by Slava Semushin <slava.semushin@gmail.com> in private mail.
 1.12 20-Apr-2006  hubertf Don't try to determining the size of what's coming when reading from a pipe.
Instead of reporting some bogus values, print no progress at all.
(It's beyond me why stat(2) on a pipe returns funny values...
see the PR below for some examples!)

Fixes PR bin/33207 by myself.

OK'd by mrg@
 1.11 12-Jan-2006  garbled Apply patch from PR bin/28717
This adds a -e option to progress which causes the progress bar to be
sent to stderr. This allows using progress mid-pipe, such as:
tar -cf . | progress -e bzip -1c | ssh host "cat > file"
 1.10 23-Feb-2005  dsl Exit with any failure code from the cmd or gzip.
Decode gzip -l output with strtoimax() (not sscanf()) so we don't use an
uninitialised variable if the output format isn't what we expect.
This might fix some installation PRs (no error being reported)
 1.9 03-Apr-2004  lukem Support strsuftoll(3) suffixes for '-l length'.
Provide an example of copying raw disks using dd, with a progress bar.
 1.8 09-Mar-2004  hubertf Allow custom text printed before (left of) the progress bar from progress(1):

miyu# cat openoffice-linux-1.1.0.tgz | progress -z -p 'Bytes written: ' dd of=/dev/null bs=1m
Bytes written: 193 MB 13.83 MB/s 0+195211 records in
and:
miyu# progress -f openoffice-linux-1.1.0.tgz -z -p 'Bytes written: ' dd of=/dev/null bs=1m
Bytes written: 28% |****** | 57919 KB 14.12 MB/s 00:09 ETA

OK'd by lukem.
 1.7 12-Feb-2003  ross Sigh, use an even more elaborate wait loop; it turns out we have a child
before we even start when run from sysinst. Thanks also Takao Shinohara.
 1.6 10-Feb-2003  ross Fix a race that can abort a sysinst run.
Closes bin/20275, thank you Takao Shinohara: good analysis.

This program appeared less than 3 weeks ago and it has already been
pulled up to 1.6.1? At the last minute? And with serious bugs?
ISTM that the release branch isn't supposed to work that way. It
isn't stable, it had 4 patches in 2 days, and has averaged a
patch every 4 days during its short lifetime.
 1.5 22-Jan-2003  agc branches: 1.5.2;
Make this build on non-i386 platforms.
 1.4 22-Jan-2003  jhawk Drop gratuitous warning for failure to get terminal width; it makes piping
progress' output ugly.
 1.3 22-Jan-2003  christos not all windows have 80 columns.
 1.2 22-Jan-2003  enami Advance a pointer correctly.
 1.1 22-Jan-2003  jhawk progress(1) is a standalone version of lukemftp's progress bar
(pulled in via reachover makefile) suitable for measuring the
input to arbitrary pipes.
This is intended for use by sysinst.
 1.5.2.3 02-Jun-2003  tron Pull up revision 1.7 (requested by ross):
Sigh, use an even more elaborate wait loop; it turns out we have a child
before we even start when run from sysinst. Thanks also Takao Shinohara.
 1.5.2.2 10-Feb-2003  jmc Pullup rev 1.6 (requested by ross in ticket #1158)
Fix wait call to loop which prevents a sysinst coredump. PR#20275
 1.5.2.1 22-Jan-2003  jmc file progress.c was added on branch netbsd-1-6 on 2003-02-10 09:39:12 +0000
 1.15.10.2 04-Jun-2008  yamt sync with head
 1.15.10.1 18-May-2008  yamt sync with head.
 1.16.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.4.1 21-Nov-2010  riz Pull up following revision(s) (requested by tron in ticket #1429):
usr.bin/progress/progress.c: revision 1.18
Fix argument handling of the "-b" option on 64bit platforms. Using
"-b 1024k" would previously fail with this error message:
progress: buffer size 1048576 is greater than -1.
 1.19.2.1 30-Oct-2012  yamt sync with head
 1.20.10.1 21-Feb-2015  martin Pull up following revision(s) (requested by gson in ticket #532):
usr.bin/progress/progress.c: revision 1.21
Retry read() on EINTR. Fixes premature exit of
</dev/random progress -e cat >/dev/null
 1.21.18.2 25-Oct-2022  martin Pull up following revision(s) (requested by riastradh in ticket #1547):

usr.bin/progress/progress.c: revision 1.24
usr.bin/progress/progress.c: revision 1.25

Test errno when the return value from wait() indicates an error, not
when it indicates success. PR install/56303.

Add missing check for error returns from read(). Found by inspection
while reviewing the changes suggested by RVP in PR install/56303, but
not believed to be the cause of the failure reported in that PR.
 1.21.18.1 29-Jan-2021  martin Pull up following revision(s) (requested by lukem in ticket #1189):

usr.bin/progress/progress.c: revision 1.23

progress: handle EINTR in writes. PR/55914

RSS XML Feed