Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0318db838e | ||
|
|
04400b0d18 | ||
|
|
69c5572161 | ||
|
|
0d63932eab | ||
|
|
bb6c120691 | ||
|
|
e657f745f4 | ||
|
|
9a1c9173a3 | ||
|
|
dc648a5368 | ||
|
|
84651210e6 | ||
|
|
054183b73a | ||
|
|
d0612752f0 | ||
|
|
c3a1810890 | ||
|
|
51de6abbed | ||
|
|
94f4a239cc | ||
|
|
14a23268ad | ||
|
|
35a9bfe025 | ||
|
|
212bf3e96e | ||
|
|
9021a7ceec | ||
|
|
b56cf08319 | ||
|
|
a09ef9576d | ||
|
|
ea70bbc1b6 | ||
|
|
6fce88d93a | ||
|
|
82edb8cdf1 | ||
|
|
5ba70e05fc | ||
|
|
5c036059f8 | ||
|
|
a3c52ca679 | ||
|
|
f8138974c1 | ||
|
|
08908a5511 | ||
|
|
50df3e415d | ||
|
|
b3b385dd06 | ||
|
|
1047e9096a | ||
|
|
772afe4b5b | ||
|
|
6a791267a0 | ||
|
|
e9b7e13be1 | ||
|
|
516d64a1ff | ||
|
|
af7079f708 | ||
|
|
93502bb64b | ||
|
|
0b74716668 | ||
|
|
61a8f2adea | ||
|
|
4d9701613f | ||
|
|
90ab359ed3 | ||
|
|
8ef234dacf | ||
|
|
ea82ae5090 | ||
|
|
65aa347a9f | ||
|
|
3ba6d78241 | ||
|
|
0e2bb55483 | ||
|
|
c0b64f4bae | ||
|
|
6d70c0889d | ||
|
|
22a614bbf4 | ||
|
|
1fec5622b6 | ||
|
|
a1e2651b4c | ||
|
|
ec498ec476 | ||
|
|
e433ad319e | ||
|
|
30f9d01df9 | ||
|
|
579b592c12 | ||
|
|
dfbab9a7c0 | ||
|
|
d1730258bf | ||
|
|
1afd3e821a | ||
|
|
9e36b0fdc7 | ||
|
|
857637c1fb | ||
|
|
40854f6edb | ||
|
|
7f403b8050 | ||
|
|
2a59199870 | ||
|
|
6712d8c844 | ||
|
|
856da09741 | ||
|
|
c4cf410a59 | ||
|
|
0994dd4070 | ||
|
|
6cddce9f15 | ||
|
|
ac44fd59e3 | ||
|
|
5c25f9270c | ||
|
|
bfe301ae1c | ||
|
|
29aa64092a | ||
|
|
d9a0041870 | ||
|
|
ea3787e393 | ||
|
|
de2fe7f6be | ||
|
|
c548d1f2d8 | ||
|
|
fbe726e4c4 | ||
|
|
208ac286f8 | ||
|
|
9aef419c4c | ||
|
|
a2c6490d31 | ||
|
|
4b399995f5 | ||
|
|
877bb1f91f | ||
|
|
cd696e60ab | ||
|
|
9bd5a518ea | ||
|
|
fe4cc4b01d | ||
|
|
65d568c283 | ||
|
|
a118f110fa | ||
|
|
f803f29158 | ||
|
|
954c2d32c1 | ||
|
|
5112251894 | ||
|
|
545769885d | ||
|
|
94ea82c10a | ||
|
|
a6c978573f | ||
|
|
31d70dae49 | ||
|
|
9a639b40b7 | ||
|
|
e84f47abc8 | ||
|
|
741e4b0b30 | ||
|
|
52a720ec33 | ||
|
|
416c61a663 | ||
|
|
23bd296aeb | ||
|
|
2c8843fc86 | ||
|
|
aa07373c4e | ||
|
|
a3b5a44f79 | ||
|
|
d5fad8db39 | ||
|
|
ef5d703682 | ||
|
|
40efaf848e | ||
|
|
575854c8b9 | ||
|
|
3299947cc1 | ||
|
|
9daeea7400 | ||
|
|
4e51afc36c |
+12
-2
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = subdir-objects
|
||||
SUBDIRS = po
|
||||
|
||||
bin_PROGRAMS = pv
|
||||
dist_doc_DATA = README.md docs/INSTALL docs/COPYING docs/NEWS.md docs/ACKNOWLEDGEMENTS.md docs/DEVELOPERS.md docs/TODO.md docs/benchmark.sh
|
||||
dist_doc_DATA = README.md docs/INSTALL docs/COPYING docs/NEWS.md docs/ACKNOWLEDGEMENTS.md docs/DEVELOPERS.md docs/benchmark.sh
|
||||
dist_man1_MANS = docs/pv.1
|
||||
|
||||
EXTRA_DIST = docs/pv.1.md
|
||||
@@ -17,6 +17,7 @@ src/main/main.c \
|
||||
src/main/options.c \
|
||||
src/main/remote.c \
|
||||
src/main/version.c \
|
||||
src/pv/calc.c \
|
||||
src/pv/cursor.c \
|
||||
src/pv/display.c \
|
||||
src/pv/elapsedtime.c \
|
||||
@@ -87,7 +88,7 @@ EXTRA_DIST += $(TESTS) tests/run-valgrind.sh tests/test-env.sh
|
||||
|
||||
docs/pv.1.md: $(srcdir)/docs/pv.1
|
||||
test -d docs || mkdir docs
|
||||
pandoc --from man --to markdown < $< | sed '/\*\*\*\*/{s/\*//g;s/^/**/;s/$$/**/}' | sed '/^```/,/^```/d' > $@
|
||||
pandoc --from man --to markdown < $< | sed '/\*\*\*\*/{s/\*//g;s/^/**/;s/$$/**/}' | sed '/^```/,/^```/d' | sed 's/^\\\[/[/' > $@
|
||||
|
||||
SUFFIXES = .c .o .e
|
||||
|
||||
@@ -112,6 +113,15 @@ clean-local:
|
||||
# Convenience alias for "make check": "make test"
|
||||
test: check
|
||||
|
||||
# Generate a package manifest if MAINTAINER is set.
|
||||
dist-hook:
|
||||
if test -n "$(MAINTAINER)"; then \
|
||||
cd "$(top_distdir)" \
|
||||
&& { printf "%s\n\n" "Check file integrity with 'sha512sum -c MANIFEST && echo OK'."; \
|
||||
find -type f -not -name MANIFEST -exec sha512sum '{}' ';' | sort -k 2; } \
|
||||
| gpg -u "$(MAINTAINER)" --clearsign > MANIFEST; \
|
||||
else true; fi
|
||||
|
||||
# "release" target - requires MAINTAINER variable to select GPG key.
|
||||
release: distcheck
|
||||
gpg --list-secret-keys 2>&1 | grep -F 'uid' | grep -Fq "$(MAINTAINER)"
|
||||
|
||||
@@ -12,10 +12,18 @@ completion it is, and an estimate of how long it will be until completion.
|
||||
A manual page is included in this distribution ("`man pv`"). Before
|
||||
installation, it is in "[docs/pv.1](./docs/pv.1.md)".
|
||||
|
||||
Changes are listed in "[docs/NEWS.md](./docs/NEWS.md)". The to-do list is "[docs/TODO.md](./docs/TODO.md)".
|
||||
Changes are listed in "[docs/NEWS.md](./docs/NEWS.md)".
|
||||
|
||||
Developers and translators, please see "[docs/DEVELOPERS.md](./docs/DEVELOPERS.md)".
|
||||
|
||||
Translators can use the Weblate instance hosted by Codeberg:
|
||||
[https://translate.codeberg.org/engage/pv/](https://translate.codeberg.org/engage/pv/)
|
||||
|
||||
[](https://translate.codeberg.org/engage/pv/)
|
||||
|
||||
If you don't see your language listed, raise an issue on the issue tracker
|
||||
(or just email the maintainer) asking for it to be added.
|
||||
|
||||
|
||||
# Compilation
|
||||
|
||||
@@ -33,6 +41,9 @@ development tools. You can then run "`autoreconf -is`" to generate the
|
||||
|
||||
# Copyright, bug reporting, and acknowledgements
|
||||
|
||||
See "[docs/ACKNOWLEDGEMENTS.md](./docs/ACKNOWLEDGEMENTS.md)" for a list of
|
||||
contributors.
|
||||
|
||||
Copyright (C) 2002-2008, 2010, 2012-2015, 2017, 2021, 2023-2024 Andrew Wood.
|
||||
|
||||
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl-3.0.html>.
|
||||
@@ -56,10 +67,8 @@ from the **pv** home page.
|
||||
|
||||
The **pv** home page is at:
|
||||
|
||||
[https://www.ivarch.com/programs/pv.shtml](https://www.ivarch.com/programs/pv.shtml)
|
||||
> [https://www.ivarch.com/programs/pv.shtml](https://www.ivarch.com/programs/pv.shtml)
|
||||
|
||||
The latest version can always be found here.
|
||||
|
||||
**Please see "[docs/ACKNOWLEDGEMENTS.md](./docs/ACKNOWLEDGEMENTS.md)" for a list of contributors.**
|
||||
|
||||
---
|
||||
|
||||
+5
-1
@@ -4,7 +4,7 @@ dnl Copyright 2002-2008, 2010, 2012-2015, 2017, 2021, 2023-2024 Andrew Wood
|
||||
dnl
|
||||
dnl License GPLv3+: GNU GPL version 3 or later; see `docs/COPYING'.
|
||||
|
||||
AC_INIT([pv], [1.8.14], [pv@ivarch.com], [pv], [https://www.ivarch.com/programs/pv.shtml])
|
||||
AC_INIT([pv], [1.9.0], [pv@ivarch.com], [pv], [https://www.ivarch.com/programs/pv.shtml])
|
||||
AC_CONFIG_SRCDIR([src/include/config.h.in])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_HEADERS([src/include/config.h])
|
||||
@@ -40,6 +40,10 @@ AC_CHECK_HEADERS([libintl.h locale.h])
|
||||
AC_CHECK_HEADERS([sys/sysmacros.h])
|
||||
AC_CHECK_MEMBERS([struct stat.st_blksize])
|
||||
|
||||
AC_SEARCH_LIBS([sqrtl],[m])
|
||||
AC_CHECK_HEADERS([math.h])
|
||||
AC_CHECK_FUNCS([sqrtl])
|
||||
|
||||
dnl Libraries that may contain key functions.
|
||||
AC_SEARCH_LIBS([clock_gettime],[rt])
|
||||
|
||||
|
||||
+50
-31
@@ -12,18 +12,18 @@ is acknowledged and greatly appreciated:
|
||||
* Joshua Jensen - reported RPM installation bug
|
||||
* Boris Folgmann <http://www.folgmann.com/en/> - reported cursor handling bug
|
||||
* Mathias Gumz - reported NLS bug
|
||||
* Daniel Roethlisberger - submitted patch to use lockfiles for "`-c`" if terminal locking fails
|
||||
* Adam Buchbinder - lots of help with a Cygwin port of "`-c`"
|
||||
* Mark Tomich <http://metuchen.dyndns.org> - suggested "`-B`" option
|
||||
* Daniel Roethlisberger - submitted patch to use lockfiles for **-c** if terminal locking fails
|
||||
* Adam Buchbinder - lots of help with a Cygwin port of **-c**
|
||||
* Mark Tomich <http://metuchen.dyndns.org> - suggested **-B** option
|
||||
* Gert Menke - reported bug when piping to `dd` with a large input buffer size
|
||||
* Ville Herva <Ville.Herva@iki.fi> - informative bug report about rate limiting performance
|
||||
* Elias Pipping - patch to compile properly on Darwin 9; potential NULL deref report
|
||||
* Patrick Collison - similar patch for OS X
|
||||
* Boris Lohner - reported problem that "`-L`" does not complain if given non-numeric value
|
||||
* Boris Lohner - reported problem that **-L** does not complain if given non-numeric value
|
||||
* Sebastian Kayser - supplied testing for *SIGPIPE*, demonstrated internationalisation problem
|
||||
* Laszlo Ersek <http://phptest11.atw.hu/> - reported shared memory leak on *SIGINT* with "`-c`"
|
||||
* Laszlo Ersek <http://phptest11.atw.hu/> - reported shared memory leak on *SIGINT* with **-c**
|
||||
* Phil Rutschman <http://bandgap.rsnsoft.com/> - provided a patch for fully restoring terminal state on exit
|
||||
* Henry Precheur <http://henry.precheur.org/> - reporting and suggestions for "`--rate-limit`" bug when rate is under 10
|
||||
* Henry Precheur <http://henry.precheur.org/> - reporting and suggestions for **--rate-limit** bug when rate is under 10
|
||||
* E. Rosten <http://mi.eng.cam.ac.uk/~er258/> - supplied patch for block buffering in line mode
|
||||
* Kjetil Torgrim Homme - reported compilation error with default *CFLAGS* on non-GCC compilers
|
||||
* Alexandre de Verteuil - reported bug in OS X build and supplied test environment to fix in
|
||||
@@ -31,70 +31,89 @@ is acknowledged and greatly appreciated:
|
||||
* Sam Nelson <http://www.siliconfuture.net/> - supplied patch to fix trailing slash on *DESTDIR*
|
||||
* Daniel Pape - reported Cygwin installation problem due to *DESTDIR*
|
||||
* Philipp Beckers - ported to the Syabas PopcornHour A-100 series
|
||||
* Henry Gebhard <hsggebhardt@googlemail.com> - supplied patches to improve SI prefixes and add "`--average-rate`"
|
||||
* Henry Gebhard <hsggebhardt@googlemail.com> - supplied patches to improve SI prefixes and add **--average-rate**
|
||||
* Vladimir Kokarev, Alexander Leo - reported that exit status did not reflect file errors
|
||||
* Thomas Rachel - submitted patches for IEEE1541 (MiB suffixes), 1+e03 bug
|
||||
* Guillaume Marcais - submitted speedup patch for line mode
|
||||
* Moritz Barsnick - submitted patch for compile warning in size calculation
|
||||
* Pawel Piatek - submitted RPM and patches for AIX
|
||||
* Sami Liedes - submitted patch for "`--timer`" and "`--bytes`" with "`--numeric`"
|
||||
* Steven Willis - reported problem with "`-R`" killing non-PV remote processes
|
||||
* Vladimir Pal, Vladimir Ermakov - submitted patch which led to development of "`--format`" option
|
||||
* Sami Liedes - submitted patch for **--timer** and **--bytes** with **--numeric**
|
||||
* Steven Willis - reported problem with **-R** killing non-PV remote processes
|
||||
* Vladimir Pal, Vladimir Ermakov - submitted patch which led to development of **--format** option
|
||||
* Peter Samuelson <peter@p12n.org> - submitted patch to calculate size if stdout is a block device
|
||||
* Miguel Diaz - much Cygwin help (and packaging), found narrow-terminal bug
|
||||
* Jim Salter <http://ubuntuwiki.net> - commissioned work on the "`--skip-errors`" option
|
||||
* Jim Salter <http://ubuntuwiki.net> - commissioned work on the **--skip-errors** option
|
||||
* Wouter Pronk - reported build problem on SCO
|
||||
* Bryan Dongray <http://www.dongrays.com> - provided patches for test scripts failing on older Red Hats
|
||||
* Zev Weiss <www.bewilderbeest.net> - provided patch to fix `splice()` not using stdin
|
||||
* Zing Shishak - provided patch for "`--null`" / "`-0`" (count null terminated lines)
|
||||
* Jacek Wielemborek <http://deetah.jogger.pl/kategorie/english> - implemented fdwatch in Python, suggested PV port; reported bug with "`-l`" and ETA / size; many other contributions
|
||||
* Zing Shishak - provided patch for **--null** / **-0** (count null terminated lines)
|
||||
* Jacek Wielemborek <http://deetah.jogger.pl/kategorie/english> - implemented fdwatch in Python, suggested PV port; reported bug with **-l** and ETA / size; many other contributions
|
||||
* Kim Krecht - suggested buffer fill status and last bytes output display options
|
||||
* Cristian Ciupitu <http://ciupicri.github.io>, Josh Stone - pointed out file descriptor leak with helpful suggestions (Josh Stone initially noticed the missing close)
|
||||
* Jan Seda - found issue with `splice()` and *SPLICE_F_NONBLOCK* causing slowdown
|
||||
* André Stapf - pointed out formatting problem e.g. 13GB -> 13.1GB which should be shown 13.0GB -> 13.1GB; highlighted on-startup row swapping in "`-c`", and suggested "`--discard`"
|
||||
* Damon Harper <http://www.usrbin.ca/> - suggested "`-D`" / "`--delay-start`" option
|
||||
* André Stapf - pointed out formatting problem e.g. 13GB -> 13.1GB which should be shown 13.0GB -> 13.1GB; highlighted on-startup row swapping in **-c**, and suggested **--discard**; suggested making **--fineta** have a "FIN" prefix
|
||||
* Damon Harper <http://www.usrbin.ca/> - suggested **-D** / **--delay-start** option
|
||||
* Ganaël Laplanche <http://www.martymac.org> - provided patch for `lstat64()` on systems that do not support it
|
||||
* Peter Korsgaard <http://www.buildroot.net/> - provided similar patch for `lstat64()`, specifically for uClibc support; provided AIX cross-compilation patch to fix bug in "`-lc128`" check
|
||||
* Peter Korsgaard <http://www.buildroot.net/> - provided similar patch for `lstat64()`, specifically for uClibc support; provided AIX cross-compilation patch to fix bug in **-lc128** check
|
||||
* Ralf Ramsauer <https://blog.ramses-pyramidenbau.de/> - reported bug which dropped transfer rate on terminal resize
|
||||
* Michiel Van Herwegen - reported and discussed bug with "`-l`" and ETA / size
|
||||
* Erkki Seppälä <http://www.inside.org/~flux/> - provided patch implementing "`-I`"
|
||||
* Michiel Van Herwegen - reported and discussed bug with **-l** and ETA / size
|
||||
* Erkki Seppälä <http://www.inside.org/~flux/> - provided patch implementing **-I**
|
||||
* Eric A. Borisch - provided details of compatibility fix for "`%Lu`" in watchpid code
|
||||
* Jan Venekamp - reported MacOS buffer size interactions with pipes
|
||||
* Matt <https://github.com/lemonsqueeze/pv> - provided "rate-window" patches for rate calculation
|
||||
* [Filippo Valsorda](https://github.com/FiloSottile) - provided patch for stat64 issue on Apple Silicon
|
||||
* Matt Koscica, William Dillon - also reported stat64 issue on Apple Silicon
|
||||
* [Demitri Muna](https://github.com/demitri) - assisted with stat64 patch on Apple Silicon
|
||||
* Norman Rasmussen - suggested "`-c`" with "`-d PID:FD`", reject "`-N`" with "`-d PID`"
|
||||
* Norman Rasmussen - suggested **-c** with **-d PID:FD**, reject **-N** with **-d PID**
|
||||
* Andriy Gapon, Jonathan Elchison - reported bug where "`pv /dev/zero >/dev/null &`" stops immediately
|
||||
* Marcelo Chiesa - reported unused-result warnings when compiling PV 1.6.6
|
||||
* Jered Floyd - provided patches to improve "`--rate-limit`"
|
||||
* Jered Floyd - provided patches to improve **--rate-limit**
|
||||
* Christoph Biedl - provided ETA and dynamic interval patches
|
||||
* Richard Fonfara - provided German translations for "`pv --help`"
|
||||
* Johannes Gerer <http://johannesgerer.com> - suggested that "`-B`" should enable "`-C`"
|
||||
* Johannes Gerer <http://johannesgerer.com> - suggested that **-B** should enable **-C**
|
||||
* Sam James - provided fix for number.c build issue caused by missing stddef.h
|
||||
* Jakub Wilk <jwilk@jwilk.net> - corrected README encoding
|
||||
* Frederik Eaton - reported issue with `<()` shell constructs
|
||||
* [gray](https://github.com/gray) - reported issue with "`--force`" and terminal process groups, and proposed a patch
|
||||
* [gray](https://github.com/gray) - reported issue with **--force** and terminal process groups, and proposed a patch
|
||||
* [Luc Gommans](https://github.com/lgommans) / https://lgms.nl/ - provided a "momentary ETA" patch
|
||||
* [ikasty](https://github.com/ikasty) - added relative filename display to "`--watchfd`"
|
||||
* [ikasty](https://github.com/ikasty) - added relative filename display to **--watchfd**
|
||||
* [Michael Weiß](https://github.com/quitschbo) - corrected behaviour when not attached to a terminal
|
||||
* [christoph-zededa](https://github.com/christoph-zededa) - provided OS X support for "`--watchfd`"
|
||||
* [Dave Beckett](https://github.com/dajobe) - added "`@filename`" syntax to "`--size`", and corrected an autoconf problem with stat64 on OS X
|
||||
* [christoph-zededa](https://github.com/christoph-zededa) - provided OS X support for **--watchfd**
|
||||
* [Dave Beckett](https://github.com/dajobe) - added "`@filename`" syntax to **--size**, and corrected an autoconf problem with stat64 on OS X
|
||||
* [Volodymyr Bychkovyak](https://github.com/vbychkoviak) - provided fix for rate limit behaviour with bursty traffic
|
||||
* [Nick Black](https://nick-black.com) - added "`--bits`" option
|
||||
* [Nick Black](https://nick-black.com) - added **--bits** option
|
||||
* [Andrew Schulman](https://github.com/andrew-schulman) - provided reproducible example of terminal size detection issue in 1.7.17/1.7.18
|
||||
* [fuschia74](https://github.com/fuchsia74) - provided "`--enable-static`" patch for "`configure`"
|
||||
* [fuschia74](https://github.com/fuchsia74) - provided **--enable-static** patch for "`configure`"
|
||||
* [Wilhelm von Thiele](https://github.com/TurtleWilly) - assisted with OS X cleanups ([#73](https://codeberg.org/a-j-wood/pv/issues/73), [#74](https://codeberg.org/a-j-wood/pv/issues/74))
|
||||
* Matějů Miroslav, Ing. - suggested fix for ETA and elapsed time faults when suspending and resuming a machine ([#13](https://codeberg.org/a-j-wood/pv/issues/13))
|
||||
* Anthony DeRobertis - suggested the "`--error-skip-block`" option ([#37](https://codeberg.org/a-j-wood/pv/issues/37))
|
||||
* Anthony DeRobertis - suggested the **--error-skip-block** option ([#37](https://codeberg.org/a-j-wood/pv/issues/37))
|
||||
* Benoit Pierre - provided patches for compilation without IPC support, without HAVE_STRUCT_STAT_ST_BLKSIZE, and on MacOS
|
||||
* [gustav-b](https://codeberg.org/gustav-b) - suggested percentage formatting correction ([#80](https://codeberg.org/a-j-wood/pv/issues/80))
|
||||
* [Thomas Bertels](https://codeberg.org/tbertels) - updated French translations ([#83](https://codeberg.org/a-j-wood/pv/pulls/83))
|
||||
* [kevinruddy](https://codeberg.org/kevinruddy) - added decimal units option ([#85](https://codeberg.org/a-j-wood/pv/pulls/85))
|
||||
* [xmort](https://codeberg.org/xmort) - added "`--output`" option ([#90](https://codeberg.org/a-j-wood/pv/pulls/90))
|
||||
* [xmort](https://codeberg.org/xmort) - added **--output** option ([#90](https://codeberg.org/a-j-wood/pv/pulls/90))
|
||||
* [bogiord](https://codeberg.org/bogiord) - reported the loss of output block device size detection in 1.8.10, and suggested the fix ([#91](https://codeberg.org/a-j-wood/pv/issues/91))
|
||||
* [eborisch](https://codeberg.org/eborisch) - provided fix for misbehaviour when used with "`zfs send`" due to treating zero sized writes (generally due to timer interruption) as end of file ([#92](https://codeberg.org/a-j-wood/pv/pulls/92), [#93](https://codeberg.org/a-j-wood/pv/pulls/93))
|
||||
* [alexanderperlis](https://codeberg.org/alexanderperlis) - provided initial support for block devices with "`--size @FILE`" ([#94](https://codeberg.org/a-j-wood/pv/pulls/94))
|
||||
* [jettero](https://codeberg.org/jettero) - reported double-free coredump when using "`--watchfd`" after 1.8.10 ([#96](https://codeberg.org/a-j-wood/pv/issues/96))
|
||||
* [alexanderperlis](https://codeberg.org/alexanderperlis) - provided initial support for block devices with **--size `@`FILE** ([#94](https://codeberg.org/a-j-wood/pv/pulls/94))
|
||||
* [jettero](https://codeberg.org/jettero) - reported double-free coredump when using **--watchfd** after 1.8.10 ([#96](https://codeberg.org/a-j-wood/pv/issues/96))
|
||||
* Venky.N.Iyer - suggested **--stats** ([#49](https://codeberg.org/a-j-wood/pv/issues/49))
|
||||
* Roland Kletzing - suggested **--rate** with **--numeric** ([#17](https://codeberg.org/a-j-wood/pv/issues/17))
|
||||
* [Michael Mior](https://codeberg.org/michaelmior) - suggested **--store-and-forward** ([#100](https://codeberg.org/a-j-wood/pv/issues/100))
|
||||
|
||||
Translations provided through [Codeberg Weblate](https://translate.codeberg.org/projects/pv/):
|
||||
|
||||
* **Czech**
|
||||
* [mmatous](https://translate.codeberg.org/user/mmatous/) (135)
|
||||
* **French**
|
||||
* anonymous suggestions (7)
|
||||
* **German**
|
||||
* [Hartmut Goebel](https://translate.codeberg.org/user/htgoebel/) (77)
|
||||
* [Benny](https://translate.codeberg.org/user/Benny/) (6)
|
||||
* [kre](https://translate.codeberg.org/user/kre/) (2)
|
||||
* [fnetX](https://translate.codeberg.org/user/fnetX/) (1)
|
||||
* **Polish**
|
||||
* [coralpink](https://translate.codeberg.org/user/coralpink/) (96)
|
||||
* **Turkish**
|
||||
* [omerdduran](https://translate.codeberg.org/user/omerdduran/) (129)
|
||||
|
||||
---
|
||||
|
||||
+19
-4
@@ -55,6 +55,15 @@ altered in future.
|
||||
|
||||
## Translation notes
|
||||
|
||||
Translators can use the Weblate instance hosted by Codeberg:
|
||||
[https://translate.codeberg.org/projects/pv/](https://translate.codeberg.org/projects/pv/)
|
||||
|
||||
If you don't see your language listed, raise an issue on the issue tracker
|
||||
(or just email the maintainer) asking for it to be added.
|
||||
|
||||
Alternatively, read on for details of how to maintain the translations
|
||||
directly within the source tree.
|
||||
|
||||
The message catalogues used to translate program messages into other
|
||||
languages are in the "`po/`" directory, named "`xx.po`", where "`xx`"
|
||||
is the ISO 639-1 2-letter language code, such as "`fr`" for French.
|
||||
@@ -128,14 +137,20 @@ these will need to be corrected by translators.
|
||||
|
||||
The package maintainer should run through these steps for a new release:
|
||||
|
||||
* Check for patches and bug reports at https://tracker.debian.org/pkg/pv
|
||||
* Check for patches and bug reports:
|
||||
* <https://codeberg.org/a-j-wood/pv/issues>
|
||||
* <https://tracker.debian.org/pkg/pv>
|
||||
* <https://launchpad.net/ubuntu/+source/pv>
|
||||
* <https://archlinux.org/packages/extra/x86_64/pv/>
|
||||
* <https://packages.gentoo.org/packages/sys-apps/pv>
|
||||
* <https://cvsweb.openbsd.org/ports/sysutils/pv/>
|
||||
* <https://packages.fedoraproject.org/pkgs/pv/pv/>
|
||||
* Run "`make indent; make indent indentclean check`"
|
||||
* Run "`make -C po update-po`"
|
||||
* Run "`make analyse`" and see whether remaining warnings can be addressed
|
||||
* Version bump and documentation checks:
|
||||
* Update the version in `configure.ac` and `docs/NEWS.md`
|
||||
* Check that `docs/NEWS.md` is up to date
|
||||
* Check that `docs/TODO.md` is up to date
|
||||
* Check that the manual `docs/pv.1` is up to date
|
||||
* Run "`make docs/pv.1.md`" and, if using VPATH, copy the result to the source directory
|
||||
* Check that the year displayed by src/main/version.c is correct
|
||||
@@ -148,8 +163,8 @@ The package maintainer should run through these steps for a new release:
|
||||
* Run "`make release MAINTAINER=<signing-user>`"
|
||||
* Update the project web site:
|
||||
* Copy the release `.tar.gz`, `.txt`, and `.asc` files to the web site
|
||||
* Use "`pandoc --from markdown --to html`" to convert the TODO, news, and manual to HTML
|
||||
* Update the TODO, news, and manual on the web site
|
||||
* Use "`pandoc --from markdown --to html`" to convert the news and manual to HTML
|
||||
* Update the news and manual on the web site
|
||||
* Update the version numbers on the web site
|
||||
* Update the package index on the web site
|
||||
* Create a new release in the repository, and apply the associated tag
|
||||
|
||||
+171
-145
@@ -1,76 +1,102 @@
|
||||
### 1.9.0 - 15 October 2024
|
||||
|
||||
* *feature:* new **--store-and-forward** option to read input to a file first, then write it to the output ([#100](https://codeberg.org/a-j-wood/pv/issues/100))
|
||||
* *feature:* new **--stats** option to show transfer stats at the end, like "`ping`" ([#49](https://codeberg.org/a-j-wood/pv/issues/49))
|
||||
* *feature:* **--rate** can now be used with **--numeric** ([#17](https://codeberg.org/a-j-wood/pv/issues/17))
|
||||
* *feature:* **--gauge** with **--progress** to show rate gauge when size is unknown ([#46](https://codeberg.org/a-j-wood/pv/issues/46))
|
||||
* *i18n:* comprehensive German translations update
|
||||
* *i18n:* comprehensive Polish translations update
|
||||
* *i18n:* complete Turkish translations added
|
||||
* *i18n:* complete Czech translations added
|
||||
* *i18n:* updates to French translations
|
||||
* *fix:* resume stopped pipelines when running in the background (part of [#56](https://codeberg.org/a-j-wood/pv/issues/56))
|
||||
* *fix*: inspect the output pipe buffer to give a more accurate progress indicator of how much the next command has consumed
|
||||
* *fix:* prefix completion time (**--fineta**) with *FIN* rather than *ETA* ([#43](https://codeberg.org/a-j-wood/pv/issues/43))
|
||||
* *fix:* surround average rate (**--average-rate**) with brackets rather than square brackets
|
||||
* *fix:* correct a memory leak in **--watchfd PID**
|
||||
* *fix:* make **--direct-io** work correctly with **--output** instead of assuming stdout
|
||||
* *fix:* call `posix_fadvise()` on every input, not just the first one
|
||||
* *fix:* write UTC timestamps in debugging mode to avoid lockups in signal handlers
|
||||
* *security:* added a signed *MANIFEST* file to releases
|
||||
* *cleanup:* removed TODO.md, since it's just an outdated copy of the issue tracker
|
||||
* *cleanup:* re-ordered structure members to reduce padding
|
||||
* *cleanup:* improved readability of *SIGTTOU* handling code
|
||||
* *cleanup:* refactored to separate display, transfer, and calculation more cleanly
|
||||
* *cleanup:* instead of moving stderr when backgrounded, set a suspend-output flag
|
||||
|
||||
### 1.8.14 - 7 September 2024
|
||||
|
||||
* fix: correct double-free on exit when using "`--watchfd`" ([#96](https://codeberg.org/a-j-wood/pv/issues/96)) reported by [jettero](https://codeberg.org/jettero)
|
||||
* *fix:* correct double-free on exit when using **--watchfd** ([#96](https://codeberg.org/a-j-wood/pv/issues/96)) reported by [jettero](https://codeberg.org/jettero)
|
||||
|
||||
### 1.8.13 - 18 August 2024
|
||||
|
||||
* feature: when using "`--size @FILE`", _FILE_ can be a block device, and its size will be used (pull request [#94](https://codeberg.org/a-j-wood/pv/pulls/94)) supplied by [alexanderperlis](https://codeberg.org/alexanderperlis)
|
||||
* *feature:* when using **--size @FILE**, *FILE* can be a block device, and its size will be used (pull request [#94](https://codeberg.org/a-j-wood/pv/pulls/94)) supplied by [alexanderperlis](https://codeberg.org/alexanderperlis)
|
||||
|
||||
### 1.8.12 - 18 July 2024
|
||||
|
||||
* fix: correct the detection of output block device size that was broken in 1.8.10 ([#91](https://codeberg.org/a-j-wood/pv/issues/91))
|
||||
* fix: do not treat a zero/interrupted write as an end of file (pull requests [#92](https://codeberg.org/a-j-wood/pv/pulls/92) and [#93](https://codeberg.org/a-j-wood/pv/pulls/93))
|
||||
* *fix:* correct the detection of output block device size that was broken in 1.8.10 ([#91](https://codeberg.org/a-j-wood/pv/issues/91))
|
||||
* *fix:* do not treat a zero/interrupted write as an end of file (pull requests [#92](https://codeberg.org/a-j-wood/pv/pulls/92) and [#93](https://codeberg.org/a-j-wood/pv/pulls/93))
|
||||
|
||||
### 1.8.10 - 15 June 2024
|
||||
|
||||
* feature: new "`--output`" option to write to a file instead of standard output (pull request [#90](https://codeberg.org/a-j-wood/pv/pulls/90)) supplied by [xmort](https://codeberg.org/xmort)
|
||||
* *feature:* new **--output** option to write to a file instead of standard output (pull request [#90](https://codeberg.org/a-j-wood/pv/pulls/90)) supplied by [xmort](https://codeberg.org/xmort)
|
||||
|
||||
### 1.8.9 - 21 April 2024
|
||||
|
||||
* feature: new "`--si`" option to display and interpret size suffixes in multiples of 1000 rather than 1024 (pull request [#85](https://codeberg.org/a-j-wood/pv/pulls/85)) supplied by [kevinruddy](https://codeberg.org/kevinruddy)
|
||||
* fix: continue producing progress output when the output is blocking writes ([#34](https://codeberg.org/a-j-wood/pv/issues/34), [#86](https://codeberg.org/a-j-wood/pv/issues/86), [#87](https://codeberg.org/a-j-wood/pv/issues/87))
|
||||
* fix: honour the _TMPDIR_ / _TMP_ environment variables again, rather than hard-coding "`/tmp`", when using a terminal lock file (originally removed in 1.8.0) ([#88](https://codeberg.org/a-j-wood/pv/issues/88))
|
||||
* i18n: corrections and missing strings added to French translations (pull request [#83](https://codeberg.org/a-j-wood/pv/pulls/83)) supplied by [Thomas Bertels](https://codeberg.org/tbertels)
|
||||
* *feature:* new **--si** option to display and interpret size suffixes in multiples of 1000 rather than 1024 (pull request [#85](https://codeberg.org/a-j-wood/pv/pulls/85)) supplied by [kevinruddy](https://codeberg.org/kevinruddy)
|
||||
* *fix:* continue producing progress output when the output is blocking writes ([#34](https://codeberg.org/a-j-wood/pv/issues/34), [#86](https://codeberg.org/a-j-wood/pv/issues/86), [#87](https://codeberg.org/a-j-wood/pv/issues/87))
|
||||
* *fix:* honour the *TMPDIR* / *TMP* environment variables again, rather than hard-coding "`/tmp`", when using a terminal lock file (originally removed in 1.8.0) ([#88](https://codeberg.org/a-j-wood/pv/issues/88))
|
||||
* *i18n:* corrections and missing strings added to French translations (pull request [#83](https://codeberg.org/a-j-wood/pv/pulls/83)) supplied by [Thomas Bertels](https://codeberg.org/tbertels)
|
||||
|
||||
### 1.8.5 - 19 November 2023
|
||||
|
||||
* fix: corrected percentage formatting so it doesn't jump from 2 to 3 characters wide at 100% ([#80](https://codeberg.org/a-j-wood/pv/issues/80))
|
||||
* fix: replaced "`--remote`" mechanism, using a temporary file instead of SysV IPC, so it can work reliably even when there are multiple PV instances
|
||||
* fix: corrected compilation failure when without IPC support
|
||||
* security: addressed all issues highlighted by the software auditing tools "`splint`" and "`flawfinder`" (see "`make analyse`") ([#77](https://codeberg.org/a-j-wood/pv/issues/77))
|
||||
* cleanup: compilation warnings fixed on non-IPC and MacOS systems
|
||||
* *fix:* corrected percentage formatting so it doesn't jump from 2 to 3 characters wide at 100% ([#80](https://codeberg.org/a-j-wood/pv/issues/80))
|
||||
* *fix:* replaced **--remote** mechanism, using a temporary file instead of SysV IPC, so it can work reliably even when there are multiple PV instances
|
||||
* *fix:* corrected compilation failure when without IPC support
|
||||
* *security:* addressed all issues highlighted by the software auditing tools "`splint`" and "`flawfinder`" (see "`make analyse`") ([#77](https://codeberg.org/a-j-wood/pv/issues/77))
|
||||
* *cleanup:* compilation warnings fixed on non-IPC and MacOS systems
|
||||
|
||||
### 1.8.0 - 24 September 2023
|
||||
|
||||
#### Features
|
||||
|
||||
* feature: new "`--discard`" option to discard input as if writing to */dev/null* ([#42](https://codeberg.org/a-j-wood/pv/issues/42))
|
||||
* feature: new "`--error-skip-block`" option to make "`--skip-errors`" skip whole blocks ([#37](https://codeberg.org/a-j-wood/pv/issues/37))
|
||||
* feature: use `posix_fadvise()` like `cat`(1) does, to improve efficiency ([#39](https://codeberg.org/a-j-wood/pv/issues/39))
|
||||
* feature: new "`--enable-static`" option to "`configure`" for static builds ([#75](https://codeberg.org/a-j-wood/pv/pull/75))
|
||||
* *feature:* new **--discard** option to discard input as if writing to */dev/null* ([#42](https://codeberg.org/a-j-wood/pv/issues/42))
|
||||
* *feature:* new **--error-skip-block** option to make **--skip-errors** skip whole blocks ([#37](https://codeberg.org/a-j-wood/pv/issues/37))
|
||||
* *feature:* use `posix_fadvise()` like `cat`(1) does, to improve efficiency ([#39](https://codeberg.org/a-j-wood/pv/issues/39))
|
||||
* *feature:* new **--enable-static** option to "`configure`" for static builds ([#75](https://codeberg.org/a-j-wood/pv/pull/75))
|
||||
|
||||
#### Security
|
||||
|
||||
* security: with "`--pidfile`", write to a temporary file and rename it into place, to improve security
|
||||
* security: keep self-contained copies of name and format string in PV internal state for memory safety
|
||||
* security: ignore _TMP_ / _TMPDIR_ environment variables when using a terminal lock file
|
||||
* *security:* with **--pidfile**, write to a temporary file and rename it into place, to improve security
|
||||
* *security:* keep self-contained copies of name and format string in PV internal state for memory safety
|
||||
* *security:* ignore *TMP* / *TMPDIR* environment variables when using a terminal lock file
|
||||
|
||||
#### Fixes
|
||||
|
||||
* fix: only report errors about missing files when starting to transfer from them, not while calculating size, and behave more like `cat`(1) by skipping them and moving on
|
||||
* fix: auto-calculate total line count with "`--line-mode`" when all inputs are regular files
|
||||
* fix: use `clock_gettime()` in ETA calculation to cope with machine suspend/resume ([#13](https://codeberg.org/a-j-wood/pv/issues/13))
|
||||
* fix: if "`--width`" or "`--height`" were provided, do not change them when the window size changes ([#36](https://codeberg.org/a-j-wood/pv/issues/36))
|
||||
* fix: when a file descriptor position in "`--watchfd`" moves backwards, show the rate using the correct prefix ([#41](https://codeberg.org/a-j-wood/pv/issues/41))
|
||||
* fix: rewrite terminal state save/restore so state is not intermittently garbled on exit when using "`--cursor`" ([#20](https://codeberg.org/a-j-wood/pv/issues/20)), ([#24](https://codeberg.org/a-j-wood/pv/issues/24))
|
||||
* *fix:* only report errors about missing files when starting to transfer from them, not while calculating size, and behave more like `cat`(1) by skipping them and moving on
|
||||
* *fix:* auto-calculate total line count with **--line-mode** when all inputs are regular files
|
||||
* *fix:* use `clock_gettime()` in ETA calculation to cope with machine suspend/resume ([#13](https://codeberg.org/a-j-wood/pv/issues/13))
|
||||
* *fix:* if **--width** or **--height** were provided, do not change them when the window size changes ([#36](https://codeberg.org/a-j-wood/pv/issues/36))
|
||||
* *fix:* when a file descriptor position in **--watchfd** moves backwards, show the rate using the correct prefix ([#41](https://codeberg.org/a-j-wood/pv/issues/41))
|
||||
* *fix:* rewrite terminal state save/restore so state is not intermittently garbled on exit when using **--cursor** ([#20](https://codeberg.org/a-j-wood/pv/issues/20)), ([#24](https://codeberg.org/a-j-wood/pv/issues/24))
|
||||
|
||||
#### Cleanups
|
||||
|
||||
* cleanup: addressed many potential issues highlighted by the software auditing tools "`splint`" and "`flawfinder`" (see new target "`make analyse`")
|
||||
* cleanup: switched the build system to GNU Automake
|
||||
* cleanup: replaced the test harness with the one native to GNU Automake
|
||||
* cleanup: added a test for terminal width detection to "`make check`"
|
||||
* cleanup: added a test to "`make check`" to ensure that "`make install`" installs everything expected
|
||||
* cleanup: replaced *AC_HEADER_TIOCGWINSZ* with *AC_CHECK_HEADERS(sys/ioctl.h)* for better MacOS compatibility ([#74](https://codeberg.org/a-j-wood/pv/issues/74))
|
||||
* cleanup: with "`--sync`", call `fsync()` instead of `fdatasync()` on incapable systems ([#73](https://codeberg.org/a-j-wood/pv/issues/73))
|
||||
* cleanup: the manual is now a static file instead of needing to be built with "`configure`"
|
||||
* *cleanup:* addressed many potential issues highlighted by the software auditing tools "`splint`" and "`flawfinder`" (see new target "`make analyse`")
|
||||
* *cleanup:* switched the build system to GNU Automake
|
||||
* *cleanup:* replaced the test harness with the one native to GNU Automake
|
||||
* *cleanup:* added a test for terminal width detection to "`make check`"
|
||||
* *cleanup:* added a test to "`make check`" to ensure that "`make install`" installs everything expected
|
||||
* *cleanup:* replaced *AC_HEADER_TIOCGWINSZ* with *AC_CHECK_HEADERS(sys/ioctl.h)* for better MacOS compatibility ([#74](https://codeberg.org/a-j-wood/pv/issues/74))
|
||||
* *cleanup:* with **--sync**, call `fsync()` instead of `fdatasync()` on incapable systems ([#73](https://codeberg.org/a-j-wood/pv/issues/73))
|
||||
* *cleanup:* the manual is now a static file instead of needing to be built with "`configure`"
|
||||
|
||||
#### Dropped items
|
||||
|
||||
* dropped: dropped support for "`--enable-static-nls`"
|
||||
* dropped: removed the Linux Software Map file, as the LSM project appears to be long dead
|
||||
* dropped: will no longer publish to SourceForge as it has a chequered history and is unnecessary
|
||||
* dropped: removed project from GitHub and moved to Codeberg - see "[Give Up GitHub](https://giveupgithub.org/)"
|
||||
* *dropped:* dropped support for **--enable-static-nls**
|
||||
* *dropped:* removed the Linux Software Map file, as the LSM project appears to be long dead
|
||||
* *dropped:* will no longer publish to SourceForge as it has a chequered history and is unnecessary
|
||||
* *dropped:* removed project from GitHub and moved to Codeberg - see "[Give Up GitHub](https://giveupgithub.org/)"
|
||||
|
||||
#### Other items
|
||||
|
||||
@@ -78,89 +104,89 @@
|
||||
|
||||
### 1.7.24 - 30 July 2023
|
||||
|
||||
* fix: correct terminal size detection, broken in 1.7.17 by the configuration script rewrite ([#72](https://codeberg.org/a-j-wood/pv/issues/72))
|
||||
* security: removed *DEBUG* environment variable in debug mode, added "`--debug`" instead
|
||||
* cleanup: added "`make analyse`" to run "`splint`" and "`flawfinder`" on all source files
|
||||
* cleanup: corrected detection of boolean capability
|
||||
* cleanup: word wrapping of "`--help`" output is now multi-byte locale aware
|
||||
* cleanup: adjusted "`indent`" rules to line length of 120 and reformatted code
|
||||
* *fix:* correct terminal size detection, broken in 1.7.17 by the configuration script rewrite ([#72](https://codeberg.org/a-j-wood/pv/issues/72))
|
||||
* *security:* removed *DEBUG* environment variable in debug mode, added **--debug** instead
|
||||
* *cleanup:* added "`make analyse`" to run "`splint`" and "`flawfinder`" on all source files
|
||||
* *cleanup:* corrected detection of boolean capability
|
||||
* *cleanup:* word wrapping of **--help** output is now multi-byte locale aware
|
||||
* *cleanup:* adjusted "`indent`" rules to line length of 120 and reformatted code
|
||||
|
||||
### 1.7.18 - 28 July 2023
|
||||
|
||||
* fix: language file installation had been broken by the configuration script rewrite
|
||||
* *fix:* language file installation had been broken by the configuration script rewrite
|
||||
|
||||
### 1.7.17 - 27 July 2023
|
||||
|
||||
* feature: new "`--sync`" option to flush cache to disk after every write (related to [#6](https://codeberg.org/a-j-wood/pv/issues/6), to improve accuracy when writing to slow disks)
|
||||
* feature: new "`--direct-io`" option to bypass cache - implements [#29 "Option to enable *O_DIRECT*"](https://codeberg.org/a-j-wood/pv/issues/29) - requested by Romain Kang, Jacek Wielemborek
|
||||
* fix: correct byte prefix size to 2 spaces in rate display, so progress display size remains constant at low transfer rates
|
||||
* cleanup: rewrote `configure.in` as per suggestions in newer "`autoconf`" manuals
|
||||
* cleanup: replaced `header.in` with one generated by "`autoheader`", moving custom logic to a separate header file "`config-aux.h`"
|
||||
* cleanup: added copyright notice to all source files as per GNU standards
|
||||
* cleanup: changed "`--version`" output to conform to GNU standards
|
||||
* cleanup: replaced backticks with `$()` in all shell scripts that did not come from elsewhere, as backticks are deprecated and harder to read
|
||||
* cleanup: improved the output formatting of "`make test`"
|
||||
* cleanup: extended the "`make test`" mechanism to allow certain tests to be skipped on platforms that cannot support them
|
||||
* cleanup: skip the "pipe" test (for *SIGPIPE*) if GNU "`head`" is not available, so that "`make test`" on stock OpenBSD 7.3 works
|
||||
* cleanup: added a lot more tests to "`make test`"
|
||||
* cleanup: replace all calls to `sprintf()` and `snprintf()` with a new wrapper function `pv_snprintf()` to improve security and compatibility
|
||||
* cleanup: replace all calls to `strcat()` with a wrapper `pv_strlcat()` to improve security and compatibility
|
||||
* cleanup: replace all `write()` calls to the terminal with a wrapper `pv_write_retry()` for consistency
|
||||
* cleanup: tidy up and fix compilation warning in "`--watchfd`" code
|
||||
* cleanup: rewrote all local shell scripts to pass analysis by [ShellCheck](https://www.shellcheck.net)
|
||||
* *feature:* new **--sync** option to flush cache to disk after every write (related to [#6](https://codeberg.org/a-j-wood/pv/issues/6), to improve accuracy when writing to slow disks)
|
||||
* *feature:* new **--direct-io** option to bypass cache - implements [#29 "Option to enable O_DIRECT"](https://codeberg.org/a-j-wood/pv/issues/29) - requested by Romain Kang, Jacek Wielemborek
|
||||
* *fix:* correct byte prefix size to 2 spaces in rate display, so progress display size remains constant at low transfer rates
|
||||
* *cleanup:* rewrote `configure.in` as per suggestions in newer "`autoconf`" manuals
|
||||
* *cleanup:* replaced `header.in` with one generated by "`autoheader`", moving custom logic to a separate header file "`config-aux.h`"
|
||||
* *cleanup:* added copyright notice to all source files as per GNU standards
|
||||
* *cleanup:* changed **--version** output to conform to GNU standards
|
||||
* *cleanup:* replaced backticks with `$()` in all shell scripts that did not come from elsewhere, as backticks are deprecated and harder to read
|
||||
* *cleanup:* improved the output formatting of "`make test`"
|
||||
* *cleanup:* extended the "`make test`" mechanism to allow certain tests to be skipped on platforms that cannot support them
|
||||
* *cleanup:* skip the "pipe" test (for *SIGPIPE*) if GNU "`head`" is not available, so that "`make test`" on stock OpenBSD 7.3 works
|
||||
* *cleanup:* added a lot more tests to "`make test`"
|
||||
* *cleanup:* replace all calls to `sprintf()` and `snprintf()` with a new wrapper function `pv_snprintf()` to improve security and compatibility
|
||||
* *cleanup:* replace all calls to `strcat()` with a wrapper `pv_strlcat()` to improve security and compatibility
|
||||
* *cleanup:* replace all `write()` calls to the terminal with a wrapper `pv_write_retry()` for consistency
|
||||
* *cleanup:* tidy up and fix compilation warning in **--watchfd** code
|
||||
* *cleanup:* rewrote all local shell scripts to pass analysis by [ShellCheck](https://www.shellcheck.net)
|
||||
|
||||
### 1.7.0 - 17 July 2023
|
||||
|
||||
* dropped: support for Red Hat Enterprise Linux and its derivatives has been dropped; removed the RPM spec file, and will no longer build binaries
|
||||
* feature: the "`--size`" option now accepts "`@filename`" to use the size of another file (pull request [#57](https://codeberg.org/a-j-wood/pv/pull/57) supplied by [Dave Beckett](https://github.com/dajobe))
|
||||
* feature: the "`--watchfd`" option is now available on OS X (pull request [#60](https://codeberg.org/a-j-wood/pv/pull/60) supplied by [christoph-zededa](https://github.com/christoph-zededa))
|
||||
* feature: new "`--bits`" option to show bit count instead of byte count (adapted from pull request [#63](https://codeberg.org/a-j-wood/pv/pull/63) supplied by [Nick Black](https://nick-black.com))
|
||||
* feature: new "`--average-rate-window`" option, to set the window over which the average rate is calculated, also used for ETA (modified from pull request [#65](https://codeberg.org/a-j-wood/pv/pull/65) supplied by [lemonsqueeze](https://github.com/lemonsqueeze))
|
||||
* feature: the "`--watchfd`" option will now show relative filenames, if they are under the current directory (pull request [#66](https://codeberg.org/a-j-wood/pv/pull/66) supplied by [ikasty](https://github.com/ikasty))
|
||||
* fix: correction to `pv_in_foreground()` to behave as its comment block says it should, when not on a terminal - corrects [#19 "No output in Arch Linux initcpio after 1.6.6"](https://codeberg.org/a-j-wood/pv/issues/19), [#31 "No output written from inside zsh <() construct"](https://codeberg.org/a-j-wood/pv/issues/31), [#55 "pv Stopped Working in the Background"](https://codeberg.org/a-j-wood/pv/issues/55) (pull request [#64](https://codeberg.org/a-j-wood/pv/pull/64) supplied by [Michael Weiß](https://github.com/quitschbo))
|
||||
* fix: workaround for OS X 11 behaviour in configure script regarding stat64 at compile time (pull request [#57](https://codeberg.org/a-j-wood/pv/pull/57) supplied by [Dave Beckett](https://github.com/dajobe))
|
||||
* fix: workaround for macOS equivalence of stat to stat64 - patches from [Filippo Valsorda](https://github.com/FiloSottile) and [Demitri Muna](https://github.com/demitri), correcting [#33 "Fix compilation problems due to `stat64()` on Apple Silicon"](https://codeberg.org/a-j-wood/pv/issues/33)
|
||||
* fix: add burst rate limit to transfer, so rate limits are not broken by bursty traffic (pull request [#62](https://codeberg.org/a-j-wood/pv/pull/62) supplied by [Volodymyr Bychkovyak](https://github.com/vbychkoviak))
|
||||
* fix: corrected "`--force`" option so it will still output progress when not in the same process group as the owner of the terminal - corrects [#23 "No output with "`-f`" when run in background after 1.6.6"](https://codeberg.org/a-j-wood/pv/issues/23) and helps to correct [#31 "No output written from inside zsh <() construct"](https://codeberg.org/a-j-wood/pv/issues/31)
|
||||
* fix: corrected elapsed time display to show as D:HH:MM:SS after 1 day, like the ETA does - corrects [#16 "Show days in same format in ETA as in elapsed time"](https://codeberg.org/a-j-wood/pv/issues/16)
|
||||
* fix: corrected bug where percentages went down after 100% when in "`--numeric`" mode with a "`--size`" that was too small - corrects [#26 "Correct "`-n`" behaviour when going past 100% of "`-s`" size"](https://codeberg.org/a-j-wood/pv/issues/26)
|
||||
* i18n: recoded Polish translation file to UTF-8
|
||||
* i18n: removed inaccurate fuzzy translation matches
|
||||
* docs: moved all open issues into GitHub and updated the TODO list
|
||||
* docs: renamed README to README.md and altered it to Markdown format
|
||||
* docs: moved contributors from the README to docs/ACKNOWLEDGEMENTS.md
|
||||
* docs: moved TODO to TODO.md and altered it to Markdown format
|
||||
* docs: moved NEWS to NEWS.md, converted it to UTF-8, and altered it to Markdown format
|
||||
* *dropped:* support for Red Hat Enterprise Linux and its derivatives has been dropped; removed the RPM spec file, and will no longer build binaries
|
||||
* *feature:* the **--size** option now accepts "`@filename`" to use the size of another file (pull request [#57](https://codeberg.org/a-j-wood/pv/pull/57) supplied by [Dave Beckett](https://github.com/dajobe))
|
||||
* *feature:* the **--watchfd** option is now available on OS X (pull request [#60](https://codeberg.org/a-j-wood/pv/pull/60) supplied by [christoph-zededa](https://github.com/christoph-zededa))
|
||||
* *feature:* new **--bits** option to show bit count instead of byte count (adapted from pull request [#63](https://codeberg.org/a-j-wood/pv/pull/63) supplied by [Nick Black](https://nick-black.com))
|
||||
* *feature:* new **--average-rate-window** option, to set the window over which the average rate is calculated, also used for ETA (modified from pull request [#65](https://codeberg.org/a-j-wood/pv/pull/65) supplied by [lemonsqueeze](https://github.com/lemonsqueeze))
|
||||
* *feature:* the **--watchfd** option will now show relative filenames, if they are under the current directory (pull request [#66](https://codeberg.org/a-j-wood/pv/pull/66) supplied by [ikasty](https://github.com/ikasty))
|
||||
* *fix:* correction to `pv_in_foreground()` to behave as its comment block says it should, when not on a terminal - corrects [#19 "No output in Arch Linux initcpio after 1.6.6"](https://codeberg.org/a-j-wood/pv/issues/19), [#31 "No output written from inside zsh <() construct"](https://codeberg.org/a-j-wood/pv/issues/31), [#55 "pv Stopped Working in the Background"](https://codeberg.org/a-j-wood/pv/issues/55) (pull request [#64](https://codeberg.org/a-j-wood/pv/pull/64) supplied by [Michael Weiß](https://github.com/quitschbo))
|
||||
* *fix:* workaround for OS X 11 behaviour in configure script regarding stat64 at compile time (pull request [#57](https://codeberg.org/a-j-wood/pv/pull/57) supplied by [Dave Beckett](https://github.com/dajobe))
|
||||
* *fix:* workaround for macOS equivalence of stat to stat64 - patches from [Filippo Valsorda](https://github.com/FiloSottile) and [Demitri Muna](https://github.com/demitri), correcting [#33 "Fix compilation problems due to `stat64()` on Apple Silicon"](https://codeberg.org/a-j-wood/pv/issues/33)
|
||||
* *fix:* add burst rate limit to transfer, so rate limits are not broken by bursty traffic (pull request [#62](https://codeberg.org/a-j-wood/pv/pull/62) supplied by [Volodymyr Bychkovyak](https://github.com/vbychkoviak))
|
||||
* *fix:* corrected **--force** option so it will still output progress when not in the same process group as the owner of the terminal - corrects [#23 "No output with "-f" when run in background after 1.6.6"](https://codeberg.org/a-j-wood/pv/issues/23) and helps to correct [#31 "No output written from inside zsh <() construct"](https://codeberg.org/a-j-wood/pv/issues/31)
|
||||
* *fix:* corrected elapsed time display to show as D:HH:MM:SS after 1 day, like the ETA does - corrects [#16 "Show days in same format in ETA as in elapsed time"](https://codeberg.org/a-j-wood/pv/issues/16)
|
||||
* *fix:* corrected bug where percentages went down after 100% when in **--numeric** mode with a **--size** that was too small - corrects [#26 "Correct "-n" behaviour when going past 100% of "-s" size"](https://codeberg.org/a-j-wood/pv/issues/26)
|
||||
* *i18n:* recoded Polish translation file to UTF-8
|
||||
* *i18n:* removed inaccurate fuzzy translation matches
|
||||
* *docs:* moved all open issues into GitHub and updated the TODO list
|
||||
* *docs:* renamed README to README.md and altered it to Markdown format
|
||||
* *docs:* moved contributors from the README to docs/ACKNOWLEDGEMENTS.md
|
||||
* *docs:* moved TODO to TODO.md and altered it to Markdown format
|
||||
* *docs:* moved NEWS to NEWS.md, converted it to UTF-8, and altered it to Markdown format
|
||||
|
||||
### 1.6.20 - 12 September 2021
|
||||
|
||||
* fix: add missing `stddef.h` include to `number.c` (Sam James)
|
||||
* *fix:* add missing `stddef.h` include to `number.c` (Sam James)
|
||||
|
||||
### 1.6.19 - 5 September 2021
|
||||
|
||||
* fix: starting pv in the background no longer immediately stops unless the transfer is to/from the terminal (Andriy Gapon, Jonathan Elchison)
|
||||
* fix: using "`-B`", "`-A`", or "`-T`" now switches on "`-C`" implicitly (Johannes Gerer, André Stapf)
|
||||
* fix: AIX build fixes (Peter Korsgaard)
|
||||
* i18n: updated German "`--help`" translations (Richard Fonfara)
|
||||
* i18n: switched to UTF-8 encoding, added missing translations (de,fr,pt)
|
||||
* docs: new "common switches" manual section (Jacek Wielemborek)
|
||||
* docs: use placeholder instead of `/dev/sda` in the manual (Pranav Peshwe)
|
||||
* docs: mention MacOS pipes and "`-B 1024`" in the manual (Jan Venekamp)
|
||||
* docs: correct shell in `autoconf/scripts/index.sh` (Juan Picca)
|
||||
* cleanup: various compiler warnings cleaned up
|
||||
* *fix:* starting pv in the background no longer immediately stops unless the transfer is to/from the terminal (Andriy Gapon, Jonathan Elchison)
|
||||
* *fix:* using **-B**, **-A**, or **-T** now switches on **-C** implicitly (Johannes Gerer, André Stapf)
|
||||
* *fix:* AIX build fixes (Peter Korsgaard)
|
||||
* *i18n:* updated German **--help** translations (Richard Fonfara)
|
||||
* *i18n:* switched to UTF-8 encoding, added missing translations (de,fr,pt)
|
||||
* *docs:* new "common switches" manual section (Jacek Wielemborek)
|
||||
* *docs:* use placeholder instead of `/dev/sda` in the manual (Pranav Peshwe)
|
||||
* *docs:* mention MacOS pipes and **-B 1024** in the manual (Jan Venekamp)
|
||||
* *docs:* correct shell in `autoconf/scripts/index.sh` (Juan Picca)
|
||||
* *cleanup:* various compiler warnings cleaned up
|
||||
|
||||
Full changelog is below:
|
||||
|
||||
* (r181) added common switches section to manual (Jacek Wielemborek)
|
||||
* (r184) use placeholder instead of /dev/sda in the manual (Pranav Peshwe)
|
||||
* (r185) replace ash with sh in autoconf/scripts/index.sh (Juan Picca)
|
||||
* (r185) added note to manual about "`-B 1024`" in MacOS pipes (Jan Venekamp)
|
||||
* (r185) added note to manual about **-B 1024** in MacOS pipes (Jan Venekamp)
|
||||
* (r185) fix AIX config check when the CWD contains "yes" (Peter Korsgaard)
|
||||
* (r189) (#1556) updated German "`--help`" translations (Richard Fonfara)
|
||||
* (r189) (#1556) updated German **--help** translations (Richard Fonfara)
|
||||
* (r189) updated missing German translations and changed to UTF-8 encoding
|
||||
* (r191) updated missing French translations and changed to UTF-8 encoding
|
||||
* (r193) updated missing Portuguese translations, changed to UTF-8 encoding
|
||||
* (r196) (#1563) using "`-B`", "`-A`", or "`-T`" now switches on "`-C`" implicitly (Johannes Gerer, André Stapf)
|
||||
* (r196) (#1563) using **-B**, **-A**, or **-T** now switches on **-C** implicitly (Johannes Gerer, André Stapf)
|
||||
* (r199) fixed numerous compiler warnings in newer GCC versions
|
||||
* (r200,205) fixed bug where "`pv /dev/zero >/dev/null &`" stopped immediately (Jonathan Elchison, Andriy Gapon)
|
||||
* (r203,205) marked unused arguments with GCC unused attribute, started using boolean data type for flags, corrected more compiler warnings
|
||||
@@ -168,22 +194,22 @@ Full changelog is below:
|
||||
### 1.6.6 - 30 June 2017
|
||||
|
||||
* (r161) use `%llu` instead of `%Lu` for better compatibility (Eric A. Borisch)
|
||||
* (r162) (#1532) fix target buffer size ("`-B`") being ignored (AndCycle, Ilya Basin, Antoine Beaupré)
|
||||
* (r162) (#1532) fix target buffer size (**-B**) being ignored (AndCycle, Ilya Basin, Antoine Beaupré)
|
||||
* (r164) cap read/write sizes, and check elapsed time during read/write cycles, to avoid display hangs with large buffers or slow media; also remove `select()` call from repeated_write function as it slows the transfer down and the wrapping `alarm()` means it is unnecessary
|
||||
* (r169) (#1477) use alternate form for transfer counter, such that 13GB is shown as 13.0GB so it's the same width as 13.1GB (André Stapf)
|
||||
* (r171) cleanup: units corrections in man page, of the form kb -> KiB
|
||||
* (r175) report error in "`-d`" if process fd directory is unreadable, or if process disappears before we start the main loop (Jacek Wielemborek)
|
||||
* (r175) report error in **-d** if process fd directory is unreadable, or if process disappears before we start the main loop (Jacek Wielemborek)
|
||||
|
||||
### 1.6.0 - 15 March 2015
|
||||
|
||||
* fix lstat64 support when unavailable - separate patches supplied by Ganael Laplanche and Peter Korsgaard
|
||||
* (#1506) new option "`-D`" / "`--delay-start`" to only show bar after N seconds (Damon Harper)
|
||||
* new option "`--fineta`" / "`-I`" to show ETA as time of day rather than time remaining - patch supplied by Erkki Seppälä (r147)
|
||||
* (#1509) change ETA ("`--eta`" / "`-e`") so that days are given if the hours remaining are 24 or more (Jacek Wielemborek)
|
||||
* (#1506) new option **-D** / **--delay-start** to only show bar after N seconds (Damon Harper)
|
||||
* new option **--fineta** / **-I** to show ETA as time of day rather than time remaining - patch supplied by Erkki Seppälä (r147)
|
||||
* (#1509) change ETA (**--eta** / **-e**) so that days are given if the hours remaining are 24 or more (Jacek Wielemborek)
|
||||
* (#1499) repeat read and write attempts on partial buffer fill/empty to work around post-signal transfer rate drop reported by Ralf Ramsauer
|
||||
* (#1507) do not try to calculate total size in line mode, due to bug reported by Jacek Wielemborek and Michiel Van Herwegen
|
||||
* cleanup: removed defunct RATS comments and unnecessary copyright notices
|
||||
* clean up displayed lines when using "`--watchfd PID`", when PID exits
|
||||
* clean up displayed lines when using **--watchfd PID**, when PID exits
|
||||
* output errors on a new line to avoid overwriting transfer bar
|
||||
|
||||
### 1.5.7 - 26 August 2014
|
||||
@@ -199,25 +225,25 @@ Full changelog is below:
|
||||
|
||||
### 1.5.2 - 10 February 2014
|
||||
|
||||
* allow "`--watchfd`" to look at block devices
|
||||
* let "`--watchfd PID:FD`" work with "`--size N`"
|
||||
* allow **--watchfd** to look at block devices
|
||||
* let **--watchfd PID:FD** work with **--size N**
|
||||
* moved contributors out of the manual as the list was too long (NB everyone is still listed in the README and always will be)
|
||||
|
||||
### 1.5.1 - 23 January 2014
|
||||
|
||||
* new option "`--watchfd`" - suggested by Jacek Wielemborek and "fdwatch"
|
||||
* new option **--watchfd** - suggested by Jacek Wielemborek and "fdwatch"
|
||||
* use non-block flag with `splice()`
|
||||
* new display option "`--buffer-percent`", suggested by Kim Krecht
|
||||
* new display option "`--last-written`", suggested by Kim Krecht
|
||||
* new transfer option "`--no-splice`"
|
||||
* new display option **--buffer-percent**, suggested by Kim Krecht
|
||||
* new display option **--last-written**, suggested by Kim Krecht
|
||||
* new transfer option **--no-splice**
|
||||
* fix for minor bug which dropped display elements after one empty one
|
||||
* fix for single fd leak on exit (Cristian Ciupitu)
|
||||
|
||||
### 1.4.12 - 5 August 2013
|
||||
|
||||
* new option "`--null`" - patch supplied by Zing Shishak
|
||||
* new option **--null** - patch supplied by Zing Shishak
|
||||
* AIX build fix (add "`-lc128`") - with help from Pawel Piatek
|
||||
* AIX "`-c`" fixes - with help from Pawel Piatek
|
||||
* AIX **-c** fixes - with help from Pawel Piatek
|
||||
* SCO build fix (`po2table.sh`) - reported by Wouter Pronk
|
||||
* test scripts fix for older distributions - patch from Bryan Dongray
|
||||
* fix for `splice()` not using stdin - patch from Zev Weiss
|
||||
@@ -228,41 +254,41 @@ Full changelog is below:
|
||||
|
||||
### 1.4.5 - 10 January 2013
|
||||
|
||||
* updated manual page to show known problem with "`-R`" on Cygwin
|
||||
* updated manual page to show known problem with **-R** on Cygwin
|
||||
|
||||
### 1.4.4 - 11 December 2012
|
||||
|
||||
* added debugging, see "`pv -h`" when `configure` is run with "`--enable-debugging`"
|
||||
* added debugging, see "`pv -h`" when `configure` is run with **--enable-debugging**
|
||||
* rewrote cursor positioning code used when IPC is unavailable (Cygwin)
|
||||
* fixed cursor positioning cursor read answerback problem (Cygwin/Solaris)
|
||||
* fixed bug causing crash when progress displayed with too-small terminal
|
||||
|
||||
### 1.4.0 - 6 December 2012
|
||||
|
||||
* new option "`--skip-errors`" commissioned by Jim Salter
|
||||
* new option **--skip-errors** commissioned by Jim Salter
|
||||
* if stdout is a block device, and we don't know the total size, use the size of that block device as the total (Peter Samuelson)
|
||||
* new option "`--stop-at-size`" to stop after "`--size`" bytes
|
||||
* new option **--stop-at-size** to stop after **--size** bytes
|
||||
* report correct filename on read errors
|
||||
* fix use-after-free bug in remote PID cleanup code
|
||||
* refactored large chunks of code to make it more readable and to replace most static variables with a state structure
|
||||
|
||||
### 1.3.9 - 5 November 2012
|
||||
|
||||
* allow "`--format`" parameters to be sent with "`--remote`"
|
||||
* configure option "`--disable-ipc`"
|
||||
* added tests for "`--numeric`" with "`--timer`" and "`--bytes`"
|
||||
* added tests for "`--remote`"
|
||||
* allow **--format** parameters to be sent with **--remote**
|
||||
* configure option **--disable-ipc**
|
||||
* added tests for **--numeric** with **--timer** and **--bytes**
|
||||
* added tests for **--remote**
|
||||
|
||||
### 1.3.8 - 29 October 2012
|
||||
|
||||
* new "`--pidfile`" option to save process ID to a file
|
||||
* integrated patch for "`--numeric`" with "`--timer`" and "`--bytes`" (Sami Liedes)
|
||||
* removed signalling from "`--remote`" to prevent accidental process kills
|
||||
* new "`--format`" option (originally Vladimir Pal / Vladimir Ermakov)
|
||||
* new **--pidfile** option to save process ID to a file
|
||||
* integrated patch for **--numeric** with **--timer** and **--bytes** (Sami Liedes)
|
||||
* removed signalling from **--remote** to prevent accidental process kills
|
||||
* new **--format** option (originally Vladimir Pal / Vladimir Ermakov)
|
||||
|
||||
### 1.3.4 - 27 June 2012
|
||||
|
||||
* new "`--disable-splice`" configure script option
|
||||
* new **--disable-splice** configure script option
|
||||
* fixed line mode size count with multiple files (Moritz Barsnick)
|
||||
* fixes for AIX core dumps (Pawel Piatek)
|
||||
|
||||
@@ -285,10 +311,10 @@ Full changelog is below:
|
||||
|
||||
### 1.2.0 - 14 December 2010
|
||||
|
||||
* integrated improved SI prefixes and "`--average-rate`" (Henry Gebhardt)
|
||||
* integrated improved SI prefixes and **--average-rate** (Henry Gebhardt)
|
||||
* return nonzero if exiting due to *SIGTERM* (Martin Baum)
|
||||
* patch from Phil Rutschman to restore terminal properly on exit
|
||||
* fix i18n especially for "`--help`" (Sebastian Kayser)
|
||||
* fix i18n especially for **--help** (Sebastian Kayser)
|
||||
* refactored `pv_display`
|
||||
* we now have a coherent, documented, exit status
|
||||
* modified pipe test and new cksum test from Sebastian Kayser
|
||||
@@ -302,13 +328,13 @@ Full changelog is below:
|
||||
* patch from Elias Pipping correcting compilation failure on Darwin 9
|
||||
* patch from Patrick Collison correcting similar problems on OS X
|
||||
* trap *SIGINT* / *SIGHUP* / *SIGTERM* so we clean up IPCs on exit (Laszlo Ersek)
|
||||
* abort if numeric option, eg "`-L`", has non-numeric value (Boris Lohner)
|
||||
* abort if numeric option, eg **-L**, has non-numeric value (Boris Lohner)
|
||||
|
||||
### 1.1.0 - 30 August 2007
|
||||
|
||||
* new option "`--remote`" ("`-R`") to control an already-running process
|
||||
* new option "`--line-mode`" ("`-l`") to count lines instead of bytes
|
||||
* fix for "`-L`" to be less resource intensive
|
||||
* new option **--remote** (**-R**) to control an already-running process
|
||||
* new option **--line-mode** (**-l**) to count lines instead of bytes
|
||||
* fix for **-L** to be less resource intensive
|
||||
* fix for input/output equivalence check on Mac OS X
|
||||
* fix for size calculation in pipelines on Mac OS X
|
||||
* fixed "`make uninstall`"
|
||||
@@ -317,7 +343,7 @@ Full changelog is below:
|
||||
### 1.0.1 - 4 August 2007
|
||||
|
||||
* licensing change from Artistic to Artistic 2.0
|
||||
* removed the "`-l`" / "`--license`" option
|
||||
* removed the **-l** / **--license** option
|
||||
|
||||
### 1.0.0 - 2 August 2007
|
||||
|
||||
@@ -327,7 +353,7 @@ Full changelog is below:
|
||||
|
||||
### 0.9.9 - 5 February 2007
|
||||
|
||||
* new option "`--buffer-size`" ("`-B`") suggested by Mark Tomich
|
||||
* new option **--buffer-size** (**-B**) suggested by Mark Tomich
|
||||
* build fix: HP/UX largefile compile fix from Timo Savinen
|
||||
* maintain better buffer filling during transfers
|
||||
* workaround: "`pv /dev/zero | dd bs=1M count=1k`" bug (reported by Gert Menke)
|
||||
@@ -336,7 +362,7 @@ Full changelog is below:
|
||||
### 0.9.6 - 27 February 2006
|
||||
|
||||
* bugfix: `key_t` incompatibility with Cygwin
|
||||
* bugfix: interval ("`-i`") parameter parses numbers after decimal point
|
||||
* bugfix: interval (**-i**) parameter parses numbers after decimal point
|
||||
* build fix: use static NLS if `msgfmt` is unavailable
|
||||
* on the final update, blank out the now-zero ETA
|
||||
|
||||
@@ -354,7 +380,7 @@ Full changelog is below:
|
||||
|
||||
### 0.8.9 - 6 November 2004
|
||||
|
||||
* decimal values now accepted for rate and size, eg "`-L 1.23M`"
|
||||
* decimal values now accepted for rate and size, eg **-L 1.23M**
|
||||
* code cleanup
|
||||
* developers: "`make help`" now lists Makefile targets
|
||||
|
||||
@@ -364,9 +390,9 @@ Full changelog is below:
|
||||
|
||||
### 0.8.5 - 2 May 2004
|
||||
|
||||
* cursor positioning ("`-c`") reliability improved on systems with IPC
|
||||
* cursor positioning (**-c**) reliability improved on systems with IPC
|
||||
* minor fix: made test 005 more reliable
|
||||
* new option "`--height`" ("`-H`")
|
||||
* new option **--height** (**-H**)
|
||||
|
||||
### 0.8.2 - 24 April 2004
|
||||
|
||||
@@ -375,7 +401,7 @@ Full changelog is below:
|
||||
|
||||
### 0.8.1 - 19 April 2004
|
||||
|
||||
* bugfix in cursor positioning ("`-c`")
|
||||
* bugfix in cursor positioning (**-c**)
|
||||
|
||||
### 0.8.0 - 12 February 2004
|
||||
|
||||
@@ -387,7 +413,7 @@ Full changelog is below:
|
||||
### 0.7.0 - 8 February 2004
|
||||
|
||||
* display buffer management fixes (thanks Cédric Delfosse)
|
||||
* replaced "`--enable-debug`" with "`--enable-debugging`" and "`--enable-profiling`"
|
||||
* replaced **--enable-debug** with **--enable-debugging** and **--enable-profiling**
|
||||
|
||||
### 0.6.4 - 14 January 2004
|
||||
|
||||
@@ -451,11 +477,11 @@ Full changelog is below:
|
||||
|
||||
* allow decimal interval values, eg 0.1, 0.5, etc
|
||||
* some simple tests added ("`make check`")
|
||||
* smoother throughput limiting ("`--rate-limit`"), now done in 0.1sec chunks
|
||||
* bounds-check interval values ("`-i`") - max update interval now 10 minutes
|
||||
* smoother throughput limiting (**--rate-limit**), now done in 0.1sec chunks
|
||||
* bounds-check interval values (**-i**) - max update interval now 10 minutes
|
||||
* more reliable non-blocking output to keep display updated
|
||||
* no longer rely on `atoll()`
|
||||
* don't output final blank line if "`--numeric`"
|
||||
* don't output final blank line if **--numeric**
|
||||
* use `fcntl()` instead of `flock()` for Solaris compatibility
|
||||
|
||||
### 0.3.0 - 25 November 2002
|
||||
@@ -468,11 +494,11 @@ Full changelog is below:
|
||||
* we now ignore *EINTR* on `select()`
|
||||
* variable-size buffer (still need to add code to change size)
|
||||
* added (tentative) support for internationalisation
|
||||
* removed superfluous "`--no-progress`", etc options
|
||||
* removed superfluous **--no-progress**, etc options
|
||||
* optimised transfer by using bigger buffers, based on `st_blksize`
|
||||
* added "`--wait`" option to wait until transfer begins before showing progress
|
||||
* added "`--rate-limit`" option to limit rate to a maximum throughput
|
||||
* added "`--quiet`" option (no output at all) to be used with "`--rate-limit`"
|
||||
* added **--wait** option to wait until transfer begins before showing progress
|
||||
* added **--rate-limit** option to limit rate to a maximum throughput
|
||||
* added **--quiet** option (no output at all) to be used with **--rate-limit**
|
||||
|
||||
### 0.2.5 - 23 July 2002
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
Things still to do. (#n) indicates the issue tracker number.
|
||||
|
||||
* ([#3](https://codeberg.org/a-j-wood/pv/issues/3)) Option ("`-x`"?) to use xterm title line for status (Joachim Haga)
|
||||
* ([#4](https://codeberg.org/a-j-wood/pv/issues/4)) Option for process title (Martin Sarsale) as "`pv - name:FooProcess -xyz - transferred: 1.3GB - 500KB/s - running: 10:15:30s`"
|
||||
* ([#9](https://codeberg.org/a-j-wood/pv/issues/9)) Option to switch rate to per minute if really slow
|
||||
* ([#10](https://codeberg.org/a-j-wood/pv/issues/10)) Add watchfd tests
|
||||
* ([#11](https://codeberg.org/a-j-wood/pv/issues/11)) Option "`--progress-from FILE`", read last number and use it as bytes read (Jacek Wielemborek)
|
||||
* ([#12](https://codeberg.org/a-j-wood/pv/issues/12)) Allow multiple "`-d`" options (Linus Heckemann for multiple PID:FD; Jacek Wielemborek)
|
||||
* ([#15](https://codeberg.org/a-j-wood/pv/issues/15)) Use Unicode for more granular progress bar (Alexander Petrossian)
|
||||
* ([#17](https://codeberg.org/a-j-wood/pv/issues/17)) Allow "`-r`" with "`-l`" and "`-n`" to output lines/sec (Roland Kletzing)
|
||||
* ([#22](https://codeberg.org/a-j-wood/pv/issues/22)) Options to skip input and seek on output (Jason A. Pfeil, Feb 2022)
|
||||
* ([#25](https://codeberg.org/a-j-wood/pv/issues/25)) Normalise progress to 100% on overrun (Andrej Gantvorg)
|
||||
* ([#35](https://codeberg.org/a-j-wood/pv/issues/35)) Allow decimal values for "`-s`", "`-L`", "`-B`" (Thomas Watson - Aug 2020)
|
||||
* ([#38](https://codeberg.org/a-j-wood/pv/issues/38)) Reset ETA on *SIGUSR1* (Jacek Wielemborek - Jan 2019)
|
||||
* ([#40](https://codeberg.org/a-j-wood/pv/issues/40)) Permit "`-c`" with "`-d PID:FD`", reject "`-N`" with "`-d PID`" (Norman Rasmussen - Nov 2020)
|
||||
* ([#43](https://codeberg.org/a-j-wood/pv/issues/43)) Differentiate between "`--eta`" and "`--fineta`" in display (André Stapf - Apr 2017)
|
||||
* ([#45](https://codeberg.org/a-j-wood/pv/issues/45)) Option "`--sparse`" (with block size option) to write sparse output (Andriy Galetski - Apr 2019)
|
||||
* ([#46](https://codeberg.org/a-j-wood/pv/issues/46)) Option to show speed gauge (% max speed) if progress not known (Ryan Cooley - Jun 2019)
|
||||
* ([#47](https://codeberg.org/a-j-wood/pv/issues/47)) Analyse splice and buffer usage to improve performance
|
||||
* ([#48](https://codeberg.org/a-j-wood/pv/issues/48)) Option to show multiple files with individual sizes and a cumulative total (Zach Riggle - Jul 2021)
|
||||
* ([#49](https://codeberg.org/a-j-wood/pv/issues/49)) Option to provide stats for avg/min/max/stddev throughput (Venky.N.Iyer)
|
||||
* ([#50](https://codeberg.org/a-j-wood/pv/issues/50)) Allow pv to report on a whole pipeline at once (Will Entriken - Feb 2011)
|
||||
* ([#52](https://codeberg.org/a-j-wood/pv/issues/52)) Strange race condition that affects --wait when writing to GnuPG ([danielyli](https://github.com/danielyli))
|
||||
* ([#54](https://codeberg.org/a-j-wood/pv/issues/54)) Run command every n percent ([haarp](https://github.com/haarp))
|
||||
* ([#56](https://codeberg.org/a-j-wood/pv/issues/56)) Support for backgrounding pv, and allowing it to be monitored separately ([jimbobmcgee](https://github.com/jimbobmcgee))
|
||||
* ([#59](https://codeberg.org/a-j-wood/pv/issues/59)) Slow transfer under termux but faster if strace is used ([lateautumn233](https://github.com/lateautumn233))
|
||||
* ([#67](https://codeberg.org/a-j-wood/pv/issues/67)) Wrap another process to monitor its stdin & stdout ([Alex Mason](https://github.com/axman6))
|
||||
* ([#81](https://codeberg.org/a-j-wood/pv/issues/81)) Keep last output on terminal when "`pv -d`" is done ([KimHansen](https://codeberg.org/KimHansen))
|
||||
* ([#84](https://codeberg.org/a-j-wood/pv/issues/84)) Allow using "`--size`" with "`--watchfd`" to show total progress of a process ([tbertels](https://codeberg.org/tbertels))
|
||||
* ([#87](https://codeberg.org/a-j-wood/pv/issues/87)) Inconsistent buffer filling when writes are stuck, particularly on Cygwin ([basinilya](https://codeberg.org/basinilya))
|
||||
* ([#89](https://codeberg.org/a-j-wood/pv/issues/89)) Intermittent terminal settings reset failures after multi PV pipeline completes ([stdedos](https://codeberg.org/stdedos))
|
||||
|
||||
Any assistance would be appreciated.
|
||||
@@ -1,14 +1,102 @@
|
||||
.TH PV 1 "September 2024" Linux "User Manuals"
|
||||
.TH PV 1 "October 2024" Linux "User Manuals"
|
||||
.SH NAME
|
||||
pv \- monitor the progress of data through a pipe
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B pv
|
||||
[\fIOPTION\fR]
|
||||
[\fIFILE\fR]...
|
||||
.br
|
||||
.B pv
|
||||
[\fI\-h\fR|\fI\-V\fR]
|
||||
[\fIOPTION\fR]... [\fIFILE\fR]...
|
||||
|
||||
.SY pv
|
||||
.OP \-pteIrab8kTv
|
||||
.OP \-A NUM
|
||||
.OP \-F FORMAT
|
||||
.OP \-Wgl0fc
|
||||
.OP \-D SEC
|
||||
.OP \-s SIZE
|
||||
.OP \-i SEC
|
||||
.OP \-m SEC
|
||||
.OP \-w WIDTH
|
||||
.OP \-H HEIGHT
|
||||
.OP \-N NAME
|
||||
.OP \-o FILE
|
||||
.OP \-L RATE
|
||||
.OP \-B BYTES
|
||||
.OP \-CESYKX
|
||||
.OP \-Z BYTES
|
||||
.OP \-U FILE
|
||||
.OP \-P FILE
|
||||
.RI [ FILE
|
||||
\&.\|.\|.\&]
|
||||
|
||||
.SY pv
|
||||
.B \-n
|
||||
.OP \-trbv
|
||||
.OP \-Wl0
|
||||
.OP \-D SEC
|
||||
.OP \-s SIZE
|
||||
.OP \-i SEC
|
||||
.OP \-o FILE
|
||||
.OP \-L RATE
|
||||
.OP \-B BYTES
|
||||
.OP \-CESYKX
|
||||
.OP \-Z BYTES
|
||||
.OP \-U FILE
|
||||
.OP \-P FILE
|
||||
.RI [ FILE
|
||||
\&.\|.\|.\&]
|
||||
|
||||
.SY pv
|
||||
.B \-q
|
||||
.OP \-v
|
||||
.OP \-s SIZE
|
||||
.OP \-o FILE
|
||||
.OP \-L RATE
|
||||
.OP \-B BYTES
|
||||
.OP \-CESYKX
|
||||
.OP \-Z BYTES
|
||||
.OP \-U FILE
|
||||
.OP \-P FILE
|
||||
.RI [ FILE
|
||||
\&.\|.\|.\&]
|
||||
|
||||
.SY pv
|
||||
.B \-R
|
||||
.I PID
|
||||
.OP \-pteIrabT
|
||||
.OP \-A NUM
|
||||
.OP \-F FORMAT
|
||||
.OP \-s SIZE
|
||||
.OP \-i SEC
|
||||
.OP \-w WIDTH
|
||||
.OP \-H HEIGHT
|
||||
.OP \-N NAME
|
||||
.OP \-L RATE
|
||||
.OP \-B BYTES
|
||||
|
||||
.SY pv
|
||||
.B \-d
|
||||
.I PID:FD
|
||||
.OP \-pteIrab8kTnq
|
||||
.OP \-F FORMAT
|
||||
.OP \-i SEC
|
||||
.OP \-w WIDTH
|
||||
.OP \-H HEIGHT
|
||||
|
||||
.SY pv
|
||||
.B \-d
|
||||
.I PID
|
||||
.OP \-pteIrab8kTnq
|
||||
.OP \-F FORMAT
|
||||
.OP \-i SEC
|
||||
.OP \-w WIDTH
|
||||
.OP \-H HEIGHT
|
||||
|
||||
.SY pv
|
||||
.B \-h
|
||||
|
||||
.SY pv
|
||||
.B \-V
|
||||
.YS
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B pv
|
||||
@@ -24,7 +112,7 @@ standard output and progress will be shown on standard error.
|
||||
will copy each supplied
|
||||
.I FILE
|
||||
in turn to standard output
|
||||
.BR "" "(" -
|
||||
.BR "" "(" \-
|
||||
means standard input), or if no
|
||||
.IR FILE s
|
||||
are specified just standard input is copied. This is the same behaviour
|
||||
@@ -34,49 +122,58 @@ as
|
||||
A simple example to watch how quickly a file is transferred using
|
||||
.BR nc (1):
|
||||
|
||||
.RS
|
||||
.B pv file | nc -w 1 somewhere.com 3000
|
||||
.RE
|
||||
.in +4
|
||||
.EX
|
||||
pv file | nc \-w 1 somewhere.com 3000
|
||||
.EE
|
||||
.in
|
||||
|
||||
A similar example, transferring a file from another process and passing the
|
||||
expected size to
|
||||
.BR pv :
|
||||
|
||||
.RS
|
||||
.B cat file | pv -s 12345 | nc -w 1 somewhere.com 3000
|
||||
.RE
|
||||
.in +4
|
||||
.EX
|
||||
cat file | pv \-s 12345 | nc \-w 1 somewhere.com 3000
|
||||
.EE
|
||||
.in
|
||||
|
||||
A more complicated example using numeric output to feed into the
|
||||
.BR dialog (1)
|
||||
program for a full-screen progress display:
|
||||
|
||||
.RS
|
||||
.B (tar cf - . \e
|
||||
.br
|
||||
.B " | pv -n -s $(du -sb . | awk '{print $1}') \e"
|
||||
.br
|
||||
.B " | gzip -9 > out.tgz) 2>&1 \e"
|
||||
.br
|
||||
.B | dialog --gauge 'Progress' 7 70
|
||||
.RE
|
||||
.in +4
|
||||
.EX
|
||||
(tar cf \- . \e
|
||||
| pv \-n \-s $(du \-sb . | awk '{print $1}') \e
|
||||
| gzip \-9 > out.tgz) 2>&1 \e
|
||||
| dialog \-\-gauge 'Progress' 7 70
|
||||
.EE
|
||||
.in
|
||||
|
||||
Taking an image of a disk, skipping errors:
|
||||
|
||||
.RS
|
||||
.B pv -EE /dev/your/disk/device > disk-image.img
|
||||
.RE
|
||||
.in +4
|
||||
.EX
|
||||
pv \-EE /dev/your/disk/device > disk-image.img
|
||||
.EE
|
||||
.in
|
||||
|
||||
Writing an image back to a disk:
|
||||
|
||||
.RS
|
||||
.B pv disk-image.img > /dev/your/disk/device
|
||||
.RE
|
||||
.in +4
|
||||
.EX
|
||||
pv disk-image.img > /dev/your/disk/device
|
||||
.EE
|
||||
.in
|
||||
|
||||
Zeroing a disk:
|
||||
|
||||
.RS
|
||||
.B pv < /dev/zero > /dev/your/disk/device
|
||||
.RE
|
||||
.in +4
|
||||
.EX
|
||||
pv < /dev/zero > /dev/your/disk/device
|
||||
.EE
|
||||
.in
|
||||
|
||||
Note that if the input size cannot be calculated, and the output is a block
|
||||
device, then the size of the block device will be used and
|
||||
@@ -87,15 +184,19 @@ had been given.
|
||||
|
||||
(Linux only): Watching file descriptor 3 opened by another process 1234:
|
||||
|
||||
.RS
|
||||
.B pv -d 1234:3
|
||||
.RE
|
||||
.in +4
|
||||
.EX
|
||||
pv \-d 1234:3
|
||||
.EE
|
||||
.in
|
||||
|
||||
(Linux only): Watching all file descriptors used by process 1234:
|
||||
|
||||
.RS
|
||||
.B pv -d 1234
|
||||
.RE
|
||||
.in +4
|
||||
.EX
|
||||
pv \-d 1234
|
||||
.EE
|
||||
.in
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
@@ -109,9 +210,8 @@ If no display switches are specified,
|
||||
.B pv
|
||||
behaves as if
|
||||
.BR \-p ", " \-t ", " \-e ", " \-r ", and " \-b
|
||||
had been given (i.e. everything except average rate is switched on).
|
||||
Otherwise, only those display types that are explicitly switched on will be
|
||||
shown.
|
||||
had been given. Otherwise, only those display types that are explicitly
|
||||
switched on will be shown.
|
||||
.TP
|
||||
.B \-p, \-\-progress
|
||||
Turn the progress bar on. If any inputs are not files, or are
|
||||
@@ -119,7 +219,10 @@ unreadable, and no size was explicitly given (with the
|
||||
.B \-s
|
||||
modifier), the progress bar cannot indicate how close to completion the
|
||||
transfer is, so it will just move left and right to indicate that data is
|
||||
moving.
|
||||
moving - or, with
|
||||
.BR \-\-gauge ,
|
||||
the bar will indicate the current rate as a percentage of the maximum rate
|
||||
seen so far.
|
||||
.TP
|
||||
.B \-t, \-\-timer
|
||||
Turn the timer on. This will display the total elapsed time that
|
||||
@@ -129,22 +232,26 @@ has been running for.
|
||||
.B \-e, \-\-eta
|
||||
Turn the ETA timer on. This will attempt to guess, based on current
|
||||
transfer rates and the total data size, how long it will be before
|
||||
completion. This option will have no effect if the total data size cannot
|
||||
be determined.
|
||||
completion. The countdown is prefixed with "ETA". This option will have no
|
||||
effect if the total data size cannot be determined.
|
||||
.TP
|
||||
.B \-I, \-\-fineta
|
||||
Turn the ETA timer on, but display the estimated local time of arrival
|
||||
instead of time left. When the estimated time is more than 6 hours in the
|
||||
future, the date is shown as well.
|
||||
Turn the ETA timer on, but display the estimated local time at which the
|
||||
transfer will finish, instead of the amount of time remaining. When the
|
||||
estimated time is more than 6 hours in the future, the date is shown as
|
||||
well. The time is prefixed with "FIN" for finish time. As with
|
||||
.BR \-\-eta ,
|
||||
this option will have no effect if the total data size cannot be determined.
|
||||
.TP
|
||||
.B \-r, \-\-rate
|
||||
Turn the rate counter on. This will display the current rate of data
|
||||
transfer.
|
||||
transfer. The rate is shown in square brackets [].
|
||||
.TP
|
||||
.B \-a, \-\-average\-rate
|
||||
Turn the average rate counter on. This will display the current average
|
||||
rate of data transfer (default: last 30s, see
|
||||
.BR \-m ).
|
||||
The average rate is shown in brackets ().
|
||||
.TP
|
||||
.B \-b, \-\-bytes
|
||||
Turn the total byte counter on. This will display the total amount of
|
||||
@@ -167,6 +274,7 @@ in the
|
||||
.B FORMATTING
|
||||
section below. Implies
|
||||
.BR \-C .
|
||||
The transfer buffer percentage is shown in curly brackets {}.
|
||||
.TP
|
||||
.BI \-A\ NUM \fR,\ \fB\-\-last\-written\ NUM
|
||||
Show the last
|
||||
@@ -195,6 +303,12 @@ to determine the output format. See the
|
||||
.B FORMATTING
|
||||
section below.
|
||||
.TP
|
||||
.B \-v, \-\-stats
|
||||
At the end of the transfer, write an additional line showing the transfer
|
||||
rate minimum, maximum, mean, and standard deviation. The values are always
|
||||
in bytes per second (or bits, with
|
||||
.BR \-8 ).
|
||||
.TP
|
||||
.B \-n, \-\-numeric
|
||||
Numeric output. Instead of giving a visual indication of progress,
|
||||
.B pv
|
||||
@@ -208,7 +322,7 @@ is not required if
|
||||
is being used.
|
||||
.TP
|
||||
.B ""
|
||||
Note that if
|
||||
If
|
||||
.B \-\-numeric
|
||||
is in use, then adding
|
||||
.B \-\-bytes
|
||||
@@ -220,12 +334,16 @@ is also in use as well as
|
||||
and
|
||||
.BR \-\-numeric ,
|
||||
then instead of bytes or a percentage, the number of lines
|
||||
so far is output. And finally, if
|
||||
so far is output. If
|
||||
.B \-\-rate
|
||||
is added, then the transfer rate is also output (if
|
||||
.B \-\-bytes
|
||||
is in use as well, the rate comes after the byte/line count).
|
||||
If
|
||||
.B \-\-timer
|
||||
is added to
|
||||
.BR \-\-numeric ,
|
||||
then each output line is prefixed with the elapsed time
|
||||
so far, as a decimal number of seconds.
|
||||
is also added, then each output line is
|
||||
.I prefixed
|
||||
with the elapsed time so far, as a decimal number of seconds.
|
||||
.TP
|
||||
.B \-q, \-\-quiet
|
||||
No output. Useful if the
|
||||
@@ -256,7 +374,7 @@ Assume the total amount of data to be transferred is
|
||||
.I SIZE
|
||||
bytes when calculating percentages and ETAs. The same suffixes of "k", "m"
|
||||
etc can be used as with
|
||||
.BR -L .
|
||||
.BR \-L .
|
||||
.TP
|
||||
.B ""
|
||||
If
|
||||
@@ -275,6 +393,11 @@ has no effect if used with
|
||||
to watch all file descriptors of a process, but will work with
|
||||
.BR "-d PID:FD" .
|
||||
.TP
|
||||
.B \-g, \-\-gauge
|
||||
If the progress bar is shown but the size is not known, then instead of
|
||||
moving the bar left and right to show progress, show the current transfer
|
||||
rate as a percentage of the maximum rate seen so far.
|
||||
.TP
|
||||
.B \-l, \-\-line\-mode
|
||||
Instead of counting bytes, count lines (newline characters). The progress
|
||||
bar will only move when a new line is found, and the value passed to the
|
||||
@@ -290,7 +413,7 @@ pipes or non-regular files, or are unreadable, the total size will not be
|
||||
calculated.
|
||||
.TP
|
||||
.B \-0, \-\-null
|
||||
Count lines as terminated with a zero byte instead of with a newline.
|
||||
Count lines as terminated with a null byte instead of with a newline.
|
||||
This option implies \-\-line\-mode.
|
||||
.TP
|
||||
.BI \-i\ SEC \fR,\ \fB\-\-interval\ SEC
|
||||
@@ -469,6 +592,30 @@ except that
|
||||
is never called. Implies
|
||||
.BR \-C .
|
||||
.TP
|
||||
.BI \-U\ FILE \fR,\ \fB\-\-store\-and\-forward\ FILE
|
||||
Instead of passing data through immediately, do it in two stages - first
|
||||
read all input and write it to
|
||||
.IR FILE ,
|
||||
and then once the input is exhausted, read all of
|
||||
.I FILE
|
||||
and write it to the output.
|
||||
.I FILE
|
||||
remains in place afterwards, unless it is
|
||||
"\fB-\fR", in which case
|
||||
.B pv
|
||||
creates a temporary file for this purpose, and automatically removes it
|
||||
afterwards.
|
||||
.TP
|
||||
.B ""
|
||||
This can be useful if you have a pipeline which generates data (your
|
||||
input) quickly but you don't know the size, and you wish to pass it to some
|
||||
slower process, once all of the input has been generated and you know its
|
||||
size, so you can see its progress. Note that when doing this with
|
||||
relatively small amounts of data,
|
||||
.B \-\-no-splice
|
||||
may be preferable so that pipe buffering doesn't affect the progress
|
||||
display.
|
||||
.TP
|
||||
.BI \-d\ PID\fR[\fB:\fR\fIFD\fR],\ \fB\-\-watchfd\ PID\fR[\fB:\fR\fIFD\fR]
|
||||
Instead of transferring data, watch file descriptor
|
||||
.I FD
|
||||
@@ -501,9 +648,9 @@ that is already running,
|
||||
.BI \-R\ PID
|
||||
will cause that instance to act as though it had been given
|
||||
this instance's command line instead. For example, if
|
||||
.B pv -L 123K
|
||||
.B pv \-L 123K
|
||||
is running with process ID 9876, then running
|
||||
.B pv -R 9876 -L 321K
|
||||
.B pv \-R 9876 \-L 321K
|
||||
will cause it to start using a rate limit of 321KiB instead of 123KiB.
|
||||
Note that some options cannot be changed while running, such as
|
||||
.BR \-c ,
|
||||
@@ -557,7 +704,7 @@ ETA as time remaining. Equivalent to
|
||||
.BR \-e .
|
||||
.TP
|
||||
.B %I
|
||||
ETA as local time of completion. Equivalent to
|
||||
ETA as local time at which the transfer will finish. Equivalent to
|
||||
.BR \-I .
|
||||
.TP
|
||||
.B %r
|
||||
@@ -582,7 +729,7 @@ shows the bits transferred so far, not bytes.
|
||||
.B %T
|
||||
Percentage of the transfer buffer in use. Equivalent to
|
||||
.BR \-T .
|
||||
Shows "{----}" if the transfer is being done with
|
||||
Shows "{\-\-\-\-}" if the transfer is being done with
|
||||
.BR splice (2),
|
||||
since splicing to or from pipes does not use the buffer.
|
||||
.TP
|
||||
@@ -598,7 +745,7 @@ since splicing to or from pipes does not use the buffer.
|
||||
.TP
|
||||
.B %N
|
||||
Name prefix given by
|
||||
.BR -N .
|
||||
.BR \-N .
|
||||
Padded to 9 characters with spaces, and suffixed with :.
|
||||
.TP
|
||||
.B %%
|
||||
@@ -606,32 +753,40 @@ A single %.
|
||||
|
||||
.P
|
||||
The format string equivalent of turning on all display switches is
|
||||
.BR "\`%N %b %T %t %r %a %p %e'" .
|
||||
.BR "\`%N %b %T %t %r %a %p %e %I'" .
|
||||
|
||||
|
||||
.SH COMMON SWITCHES
|
||||
Some suggested common switch combinations:
|
||||
|
||||
.TP
|
||||
.B pv -ptebar
|
||||
.B pv \-ptebar
|
||||
Show a progress bar, elapsed time, estimated completion time, byte counter,
|
||||
average rate, and current rate.
|
||||
.TP
|
||||
.B pv -betlap
|
||||
.B pv \-betlap
|
||||
Show a progress bar, elapsed time, estimated completion time, line counter,
|
||||
and average rate, counting lines instead of bytes.
|
||||
.TP
|
||||
.B pv -t
|
||||
Show only the elapsed time - useful as a simple timer, e.g.
|
||||
.BR "sleep 10m | pv -t" .
|
||||
.B pv \-btrpg
|
||||
Show the amount transferred, elapsed time, current rate, and a gauge showing
|
||||
the current rate as a percentage of the maximum rate seen - useful in a
|
||||
pipeline where the total size is unknown. (If the size
|
||||
.I is
|
||||
known, these options will show the percentage completion instead of the rate
|
||||
gauge).
|
||||
.TP
|
||||
.B pv -pterb
|
||||
.B pv \-t
|
||||
Show only the elapsed time - useful as a simple timer, e.g.
|
||||
.BR "sleep 10m | pv \-t" .
|
||||
.TP
|
||||
.B pv \-pterb
|
||||
The default behaviour: progress bar, elapsed time, estimated completion
|
||||
time, current rate, and byte counter.
|
||||
|
||||
.P
|
||||
On MacOS, it may be useful to specify
|
||||
.B -B 1024
|
||||
.B \-B 1024
|
||||
in a pipeline, as this may improve performance.
|
||||
|
||||
|
||||
@@ -725,19 +880,53 @@ one that owns the terminal. In these cases, use
|
||||
.BR \-\-force .
|
||||
.P
|
||||
.IP \(bu 3
|
||||
If
|
||||
.B pv
|
||||
is used in a pipeline in
|
||||
.B zsh
|
||||
version 5.8, and the last command in the pipeline is based on shell
|
||||
builtins,
|
||||
.B zsh
|
||||
takes control of the terminal away from
|
||||
.BR pv ,
|
||||
preventing progress from being displayed. For example, this will produce no
|
||||
progress bar:
|
||||
.IP
|
||||
.in +4n
|
||||
.EX
|
||||
pv InputFile | { while read \-r line; do sleep 0.1; done; }
|
||||
.EE
|
||||
.in
|
||||
.IP
|
||||
To work around this, put the last commands of the pipeline in
|
||||
normal brackets to force the use of a subshell:
|
||||
.IP
|
||||
.in +4n
|
||||
.EX
|
||||
pv InputFile | ( while read \-r line; do sleep 0.1; done; )
|
||||
.EE
|
||||
.in
|
||||
.IP
|
||||
Refer to
|
||||
.UR https://codeberg.org/a-j-wood/pv/issues/105
|
||||
issue #105
|
||||
.UE
|
||||
for full details.
|
||||
.P
|
||||
.IP \(bu 3
|
||||
The
|
||||
.B -c
|
||||
.B \-c
|
||||
option does not work properly on Cygwin without
|
||||
.B cygserver
|
||||
running, if started near the bottom of the screen (IPC is needed to handle
|
||||
the terminal scrolling). To fix this, start
|
||||
.B cygserver
|
||||
before using
|
||||
.BR "pv -c" .
|
||||
.BR "pv \-c" .
|
||||
.P
|
||||
.IP \(bu 3
|
||||
The
|
||||
.B -R
|
||||
.B \-R
|
||||
option requires that either
|
||||
.B /run/user/<uid>/
|
||||
or
|
||||
@@ -752,8 +941,9 @@ Please report any bugs to
|
||||
.BR pv@ivarch.com .
|
||||
|
||||
Alternatively, use the issue tracker linked from the
|
||||
.B pv
|
||||
home page: <https://www.ivarch.com/programs/pv.shtml>
|
||||
.UR https://www.ivarch.com/programs/pv.shtml
|
||||
pv home page
|
||||
.UE .
|
||||
|
||||
|
||||
.SH "SEE ALSO"
|
||||
|
||||
+123
-36
@@ -4,8 +4,36 @@ pv - monitor the progress of data through a pipe
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
**pv** \[*OPTION*\] \[*FILE*\]\...\
|
||||
**pv** \[*-h*\|*-V*\]
|
||||
**pv** \[*OPTION*\]\... \[*FILE*\]\...
|
||||
|
||||
**pv** \[ **-pteIrab8kTv** \] \[ **-A** NUM \] \[ **-F** FORMAT \] \[
|
||||
**-Wgl0fc** \] \[ **-D** SEC \] \[ **-s** SIZE \] \[ **-i** SEC \] \[
|
||||
**-m** SEC \] \[ **-w** WIDTH \] \[ **-H** HEIGHT \] \[ **-N** NAME \]
|
||||
[ **-o** FILE \] \[ **-L** RATE \] \[ **-B** BYTES \] \[ **-CESYKX** \]
|
||||
[ **-Z** BYTES \] \[ **-U** FILE \] \[ **-P** FILE \] \[*FILE* . . .\]
|
||||
|
||||
**pv** **-n** \[ **-trbv** \] \[ **-Wl0** \] \[ **-D** SEC \] \[ **-s**
|
||||
SIZE \] \[ **-i** SEC \] \[ **-o** FILE \] \[ **-L** RATE \] \[ **-B**
|
||||
BYTES \] \[ **-CESYKX** \] \[ **-Z** BYTES \] \[ **-U** FILE \] \[
|
||||
**-P** FILE \] \[*FILE* . . .\]
|
||||
|
||||
**pv** **-q** \[ **-v** \] \[ **-s** SIZE \] \[ **-o** FILE \] \[ **-L**
|
||||
RATE \] \[ **-B** BYTES \] \[ **-CESYKX** \] \[ **-Z** BYTES \] \[
|
||||
**-U** FILE \] \[ **-P** FILE \] \[*FILE* . . .\]
|
||||
|
||||
**pv** **-R** *PID* \[ **-pteIrabT** \] \[ **-A** NUM \] \[ **-F**
|
||||
FORMAT \] \[ **-s** SIZE \] \[ **-i** SEC \] \[ **-w** WIDTH \] \[
|
||||
**-H** HEIGHT \] \[ **-N** NAME \] \[ **-L** RATE \] \[ **-B** BYTES \]
|
||||
|
||||
**pv** **-d** *PID:FD* \[ **-pteIrab8kTnq** \] \[ **-F** FORMAT \] \[
|
||||
**-i** SEC \] \[ **-w** WIDTH \] \[ **-H** HEIGHT \]
|
||||
|
||||
**pv** **-d** *PID* \[ **-pteIrab8kTnq** \] \[ **-F** FORMAT \] \[
|
||||
**-i** SEC \] \[ **-w** WIDTH \] \[ **-H** HEIGHT \]
|
||||
|
||||
**pv** **-h**
|
||||
|
||||
**pv** **-V**
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@@ -24,32 +52,32 @@ input is copied. This is the same behaviour as **cat**(1).
|
||||
A simple example to watch how quickly a file is transferred using
|
||||
**nc**(1):
|
||||
|
||||
> **pv file \| nc -w 1 somewhere.com 3000**
|
||||
pv file | nc -w 1 somewhere.com 3000
|
||||
|
||||
A similar example, transferring a file from another process and passing
|
||||
the expected size to **pv**:
|
||||
|
||||
> **cat file \| pv -s 12345 \| nc -w 1 somewhere.com 3000**
|
||||
cat file | pv -s 12345 | nc -w 1 somewhere.com 3000
|
||||
|
||||
A more complicated example using numeric output to feed into the
|
||||
**dialog**(1) program for a full-screen progress display:
|
||||
|
||||
> **(tar cf - . \\** \
|
||||
> **\| pv -n -s \$(du -sb . \| awk \'{print \$1}\') \\** \
|
||||
> **\| gzip -9 \> out.tgz) 2\>&1 \\** \
|
||||
> **\| dialog \--gauge \'Progress\' 7 70**
|
||||
(tar cf - . \
|
||||
| pv -n -s $(du -sb . | awk '{print $1}') \
|
||||
| gzip -9 > out.tgz) 2>&1 \
|
||||
| dialog --gauge 'Progress' 7 70
|
||||
|
||||
Taking an image of a disk, skipping errors:
|
||||
|
||||
> **pv -EE /dev/your/disk/device \> disk-image.img**
|
||||
pv -EE /dev/your/disk/device > disk-image.img
|
||||
|
||||
Writing an image back to a disk:
|
||||
|
||||
> **pv disk-image.img \> /dev/your/disk/device**
|
||||
pv disk-image.img > /dev/your/disk/device
|
||||
|
||||
Zeroing a disk:
|
||||
|
||||
> **pv \< /dev/zero \> /dev/your/disk/device**
|
||||
pv < /dev/zero > /dev/your/disk/device
|
||||
|
||||
Note that if the input size cannot be calculated, and the output is a
|
||||
block device, then the size of the block device will be used and **pv**
|
||||
@@ -57,11 +85,11 @@ will automatically stop at that size as if **-S** had been given.
|
||||
|
||||
(Linux only): Watching file descriptor 3 opened by another process 1234:
|
||||
|
||||
> **pv -d 1234:3**
|
||||
pv -d 1234:3
|
||||
|
||||
(Linux only): Watching all file descriptors used by process 1234:
|
||||
|
||||
> **pv -d 1234**
|
||||
pv -d 1234
|
||||
|
||||
# OPTIONS
|
||||
|
||||
@@ -71,9 +99,8 @@ output modifiers, and general options.
|
||||
# DISPLAY SWITCHES
|
||||
|
||||
If no display switches are specified, **pv** behaves as if **-p**,
|
||||
**-t**, **-e**, **-r**, and **-b** had been given (i.e. everything
|
||||
except average rate is switched on). Otherwise, only those display types
|
||||
that are explicitly switched on will be shown.
|
||||
**-t**, **-e**, **-r**, and **-b** had been given. Otherwise, only those
|
||||
display types that are explicitly switched on will be shown.
|
||||
|
||||
**-p, \--progress**
|
||||
|
||||
@@ -81,7 +108,8 @@ that are explicitly switched on will be shown.
|
||||
unreadable, and no size was explicitly given (with the **-s**
|
||||
modifier), the progress bar cannot indicate how close to completion
|
||||
the transfer is, so it will just move left and right to indicate
|
||||
that data is moving.
|
||||
that data is moving - or, with **\--gauge**, the bar will indicate
|
||||
the current rate as a percentage of the maximum rate seen so far.
|
||||
|
||||
**-t, \--timer**
|
||||
|
||||
@@ -92,24 +120,28 @@ that are explicitly switched on will be shown.
|
||||
|
||||
: Turn the ETA timer on. This will attempt to guess, based on current
|
||||
transfer rates and the total data size, how long it will be before
|
||||
completion. This option will have no effect if the total data size
|
||||
cannot be determined.
|
||||
completion. The countdown is prefixed with \"ETA\". This option will
|
||||
have no effect if the total data size cannot be determined.
|
||||
|
||||
**-I, \--fineta**
|
||||
|
||||
: Turn the ETA timer on, but display the estimated local time of
|
||||
arrival instead of time left. When the estimated time is more than 6
|
||||
hours in the future, the date is shown as well.
|
||||
: Turn the ETA timer on, but display the estimated local time at which
|
||||
the transfer will finish, instead of the amount of time remaining.
|
||||
When the estimated time is more than 6 hours in the future, the date
|
||||
is shown as well. The time is prefixed with \"FIN\" for finish time.
|
||||
As with **\--eta**, this option will have no effect if the total
|
||||
data size cannot be determined.
|
||||
|
||||
**-r, \--rate**
|
||||
|
||||
: Turn the rate counter on. This will display the current rate of data
|
||||
transfer.
|
||||
transfer. The rate is shown in square brackets \[\].
|
||||
|
||||
**-a, \--average-rate**
|
||||
|
||||
: Turn the average rate counter on. This will display the current
|
||||
average rate of data transfer (default: last 30s, see **-m**).
|
||||
average rate of data transfer (default: last 30s, see **-m**). The
|
||||
average rate is shown in brackets ().
|
||||
|
||||
**-b, \--bytes**
|
||||
|
||||
@@ -131,7 +163,8 @@ that are explicitly switched on will be shown.
|
||||
|
||||
: Turn on the transfer buffer percentage display. This will show the
|
||||
percentage of the transfer buffer in use - but see the caveat under
|
||||
**%T** in the **FORMATTING** section below. Implies **-C**.
|
||||
**%T** in the **FORMATTING** section below. Implies **-C**. The
|
||||
transfer buffer percentage is shown in curly brackets {}.
|
||||
|
||||
**-A NUM, \--last-written NUM**
|
||||
|
||||
@@ -144,6 +177,12 @@ that are explicitly switched on will be shown.
|
||||
**-T**, and **-A**, and instead use the format string *FORMAT* to
|
||||
determine the output format. See the **FORMATTING** section below.
|
||||
|
||||
**-v, \--stats**
|
||||
|
||||
: At the end of the transfer, write an additional line showing the
|
||||
transfer rate minimum, maximum, mean, and standard deviation. The
|
||||
values are always in bytes per second (or bits, with **-8**).
|
||||
|
||||
**-n, \--numeric**
|
||||
|
||||
: Numeric output. Instead of giving a visual indication of progress,
|
||||
@@ -152,14 +191,15 @@ that are explicitly switched on will be shown.
|
||||
**dialog**(1). Note that **-f** is not required if **-n** is being
|
||||
used.
|
||||
|
||||
: Note that if **\--numeric** is in use, then adding **\--bytes** will
|
||||
cause the number of bytes processed so far to be output instead of a
|
||||
: If **\--numeric** is in use, then adding **\--bytes** will cause the
|
||||
number of bytes processed so far to be output instead of a
|
||||
percentage; if **\--line-mode** is also in use as well as
|
||||
**\--bytes** and **\--numeric**, then instead of bytes or a
|
||||
percentage, the number of lines so far is output. And finally, if
|
||||
**\--timer** is added to **\--numeric**, then each output line is
|
||||
prefixed with the elapsed time so far, as a decimal number of
|
||||
seconds.
|
||||
percentage, the number of lines so far is output. If **\--rate** is
|
||||
added, then the transfer rate is also output (if **\--bytes** is in
|
||||
use as well, the rate comes after the byte/line count). If
|
||||
**\--timer** is also added, then each output line is *prefixed* with
|
||||
the elapsed time so far, as a decimal number of seconds.
|
||||
|
||||
**-q, \--quiet**
|
||||
|
||||
@@ -196,6 +236,12 @@ that are explicitly switched on will be shown.
|
||||
watch all file descriptors of a process, but will work with **-d
|
||||
PID:FD**.
|
||||
|
||||
**-g, \--gauge**
|
||||
|
||||
: If the progress bar is shown but the size is not known, then instead
|
||||
of moving the bar left and right to show progress, show the current
|
||||
transfer rate as a percentage of the maximum rate seen so far.
|
||||
|
||||
**-l, \--line-mode**
|
||||
|
||||
: Instead of counting bytes, count lines (newline characters). The
|
||||
@@ -210,7 +256,7 @@ that are explicitly switched on will be shown.
|
||||
|
||||
**-0, \--null**
|
||||
|
||||
: Count lines as terminated with a zero byte instead of with a
|
||||
: Count lines as terminated with a null byte instead of with a
|
||||
newline. This option implies \--line-mode.
|
||||
|
||||
**-i SEC, \--interval SEC**
|
||||
@@ -346,6 +392,23 @@ that are explicitly switched on will be shown.
|
||||
This is equivalent to redirecting standard output to */dev/null*,
|
||||
except that **write**(2) is never called. Implies **-C**.
|
||||
|
||||
**-U FILE, \--store-and-forward FILE**
|
||||
|
||||
: Instead of passing data through immediately, do it in two stages -
|
||||
first read all input and write it to *FILE*, and then once the input
|
||||
is exhausted, read all of *FILE* and write it to the output. *FILE*
|
||||
remains in place afterwards, unless it is \"**-**\", in which case
|
||||
**pv** creates a temporary file for this purpose, and automatically
|
||||
removes it afterwards.
|
||||
|
||||
: This can be useful if you have a pipeline which generates data (your
|
||||
input) quickly but you don\'t know the size, and you wish to pass it
|
||||
to some slower process, once all of the input has been generated and
|
||||
you know its size, so you can see its progress. Note that when doing
|
||||
this with relatively small amounts of data, **\--no-splice** may be
|
||||
preferable so that pipe buffering doesn\'t affect the progress
|
||||
display.
|
||||
|
||||
**-d PID\[:FD\], \--watchfd PID\[:FD\]**
|
||||
|
||||
: Instead of transferring data, watch file descriptor *FD* of process
|
||||
@@ -406,7 +469,8 @@ be used:
|
||||
|
||||
**%I**
|
||||
|
||||
: ETA as local time of completion. Equivalent to **-I**.
|
||||
: ETA as local time at which the transfer will finish. Equivalent to
|
||||
**-I**.
|
||||
|
||||
**%r**
|
||||
|
||||
@@ -446,7 +510,7 @@ be used:
|
||||
: A single %.
|
||||
|
||||
The format string equivalent of turning on all display switches is
|
||||
**\`%N %b %T %t %r %a %p %e\'**.
|
||||
**\`%N %b %T %t %r %a %p %e %I\'**.
|
||||
|
||||
# COMMON SWITCHES
|
||||
|
||||
@@ -462,6 +526,14 @@ Some suggested common switch combinations:
|
||||
: Show a progress bar, elapsed time, estimated completion time, line
|
||||
counter, and average rate, counting lines instead of bytes.
|
||||
|
||||
**pv -btrpg**
|
||||
|
||||
: Show the amount transferred, elapsed time, current rate, and a gauge
|
||||
showing the current rate as a percentage of the maximum rate seen -
|
||||
useful in a pipeline where the total size is unknown. (If the size
|
||||
*is* known, these options will show the percentage completion
|
||||
instead of the rate gauge).
|
||||
|
||||
**pv -t**
|
||||
|
||||
: Show only the elapsed time - useful as a simple timer, e.g. **sleep
|
||||
@@ -545,6 +617,21 @@ The following problems are known to exist in **pv**:
|
||||
in a separate process group from the one that owns the terminal. In
|
||||
these cases, use **\--force**.
|
||||
|
||||
- If **pv** is used in a pipeline in **zsh** version 5.8, and the last
|
||||
command in the pipeline is based on shell builtins, **zsh** takes
|
||||
control of the terminal away from **pv**, preventing progress from
|
||||
being displayed. For example, this will produce no progress bar:
|
||||
|
||||
pv InputFile | { while read -r line; do sleep 0.1; done; }
|
||||
|
||||
To work around this, put the last commands of the pipeline in normal
|
||||
brackets to force the use of a subshell:
|
||||
|
||||
pv InputFile | ( while read -r line; do sleep 0.1; done; )
|
||||
|
||||
Refer to [issue #105](https://codeberg.org/a-j-wood/pv/issues/105)
|
||||
for full details.
|
||||
|
||||
- The **-c** option does not work properly on Cygwin without
|
||||
**cygserver** running, if started near the bottom of the screen (IPC
|
||||
is needed to handle the terminal scrolling). To fix this, start
|
||||
@@ -559,8 +646,8 @@ If you find any other problems, please report them.
|
||||
|
||||
Please report any bugs to **pv@ivarch.com**.
|
||||
|
||||
Alternatively, use the issue tracker linked from the **pv** home page:
|
||||
\<https://www.ivarch.com/programs/pv.shtml\>
|
||||
Alternatively, use the issue tracker linked from the [pv home
|
||||
page](https://www.ivarch.com/programs/pv.shtml).
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
cs
|
||||
de
|
||||
es
|
||||
fr
|
||||
pl
|
||||
pt
|
||||
tr
|
||||
|
||||
@@ -0,0 +1,535 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: pv@ivarch.com\n"
|
||||
"POT-Creation-Date: 2024-10-15 22:01+0100\n"
|
||||
"PO-Revision-Date: 2024-10-13 20:43+0000\n"
|
||||
"Last-Translator: mmatous <mmatous@users.noreply.translate.codeberg.org>\n"
|
||||
"Language-Team: Czech <https://translate.codeberg.org/projects/pv/pv/cs/>\n"
|
||||
"Language: cs\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
||||
"X-Generator: Weblate 5.7.2\n"
|
||||
|
||||
#: src/main/help.c:284
|
||||
msgid "show progress bar"
|
||||
msgstr "ukaž indikátor průběhu"
|
||||
|
||||
#: src/main/help.c:287
|
||||
msgid "show elapsed time"
|
||||
msgstr "ukaž uběhlý čas"
|
||||
|
||||
#: src/main/help.c:290
|
||||
msgid "show estimated time of arrival (completion)"
|
||||
msgstr "ukaž přibližný zbývající čas"
|
||||
|
||||
#: src/main/help.c:293
|
||||
msgid "show absolute estimated time of arrival (completion)"
|
||||
msgstr "ukaž přibližný čas dokončení"
|
||||
|
||||
#: src/main/help.c:296
|
||||
msgid "show data transfer rate counter"
|
||||
msgstr "ukaž okamžitou rychlost přenosu dat"
|
||||
|
||||
#: src/main/help.c:299
|
||||
msgid "show data transfer average rate counter"
|
||||
msgstr "ukaž průměrnou rychlost přenosu dat"
|
||||
|
||||
#: src/main/help.c:301 src/main/help.c:335 src/main/help.c:350
|
||||
msgid "SEC"
|
||||
msgstr "SEK"
|
||||
|
||||
#: src/main/help.c:302
|
||||
msgid "compute average rate over past SEC seconds (default 30s)"
|
||||
msgstr "počítej průměrnou rychlost za posledních SEK sekund (výchozí: 30)"
|
||||
|
||||
#: src/main/help.c:305
|
||||
msgid "show number of bytes transferred"
|
||||
msgstr "ukaž počet přenesených bajtů"
|
||||
|
||||
#: src/main/help.c:308
|
||||
msgid "show number of bits transferred"
|
||||
msgstr "ukaž počet přenesených bitů"
|
||||
|
||||
#: src/main/help.c:311
|
||||
msgid "treat suffixes as multiples of 1000 rather than 1024"
|
||||
msgstr "zacházej se suffixy jako s násobky 1000 namísto 1024"
|
||||
|
||||
#: src/main/help.c:314
|
||||
msgid "show percentage of transfer buffer in use"
|
||||
msgstr "ukaž procento využité vyrovnávací paměti"
|
||||
|
||||
#: src/main/help.c:316
|
||||
msgid "NUM"
|
||||
msgstr "ČÍS"
|
||||
|
||||
#: src/main/help.c:317
|
||||
msgid "show NUM bytes last written"
|
||||
msgstr "zobraz ČÍS posledních zapsaných bajtů"
|
||||
|
||||
#: src/main/help.c:319
|
||||
msgid "FORMAT"
|
||||
msgstr "FORMÁT"
|
||||
|
||||
#: src/main/help.c:320
|
||||
msgid "set output format to FORMAT"
|
||||
msgstr "nastav formát výstupu na FORMÁT"
|
||||
|
||||
#: src/main/help.c:323
|
||||
msgid "output transfer statistics at the end"
|
||||
msgstr "po dokončení vypiš údaje o přenosu"
|
||||
|
||||
#: src/main/help.c:326
|
||||
msgid "output percentages, not visual information"
|
||||
msgstr "vypisuj procenta, ne vizuální informace"
|
||||
|
||||
#: src/main/help.c:329
|
||||
msgid "do not output any transfer information at all"
|
||||
msgstr "nevypisuj žádné informace o přenosu"
|
||||
|
||||
#: src/main/help.c:333
|
||||
msgid "display nothing until first byte transferred"
|
||||
msgstr "nic nevypisuj, dokud není přenesen první byte"
|
||||
|
||||
#: src/main/help.c:336
|
||||
msgid "display nothing until SEC seconds have passed"
|
||||
msgstr "nic nevypisuj, dokud neuplyne SEK sekund"
|
||||
|
||||
#: src/main/help.c:338
|
||||
msgid "SIZE"
|
||||
msgstr "VEL"
|
||||
|
||||
#: src/main/help.c:339
|
||||
msgid "set estimated data size to SIZE bytes"
|
||||
msgstr "nastav očekávanou velikost dat na VEL bajtů"
|
||||
|
||||
#: src/main/help.c:342
|
||||
msgid "if size unknown, show rate vs max rate"
|
||||
msgstr "pokud je velikost neznámá, ukaž rychlost vs maximální rychlost"
|
||||
|
||||
#: src/main/help.c:345
|
||||
msgid "count lines instead of bytes"
|
||||
msgstr "počítej řádky místo bajtů"
|
||||
|
||||
#: src/main/help.c:348
|
||||
msgid "lines are null-terminated"
|
||||
msgstr "řádky jsou zakončené nulovým znakem"
|
||||
|
||||
#: src/main/help.c:351
|
||||
msgid "update every SEC seconds"
|
||||
msgstr "aktualizuj každých SEK sekund"
|
||||
|
||||
#: src/main/help.c:353
|
||||
msgid "WIDTH"
|
||||
msgstr "ŠÍŘ"
|
||||
|
||||
#: src/main/help.c:354
|
||||
msgid "assume terminal is WIDTH characters wide"
|
||||
msgstr "předpokládej šířku terminálu ŠÍŘ znaků"
|
||||
|
||||
#: src/main/help.c:356
|
||||
msgid "HEIGHT"
|
||||
msgstr "VÝŠ"
|
||||
|
||||
#: src/main/help.c:357
|
||||
msgid "assume terminal is HEIGHT rows high"
|
||||
msgstr "předpokládej výšku terminálu VÝŠ znaků"
|
||||
|
||||
#: src/main/help.c:359
|
||||
msgid "NAME"
|
||||
msgstr "JMÉNO"
|
||||
|
||||
#: src/main/help.c:360
|
||||
msgid "prefix visual information with NAME"
|
||||
msgstr "přidej JMÉNO před vizuální informace"
|
||||
|
||||
#: src/main/help.c:363
|
||||
msgid "output even if standard error is not a terminal"
|
||||
msgstr "vypisuj výstup i pokud standardní chybový výstup není terminál"
|
||||
|
||||
#: src/main/help.c:366
|
||||
msgid "use cursor positioning escape sequences"
|
||||
msgstr "pozicuj kurzor pomocí řídících znaků"
|
||||
|
||||
#: src/main/help.c:369 src/main/help.c:399 src/main/help.c:408
|
||||
#: src/main/help.c:423
|
||||
msgid "FILE"
|
||||
msgstr "SOUBOR"
|
||||
|
||||
#: src/main/help.c:370
|
||||
msgid "write output to FILE instead of stdout"
|
||||
msgstr "zapiš výstup do SOUBORu namísto standardního výstupu"
|
||||
|
||||
#: src/main/help.c:372
|
||||
msgid "RATE"
|
||||
msgstr "RYCH"
|
||||
|
||||
#: src/main/help.c:373
|
||||
msgid "limit transfer to RATE bytes per second"
|
||||
msgstr "omez přenosovou rychlost na RYCH bajtů za sekundu"
|
||||
|
||||
#: src/main/help.c:375 src/main/help.c:384
|
||||
msgid "BYTES"
|
||||
msgstr "BAJT"
|
||||
|
||||
#: src/main/help.c:376
|
||||
msgid "use a buffer size of BYTES"
|
||||
msgstr "použij vyrovnávací pamět BAJT bajtů"
|
||||
|
||||
#: src/main/help.c:379
|
||||
msgid "never use splice(), always use read/write"
|
||||
msgstr "nepoužívej splice(), vždy použij read/write"
|
||||
|
||||
#: src/main/help.c:382
|
||||
msgid "skip read errors in input"
|
||||
msgstr "ignoruj chyby při čtení vstupu"
|
||||
|
||||
#: src/main/help.c:385
|
||||
msgid "skip errors in BYTES blocks at a time"
|
||||
msgstr "přeskakuj chyby v blocích BAJTů naráz"
|
||||
|
||||
#: src/main/help.c:388
|
||||
msgid "stop after --size bytes have been transferred"
|
||||
msgstr "zastav po přenosu --size bajtů"
|
||||
|
||||
#: src/main/help.c:391
|
||||
msgid "flush cache to disk after every write"
|
||||
msgstr "po každém zápisu vyprázdni cache na disk"
|
||||
|
||||
#: src/main/help.c:394
|
||||
msgid "use direct I/O to bypass cache"
|
||||
msgstr "použij přímý V/V k obejítí cache"
|
||||
|
||||
#: src/main/help.c:397
|
||||
msgid "discard input instead of writing to output"
|
||||
msgstr "zahoď vstup namísto zápisu na výstup"
|
||||
|
||||
#: src/main/help.c:400
|
||||
msgid "write all input to FILE before writing to output"
|
||||
msgstr "zapiš veškerý vstup do SOUBORu před výpisem na výstup"
|
||||
|
||||
#: src/main/help.c:403
|
||||
msgid "PID"
|
||||
msgstr "PID"
|
||||
|
||||
#: src/main/help.c:404
|
||||
msgid "update settings of process PID"
|
||||
msgstr "aktualizuj nastavení procesu PID"
|
||||
|
||||
#: src/main/help.c:409
|
||||
msgid "save process ID in FILE"
|
||||
msgstr "ulož id procesu do SOUBORu"
|
||||
|
||||
#: src/main/help.c:412
|
||||
msgid "PID[:FD]"
|
||||
msgstr "PID[:DS]"
|
||||
|
||||
#: src/main/help.c:413
|
||||
msgid "watch file FD opened by process PID"
|
||||
msgstr "sleduj soubor DS otevřený procesem PID"
|
||||
|
||||
#: src/main/help.c:417
|
||||
msgid "show this help and exit"
|
||||
msgstr "ukaž pomoc a skonči"
|
||||
|
||||
#: src/main/help.c:420
|
||||
msgid "show version information and exit"
|
||||
msgstr "ukaž informace o verzi a skonči"
|
||||
|
||||
#: src/main/help.c:424
|
||||
msgid "write debug logs to FILE"
|
||||
msgstr "zapiš ladící záznamy do SOUBORu"
|
||||
|
||||
#: src/main/help.c:449
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION] [FILE]..."
|
||||
msgstr "Použití: %s [VOLBY] [SOUBOR]..."
|
||||
|
||||
#: src/main/help.c:460
|
||||
msgid ""
|
||||
"Concatenate FILE(s), or standard input, to standard output, with monitoring."
|
||||
msgstr ""
|
||||
"Spoj SOUBOR(y) nebo standardní vstup na standardního výstup, s monitoringem."
|
||||
|
||||
#: src/main/help.c:597
|
||||
#, c-format
|
||||
msgid "Please report any bugs to: %s"
|
||||
msgstr "Prosím, hlašte veškeré chyby na: %s"
|
||||
|
||||
#: src/main/main.c:214
|
||||
msgid "(input)"
|
||||
msgstr "(vstup)"
|
||||
|
||||
#: src/main/main.c:299
|
||||
msgid "state allocation failed"
|
||||
msgstr "selhala alokace stavu"
|
||||
|
||||
#: src/main/options.c:140 src/pv/file.c:324
|
||||
msgid "failed to stat file"
|
||||
msgstr "nebylo možné zjistit informace o souboru"
|
||||
|
||||
#: src/main/options.c:154
|
||||
msgid "is a directory"
|
||||
msgstr "je adresář"
|
||||
|
||||
#: src/main/options.c:183
|
||||
msgid "failed to generate sysfs filename"
|
||||
msgstr "selhalo vytváření jména pro soubor v sysfs"
|
||||
|
||||
#: src/main/options.c:205
|
||||
msgid "failed to read sysfs size file"
|
||||
msgstr "selhalo čtení velikosti souboru v sysfs"
|
||||
|
||||
#: src/main/options.c:225
|
||||
msgid "failed to open block device"
|
||||
msgstr "selhalo otevření blokového zařízení"
|
||||
|
||||
#: src/main/options.c:235
|
||||
msgid "failed to determine size of block device"
|
||||
msgstr "selhalo zjištění velikosti blokového zařízení"
|
||||
|
||||
#: src/main/options.c:339
|
||||
msgid "option structure allocation failed"
|
||||
msgstr "selhala alokace struktury pro volby"
|
||||
|
||||
#: src/main/options.c:358
|
||||
msgid "option structure argv allocation failed"
|
||||
msgstr "selhala alokace struktury pro argv"
|
||||
|
||||
#: src/main/options.c:420
|
||||
msgid "integer argument expected"
|
||||
msgstr "očekáván celočíselný argument"
|
||||
|
||||
#: src/main/options.c:431
|
||||
msgid "numeric argument expected"
|
||||
msgstr "očekáván číselný argument"
|
||||
|
||||
#: src/main/options.c:442
|
||||
msgid "process ID or pid:fd pair expected"
|
||||
msgstr "očekáváno ID procesu nebo dvojice PID:DS"
|
||||
|
||||
#: src/main/options.c:449
|
||||
msgid "invalid process ID"
|
||||
msgstr "neplatné ID procesu"
|
||||
|
||||
#: src/main/options.c:666
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Zkuste `%s --help' pro více informací."
|
||||
|
||||
#: src/main/options.c:668
|
||||
#, c-format
|
||||
msgid "Try `%s -h' for more information."
|
||||
msgstr "Zkuste `%s --h' pro více informací."
|
||||
|
||||
#: src/main/options.c:699
|
||||
msgid ""
|
||||
"cannot use line mode or transfer modifier options when watching file "
|
||||
"descriptors"
|
||||
msgstr ""
|
||||
"při sledování deskriptorů souborů nelze použít řádkový mód nebo volby pro "
|
||||
"modifikaci přenosu"
|
||||
|
||||
#: src/main/options.c:708
|
||||
msgid "cannot use cursor positioning when watching file descriptors"
|
||||
msgstr "při sledování deskriptorů souborů nelze pozicování kurzoru použít"
|
||||
|
||||
#: src/main/options.c:717
|
||||
msgid "cannot use remote control when watching file descriptors"
|
||||
msgstr "při sledování deskriptorů souborů nelze použít vzdálené ovládání"
|
||||
|
||||
#: src/main/options.c:726
|
||||
msgid "cannot transfer files when watching file descriptors"
|
||||
msgstr "při sledování deskriptorů souborů nelze použít přenos souborů"
|
||||
|
||||
#: src/main/options.c:741
|
||||
msgid "not available on systems without /proc/self/fdinfo"
|
||||
msgstr "není dostupné na systémech bez /proc/self/fdinfo"
|
||||
|
||||
#: src/main/remote.c:302
|
||||
msgid "message not received"
|
||||
msgstr "zpráva nepřijata"
|
||||
|
||||
#: src/main/remote.c:429
|
||||
msgid "SA_SIGINFO not supported on this system"
|
||||
msgstr "SA_SIGINFO není na tomto systému podporováno"
|
||||
|
||||
#: src/main/version.c:28
|
||||
msgid "License: GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.html>"
|
||||
msgstr "Licence: GPLv3+ <https://jxself.org/translations/gpl-3.cz.shtml>"
|
||||
|
||||
#: src/main/version.c:29
|
||||
msgid "This is free software: you are free to change and redistribute it."
|
||||
msgstr "Toto je svobodný software; můžete ho volně měnit a šířit."
|
||||
|
||||
#: src/main/version.c:30
|
||||
msgid "There is NO WARRANTY, to the extent permitted by law."
|
||||
msgstr "Na program se nevztahuje ŽÁDNÁ ZÁRUKA, v míře povolené zákonem."
|
||||
|
||||
#: src/main/version.c:32
|
||||
msgid "Project web site"
|
||||
msgstr "Stránka projektu"
|
||||
|
||||
#: src/pv/cursor.c:61
|
||||
msgid "failed to get terminal name"
|
||||
msgstr "selhalo zjištění názvu terminálu"
|
||||
|
||||
#: src/pv/cursor.c:106
|
||||
msgid "failed to open lock file"
|
||||
msgstr "selhalo otevření zámkového souboru"
|
||||
|
||||
#: src/pv/cursor.c:139
|
||||
msgid "lock attempt failed"
|
||||
msgstr "selhal pokus o uzamčení"
|
||||
|
||||
#: src/pv/cursor.c:400
|
||||
msgid "failed to open terminal"
|
||||
msgstr "selhalo otevření terminálu"
|
||||
|
||||
#: src/pv/display.c:233
|
||||
msgid "yzafpnum kMGTPEZY"
|
||||
msgstr "yzafpnum kMGTPEZY"
|
||||
|
||||
#: src/pv/display.c:251
|
||||
msgid "yzafpnum KMGTPEZY"
|
||||
msgstr "yzafpnum KMGTPEZY"
|
||||
|
||||
#: src/pv/display.c:678 src/pv/transfer.c:1011
|
||||
msgid "buffer allocation failed"
|
||||
msgstr "selhala alokace vyrovnávací paměti"
|
||||
|
||||
#: src/pv/display.c:807
|
||||
msgid "b"
|
||||
msgstr "b"
|
||||
|
||||
#: src/pv/display.c:810 src/pv/transfer.c:602
|
||||
msgid "B"
|
||||
msgstr "B"
|
||||
|
||||
#: src/pv/display.c:854 src/pv/display.c:869 src/pv/display.c:1088
|
||||
#: src/pv/loop.c:549
|
||||
msgid "b/s"
|
||||
msgstr "b/s"
|
||||
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
msgid "/s"
|
||||
msgstr "/s"
|
||||
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
#: src/pv/loop.c:549
|
||||
msgid "B/s"
|
||||
msgstr "B/s"
|
||||
|
||||
#: src/pv/display.c:901 src/pv/display.c:905
|
||||
msgid "ETA"
|
||||
msgstr "ETA"
|
||||
|
||||
#: src/pv/display.c:971
|
||||
msgid "FIN"
|
||||
msgstr "FIN"
|
||||
|
||||
#: src/pv/file.c:149
|
||||
msgid "failed to seek to start of output"
|
||||
msgstr "selhalo posunutí za začátek výstupu"
|
||||
|
||||
#: src/pv/file.c:294
|
||||
msgid "failed to close file"
|
||||
msgstr "selhalo zavření souboru"
|
||||
|
||||
#: src/pv/file.c:317
|
||||
msgid "failed to read file"
|
||||
msgstr "selhalo čtení ze souboru"
|
||||
|
||||
#: src/pv/file.c:332
|
||||
msgid "failed to stat output file"
|
||||
msgstr "selhalo zjištění informací o výstupním souboru"
|
||||
|
||||
#: src/pv/file.c:354
|
||||
msgid "input file is output file"
|
||||
msgstr "vstupní soubor je výstupní soubor"
|
||||
|
||||
#: src/pv/file.c:412
|
||||
msgid "(none)"
|
||||
msgstr "(žádný)"
|
||||
|
||||
#: src/pv/file.c:414
|
||||
msgid "(stdin)"
|
||||
msgstr "(stdin)"
|
||||
|
||||
#: src/pv/loop.c:548
|
||||
msgid "rate min/avg/max/mdev"
|
||||
msgstr "rychlost min/avg/max/std"
|
||||
|
||||
#: src/pv/loop.c:560
|
||||
msgid "rate not measured"
|
||||
msgstr "rychlost neměřena"
|
||||
|
||||
#: src/pv/loop.c:766 src/pv/loop.c:817 src/pv/loop.c:858 src/pv/watchpid.c:99
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:120 src/pv/watchpid.c:128
|
||||
#: src/pv/watchpid.c:165 src/pv/watchpid.c:184 src/pv/watchpid.c:192
|
||||
#: src/pv/watchpid.c:202 src/pv/watchpid.c:293 src/pv/watchpid.c:301
|
||||
#: src/pv/watchpid.c:377 src/pv/watchpid.c:398
|
||||
msgid "pid"
|
||||
msgstr "pid"
|
||||
|
||||
#: src/pv/state.c:40
|
||||
msgid "history structure allocation failed"
|
||||
msgstr "selhala alokace struktury historie"
|
||||
|
||||
#: src/pv/state.c:509 src/pv/state.c:520
|
||||
msgid "file list allocation failed"
|
||||
msgstr "selhala alokace seznamu souborů"
|
||||
|
||||
#: src/pv/transfer.c:464
|
||||
msgid "read failed"
|
||||
msgstr "čtení selhalo"
|
||||
|
||||
#: src/pv/transfer.c:487
|
||||
msgid "warning: read errors detected"
|
||||
msgstr "varování: detekovány chyby při čtení"
|
||||
|
||||
#: src/pv/transfer.c:503
|
||||
msgid "file is not seekable"
|
||||
msgstr "souborem nelze procházet"
|
||||
|
||||
#: src/pv/transfer.c:581
|
||||
msgid "failed to seek past error"
|
||||
msgstr "selhal skok za chybu"
|
||||
|
||||
#: src/pv/transfer.c:601
|
||||
msgid "skipped past read error"
|
||||
msgstr "chyba přeskočena"
|
||||
|
||||
#: src/pv/transfer.c:642
|
||||
msgid "no transfer buffer allocated"
|
||||
msgstr "vyrovnávací paměť není alokována"
|
||||
|
||||
#: src/pv/transfer.c:684
|
||||
msgid "failed to set interval timer"
|
||||
msgstr "selhalo nastavení intervalového časovače"
|
||||
|
||||
#: src/pv/transfer.c:710
|
||||
msgid "failed to clear interval timer"
|
||||
msgstr "selhalo vynulování intervalového časovače"
|
||||
|
||||
#: src/pv/transfer.c:740
|
||||
msgid "line position buffer allocation failed"
|
||||
msgstr "selhala alokace vyrovnávací paměti pro pozici v řádcích"
|
||||
|
||||
#: src/pv/transfer.c:872
|
||||
msgid "write failed"
|
||||
msgstr "zápis selhal"
|
||||
|
||||
#: src/pv/transfer.c:1109
|
||||
msgid "select call failed"
|
||||
msgstr "selhalo volání select"
|
||||
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:121 src/pv/watchpid.c:130
|
||||
#: src/pv/watchpid.c:184 src/pv/watchpid.c:193 src/pv/watchpid.c:204
|
||||
msgid "fd"
|
||||
msgstr "ds"
|
||||
|
||||
#: src/pv/watchpid.c:130 src/pv/watchpid.c:204
|
||||
msgid "not a regular file or block device"
|
||||
msgstr "není obyčejný soubor nebo blokové zařízení"
|
||||
@@ -1,9 +1,15 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: pv@ivarch.com\n"
|
||||
"POT-Creation-Date: 2024-08-18 22:01+0100\n"
|
||||
"POT-Creation-Date: 2024-10-15 22:01+0100\n"
|
||||
"PO-Revision-Date: 2024-10-13 20:43+0000\n"
|
||||
"Last-Translator: fnetX <otto@codeberg.org>\n"
|
||||
"Language-Team: German <https://translate.codeberg.org/projects/pv/pv/de/>\n"
|
||||
"Language: de\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.7.2\n"
|
||||
"Date: 1999-06-01 15:18:29+0100\n"
|
||||
"From: Andrew Wood <ivarch@ubik>\n"
|
||||
"Xgettext-Options: --default-domain=pkgbuild --directory=./.pkgdir --add-"
|
||||
@@ -42,27 +48,29 @@ msgstr "zeige die Datentransferrate an"
|
||||
|
||||
#: src/main/help.c:299
|
||||
msgid "show data transfer average rate counter"
|
||||
msgstr ""
|
||||
msgstr "zeige die durchschnittliche Übertragungsrate"
|
||||
|
||||
#: src/main/help.c:301 src/main/help.c:332 src/main/help.c:344
|
||||
#: src/main/help.c:301 src/main/help.c:335 src/main/help.c:350
|
||||
msgid "SEC"
|
||||
msgstr ""
|
||||
msgstr "SEK"
|
||||
|
||||
#: src/main/help.c:302
|
||||
msgid "compute average rate over past SEC seconds (default 30s)"
|
||||
msgstr ""
|
||||
"berechne die durchschnittliche Übertragungsrate über die letzten SEK "
|
||||
"Sekunden (Standard 30s)"
|
||||
|
||||
#: src/main/help.c:305
|
||||
msgid "show number of bytes transferred"
|
||||
msgstr "zeige die Anzahl von Bytes, die transferiert worden sind"
|
||||
msgstr "zeige die Anzahl der übertragenen Bytes"
|
||||
|
||||
#: src/main/help.c:308
|
||||
msgid "show number of bits transferred"
|
||||
msgstr ""
|
||||
msgstr "zeige die Anzahl der übertragenen Bits"
|
||||
|
||||
#: src/main/help.c:311
|
||||
msgid "treat suffixes as multiples of 1000 rather than 1024"
|
||||
msgstr ""
|
||||
msgstr "behandle Endungen als Vielfache von 1000 statt von 1024"
|
||||
|
||||
#: src/main/help.c:314
|
||||
msgid "show percentage of transfer buffer in use"
|
||||
@@ -70,7 +78,7 @@ msgstr "zeige, wie viel Prozent des Übertragungsbuffers in Benutzung sind"
|
||||
|
||||
#: src/main/help.c:316
|
||||
msgid "NUM"
|
||||
msgstr ""
|
||||
msgstr "NUM"
|
||||
|
||||
#: src/main/help.c:317
|
||||
msgid "show NUM bytes last written"
|
||||
@@ -78,269 +86,287 @@ msgstr "NUM zeige die zuletzt geschriebenen NUM Bytes"
|
||||
|
||||
#: src/main/help.c:319
|
||||
msgid "FORMAT"
|
||||
msgstr ""
|
||||
msgstr "FORMAT"
|
||||
|
||||
#: src/main/help.c:320
|
||||
msgid "set output format to FORMAT"
|
||||
msgstr "setze das Ausgabeformat auf FORMAT"
|
||||
|
||||
#: src/main/help.c:323
|
||||
msgid "output transfer statistics at the end"
|
||||
msgstr "Übertragungsstatistiken am Ende ausgeben"
|
||||
|
||||
#: src/main/help.c:326
|
||||
msgid "output percentages, not visual information"
|
||||
msgstr "Ausgabe von Prozent-Angaben statt visueller Darstellung"
|
||||
|
||||
#: src/main/help.c:326
|
||||
#: src/main/help.c:329
|
||||
msgid "do not output any transfer information at all"
|
||||
msgstr "sämtliche Transferinformationen unterdrücken"
|
||||
|
||||
#: src/main/help.c:330
|
||||
#: src/main/help.c:333
|
||||
msgid "display nothing until first byte transferred"
|
||||
msgstr "keine Ausgabe bevor das erste Byte übertragen wurde"
|
||||
|
||||
#: src/main/help.c:333
|
||||
msgid "display nothing until SEC seconds have passed"
|
||||
msgstr "SEC nichts anzeigen, bis SEC Sekunden vergangen sind"
|
||||
|
||||
#: src/main/help.c:335
|
||||
msgid "SIZE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:336
|
||||
msgid "display nothing until SEC seconds have passed"
|
||||
msgstr "nichts anzeigen ehe SEK Sekunden vergangen sind"
|
||||
|
||||
#: src/main/help.c:338
|
||||
msgid "SIZE"
|
||||
msgstr "GRÖẞE"
|
||||
|
||||
#: src/main/help.c:339
|
||||
msgid "set estimated data size to SIZE bytes"
|
||||
msgstr "setze erwartete Datenlänge auf SIZE Byte"
|
||||
|
||||
#: src/main/help.c:339
|
||||
#: src/main/help.c:342
|
||||
msgid "if size unknown, show rate vs max rate"
|
||||
msgstr "zeige Rate vs maximale Rate, falls die größe unbekannt ist"
|
||||
|
||||
#: src/main/help.c:345
|
||||
msgid "count lines instead of bytes"
|
||||
msgstr "zähle Zeilen anstelle von Bytes"
|
||||
|
||||
#: src/main/help.c:342
|
||||
#: src/main/help.c:348
|
||||
msgid "lines are null-terminated"
|
||||
msgstr "Zeilen sind nullterminiert"
|
||||
|
||||
#: src/main/help.c:345
|
||||
msgid "update every SEC seconds"
|
||||
msgstr "aktualisiere Ausgabe nach SEC Sekunden Intervall"
|
||||
|
||||
#: src/main/help.c:347
|
||||
msgid "WIDTH"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:348
|
||||
msgid "assume terminal is WIDTH characters wide"
|
||||
msgstr "setze Terminal-Breite auf WIDTH Zeichen"
|
||||
|
||||
#: src/main/help.c:350
|
||||
msgid "HEIGHT"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:351
|
||||
msgid "assume terminal is HEIGHT rows high"
|
||||
msgstr "setze Terminal-Höhe auf HEIGHT Zeichen"
|
||||
msgid "update every SEC seconds"
|
||||
msgstr "aktualisiere Ausgabe nach SEK Sekunden Intervall"
|
||||
|
||||
#: src/main/help.c:353
|
||||
msgid "NAME"
|
||||
msgstr ""
|
||||
msgid "WIDTH"
|
||||
msgstr "BREITE"
|
||||
|
||||
#: src/main/help.c:354
|
||||
msgid "assume terminal is WIDTH characters wide"
|
||||
msgstr "setze Terminal-Breite auf BREITE Zeichen"
|
||||
|
||||
#: src/main/help.c:356
|
||||
msgid "HEIGHT"
|
||||
msgstr "HÖHE"
|
||||
|
||||
#: src/main/help.c:357
|
||||
msgid "assume terminal is HEIGHT rows high"
|
||||
msgstr "setze Terminal-Höhe auf HÖHE Zeichen"
|
||||
|
||||
#: src/main/help.c:359
|
||||
msgid "NAME"
|
||||
msgstr "NAME"
|
||||
|
||||
#: src/main/help.c:360
|
||||
msgid "prefix visual information with NAME"
|
||||
msgstr "setze den NAMEn für visuelle Darstellung"
|
||||
|
||||
#: src/main/help.c:357
|
||||
#: src/main/help.c:363
|
||||
msgid "output even if standard error is not a terminal"
|
||||
msgstr ""
|
||||
"Ausgabe auch dann erzwingen, wenn der Fehlerausgabe-Kanal kein Terminal ist"
|
||||
|
||||
#: src/main/help.c:360
|
||||
#: src/main/help.c:366
|
||||
msgid "use cursor positioning escape sequences"
|
||||
msgstr "benutze Escape-Sequenzen zur Cursor-Positionierung"
|
||||
|
||||
#: src/main/help.c:363 src/main/help.c:399 src/main/help.c:414
|
||||
#: src/main/help.c:369 src/main/help.c:399 src/main/help.c:408
|
||||
#: src/main/help.c:423
|
||||
msgid "FILE"
|
||||
msgstr ""
|
||||
msgstr "DATEI"
|
||||
|
||||
#: src/main/help.c:364
|
||||
#: src/main/help.c:370
|
||||
msgid "write output to FILE instead of stdout"
|
||||
msgstr ""
|
||||
msgstr "schreibe die Ausgabe in DATEI statt in die Standardausgabe"
|
||||
|
||||
#: src/main/help.c:366
|
||||
#: src/main/help.c:372
|
||||
msgid "RATE"
|
||||
msgstr ""
|
||||
msgstr "RATE"
|
||||
|
||||
#: src/main/help.c:367
|
||||
#: src/main/help.c:373
|
||||
msgid "limit transfer to RATE bytes per second"
|
||||
msgstr "beschränke die Transferrate auf RATE Byte pro Sekunde"
|
||||
|
||||
#: src/main/help.c:369 src/main/help.c:378
|
||||
#: src/main/help.c:375 src/main/help.c:384
|
||||
msgid "BYTES"
|
||||
msgstr ""
|
||||
msgstr "BYTES"
|
||||
|
||||
#: src/main/help.c:370
|
||||
#: src/main/help.c:376
|
||||
msgid "use a buffer size of BYTES"
|
||||
msgstr "BYTES benutze einen Puffer in der Größe von BYTES"
|
||||
msgstr "benutze einen Puffer in der Größe von BYTES"
|
||||
|
||||
#: src/main/help.c:373
|
||||
#: src/main/help.c:379
|
||||
msgid "never use splice(), always use read/write"
|
||||
msgstr "anstelle von splice() immer read/write benutzen"
|
||||
|
||||
#: src/main/help.c:376
|
||||
#: src/main/help.c:382
|
||||
msgid "skip read errors in input"
|
||||
msgstr "Lesefehler in der Eingabe nicht beachten"
|
||||
|
||||
#: src/main/help.c:379
|
||||
#: src/main/help.c:385
|
||||
msgid "skip errors in BYTES blocks at a time"
|
||||
msgstr ""
|
||||
msgstr "bei Fehlern BYTES am Stück überspringen"
|
||||
|
||||
#: src/main/help.c:382
|
||||
#: src/main/help.c:388
|
||||
msgid "stop after --size bytes have been transferred"
|
||||
msgstr "anhalten, nachdem --size Bytes übertragen wurden"
|
||||
|
||||
#: src/main/help.c:385
|
||||
msgid "flush cache to disk after every write"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:388
|
||||
msgid "use direct I/O to bypass cache"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:391
|
||||
msgid "discard input instead of writing to output"
|
||||
msgstr ""
|
||||
msgid "flush cache to disk after every write"
|
||||
msgstr "schreibe den Cache nach jedem Schreibvorgang auf die Festplatte"
|
||||
|
||||
#: src/main/help.c:394
|
||||
msgid "PID"
|
||||
msgstr ""
|
||||
msgid "use direct I/O to bypass cache"
|
||||
msgstr "verwende direkte E/A, um den Cache zu umgehen"
|
||||
|
||||
#: src/main/help.c:395
|
||||
#: src/main/help.c:397
|
||||
msgid "discard input instead of writing to output"
|
||||
msgstr "verwirf die Eingabe anstatt in die Ausgabe zu schreiben"
|
||||
|
||||
#: src/main/help.c:400
|
||||
msgid "write all input to FILE before writing to output"
|
||||
msgstr "Ausgabe nach FILE schrieben bevor sie ausgegeben wird"
|
||||
|
||||
#: src/main/help.c:403
|
||||
msgid "PID"
|
||||
msgstr "PID"
|
||||
|
||||
#: src/main/help.c:404
|
||||
msgid "update settings of process PID"
|
||||
msgstr "Einstellungen der Prozess-PID updaten"
|
||||
|
||||
#: src/main/help.c:400
|
||||
#: src/main/help.c:409
|
||||
msgid "save process ID in FILE"
|
||||
msgstr "Prozess-ID in FILE speichern"
|
||||
msgstr "Prozess-ID in DATEI speichern"
|
||||
|
||||
#: src/main/help.c:403
|
||||
#: src/main/help.c:412
|
||||
msgid "PID[:FD]"
|
||||
msgstr ""
|
||||
msgstr "PID[:FD]"
|
||||
|
||||
#: src/main/help.c:404
|
||||
#: src/main/help.c:413
|
||||
msgid "watch file FD opened by process PID"
|
||||
msgstr "die vom Prozess PID geöffnete Datei FD beobachten"
|
||||
|
||||
#: src/main/help.c:408
|
||||
#: src/main/help.c:417
|
||||
msgid "show this help and exit"
|
||||
msgstr "zeige diese Hilfe und beende"
|
||||
|
||||
#: src/main/help.c:411
|
||||
#: src/main/help.c:420
|
||||
msgid "show version information and exit"
|
||||
msgstr "zeige Versionsinformationen und beende"
|
||||
|
||||
#: src/main/help.c:415
|
||||
#: src/main/help.c:424
|
||||
msgid "write debug logs to FILE"
|
||||
msgstr ""
|
||||
msgstr "schreibe Debug-Protokolle in DATEI"
|
||||
|
||||
#: src/main/help.c:440
|
||||
#: src/main/help.c:449
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION] [FILE]..."
|
||||
msgstr "Syntax: %s [OPTION] [DATEI]..."
|
||||
msgstr "Aufruf: %s [OPTION] [DATEI]..."
|
||||
|
||||
#: src/main/help.c:451
|
||||
#: src/main/help.c:460
|
||||
msgid ""
|
||||
"Concatenate FILE(s), or standard input, to standard output, with monitoring."
|
||||
msgstr ""
|
||||
"Verbindet DATEI(en) oder den Standard-Eingabe-Kanal mit dem Standard-Ausgabe-"
|
||||
"Kanal und misst den Datenstrom."
|
||||
|
||||
#: src/main/help.c:588
|
||||
#: src/main/help.c:597
|
||||
#, c-format
|
||||
msgid "Please report any bugs to: %s"
|
||||
msgstr "Bitte senden Sie Fehlerberichte an %s"
|
||||
|
||||
#: src/main/main.c:71
|
||||
#: src/main/main.c:214
|
||||
msgid "(input)"
|
||||
msgstr "(eingabe)"
|
||||
|
||||
#: src/main/main.c:299
|
||||
msgid "state allocation failed"
|
||||
msgstr "Zustandszuweisung fehlgeschlagen"
|
||||
msgstr "Speicherzuweisung für `state' fehlgeschlagen"
|
||||
|
||||
#: src/main/options.c:138 src/pv/file.c:324
|
||||
#: src/main/options.c:140 src/pv/file.c:324
|
||||
msgid "failed to stat file"
|
||||
msgstr "Dateiinformationen konnten nicht gelesen werden"
|
||||
msgstr "konnte Dateiinformationen nicht lesen"
|
||||
|
||||
#: src/main/options.c:152
|
||||
#: src/main/options.c:154
|
||||
msgid "is a directory"
|
||||
msgstr ""
|
||||
msgstr "ist ein Verzeichnis"
|
||||
|
||||
#: src/main/options.c:181
|
||||
#: src/main/options.c:183
|
||||
msgid "failed to generate sysfs filename"
|
||||
msgstr ""
|
||||
msgstr "konnte Sysfs-Dateinamen nicht erzeugen"
|
||||
|
||||
#: src/main/options.c:203
|
||||
#: src/main/options.c:205
|
||||
msgid "failed to read sysfs size file"
|
||||
msgstr ""
|
||||
msgstr "konnte Größe der Sysfs-Datei nicht lesen"
|
||||
|
||||
#: src/main/options.c:223
|
||||
#: src/main/options.c:225
|
||||
msgid "failed to open block device"
|
||||
msgstr ""
|
||||
msgstr "konnte Blockgerät nicht öffnen"
|
||||
|
||||
#: src/main/options.c:233
|
||||
#: src/main/options.c:235
|
||||
msgid "failed to determine size of block device"
|
||||
msgstr ""
|
||||
msgstr "konnte Größe des Blockgeräts nicht ermitteln"
|
||||
|
||||
#: src/main/options.c:334
|
||||
#: src/main/options.c:339
|
||||
msgid "option structure allocation failed"
|
||||
msgstr "`option' konnte nicht allokiert werden"
|
||||
msgstr "Speicherzuweisung für `option' fehlgeschlagen"
|
||||
|
||||
#: src/main/options.c:353
|
||||
#: src/main/options.c:358
|
||||
msgid "option structure argv allocation failed"
|
||||
msgstr "`option' (argv) konnte nicht allokiert werden"
|
||||
msgstr "Speicherzuweisung für `argv' der Option fehlgeschlagen"
|
||||
|
||||
#: src/main/options.c:415
|
||||
#: src/main/options.c:420
|
||||
msgid "integer argument expected"
|
||||
msgstr "Ganzzahliges Argument erwartet"
|
||||
|
||||
#: src/main/options.c:426
|
||||
#: src/main/options.c:431
|
||||
msgid "numeric argument expected"
|
||||
msgstr "numerisches Argument erwartet"
|
||||
|
||||
#: src/main/options.c:437
|
||||
#: src/main/options.c:442
|
||||
msgid "process ID or pid:fd pair expected"
|
||||
msgstr "Prozess-ID oder PID:FD-Paar erwartet"
|
||||
|
||||
#: src/main/options.c:444
|
||||
#: src/main/options.c:449
|
||||
msgid "invalid process ID"
|
||||
msgstr "ungültige Prozess-ID"
|
||||
|
||||
#: src/main/options.c:647
|
||||
#: src/main/options.c:666
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "`%s --help' zeigt weitere Informationen an."
|
||||
|
||||
#: src/main/options.c:649
|
||||
#: src/main/options.c:668
|
||||
#, c-format
|
||||
msgid "Try `%s -h' for more information."
|
||||
msgstr "`%s -h' zeigt weitere Informationen an."
|
||||
|
||||
#: src/main/options.c:680
|
||||
#: src/main/options.c:699
|
||||
msgid ""
|
||||
"cannot use line mode or transfer modifier options when watching file "
|
||||
"descriptors"
|
||||
msgstr ""
|
||||
"Beim Anzeigen von Dateideskriptoren können keine Optionen für den "
|
||||
"Beim Beobachten von Dateideskriptoren können keine Optionen für den "
|
||||
"Zeilenmodus oder den Übertragungsmodifikator verwendet werden"
|
||||
|
||||
#: src/main/options.c:689
|
||||
#: src/main/options.c:708
|
||||
msgid "cannot use cursor positioning when watching file descriptors"
|
||||
msgstr ""
|
||||
"Beim Anzeigen von Dateideskriptoren können keine Zeilenmodus- oder "
|
||||
"Übertragungsmodifikatoroptionen verwendet werden."
|
||||
"Beim Beobachten von Dateideskriptoren kann Cursor-Positionierung nicht "
|
||||
"verwendet werden"
|
||||
|
||||
#: src/main/options.c:698
|
||||
#: src/main/options.c:717
|
||||
msgid "cannot use remote control when watching file descriptors"
|
||||
msgstr ""
|
||||
"kann keine Fernbedienung verwenden, wenn Dateideskriptoren angezeigt werden"
|
||||
"Beim Beobachten von Dateideskriptoren kann die Fernbedienung nicht verwenden "
|
||||
"werden"
|
||||
|
||||
#: src/main/options.c:707
|
||||
#: src/main/options.c:726
|
||||
msgid "cannot transfer files when watching file descriptors"
|
||||
msgstr ""
|
||||
"Dateien können beim Betrachten von Dateideskriptoren nicht übertragen werden"
|
||||
"Beim Beobachten von Dateideskriptoren können Dateien nicht übertragen werden"
|
||||
|
||||
#: src/main/options.c:722
|
||||
#: src/main/options.c:741
|
||||
msgid "not available on systems without /proc/self/fdinfo"
|
||||
msgstr "Nicht verfügbar auf Systemen ohne /proc/self/fdinfo"
|
||||
|
||||
@@ -354,87 +380,93 @@ msgstr "SA_SIGINFO wird auf diesem System nicht unterstützt"
|
||||
|
||||
#: src/main/version.c:28
|
||||
msgid "License: GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.html>"
|
||||
msgstr ""
|
||||
msgstr "Lizenz: GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.html>"
|
||||
|
||||
#: src/main/version.c:29
|
||||
msgid "This is free software: you are free to change and redistribute it."
|
||||
msgstr ""
|
||||
msgstr "Dies ist freie Software: Sie dürfen sie verändern und weiterverteilen."
|
||||
|
||||
#: src/main/version.c:30
|
||||
msgid "There is NO WARRANTY, to the extent permitted by law."
|
||||
msgstr ""
|
||||
msgstr "Es besteht KEINE GARANTIE, soweit dies gesetzlich zulässig ist."
|
||||
|
||||
#: src/main/version.c:32
|
||||
msgid "Project web site"
|
||||
msgstr ""
|
||||
msgstr "Projekt-Website"
|
||||
|
||||
#: src/pv/cursor.c:87
|
||||
#: src/pv/cursor.c:61
|
||||
msgid "failed to get terminal name"
|
||||
msgstr "Terminalname konnte nicht gelesen werden"
|
||||
msgstr "konnte Terminalname nicht lesen"
|
||||
|
||||
#: src/pv/cursor.c:132
|
||||
#: src/pv/cursor.c:106
|
||||
msgid "failed to open lock file"
|
||||
msgstr "Sperrdatei konnte nicht geöffnet werden"
|
||||
msgstr "konnte Sperrdatei nicht öffnen"
|
||||
|
||||
#: src/pv/cursor.c:165
|
||||
#: src/pv/cursor.c:139
|
||||
msgid "lock attempt failed"
|
||||
msgstr "Sperrversuch fehlgeschlagen"
|
||||
|
||||
#: src/pv/cursor.c:426
|
||||
#: src/pv/cursor.c:400
|
||||
msgid "failed to open terminal"
|
||||
msgstr "Terminal konnte nicht geöffnet werden"
|
||||
msgstr "konnte Terminal nicht öffnen"
|
||||
|
||||
#: src/pv/display.c:193
|
||||
#: src/pv/display.c:233
|
||||
msgid "yzafpnum kMGTPEZY"
|
||||
msgstr ""
|
||||
msgstr "yzafpnµm kMGTPEZY"
|
||||
|
||||
#: src/pv/display.c:211
|
||||
#: src/pv/display.c:251
|
||||
msgid "yzafpnum KMGTPEZY"
|
||||
msgstr ""
|
||||
msgstr "yzafpnµm KMGTPEZY"
|
||||
|
||||
#: src/pv/display.c:750 src/pv/transfer.c:970
|
||||
#: src/pv/display.c:678 src/pv/transfer.c:1011
|
||||
msgid "buffer allocation failed"
|
||||
msgstr "Puffer konnte nicht allokiert werden"
|
||||
msgstr "Speicherzuweisung für den Puffer fehlgeschlagen"
|
||||
|
||||
#: src/pv/display.c:856
|
||||
#: src/pv/display.c:807
|
||||
msgid "b"
|
||||
msgstr ""
|
||||
msgstr "b"
|
||||
|
||||
#: src/pv/display.c:859 src/pv/transfer.c:602
|
||||
#: src/pv/display.c:810 src/pv/transfer.c:602
|
||||
msgid "B"
|
||||
msgstr "B"
|
||||
|
||||
#: src/pv/display.c:900 src/pv/display.c:916
|
||||
#: src/pv/display.c:854 src/pv/display.c:869 src/pv/display.c:1088
|
||||
#: src/pv/loop.c:549
|
||||
msgid "b/s"
|
||||
msgstr ""
|
||||
msgstr "b/s"
|
||||
|
||||
#: src/pv/display.c:905 src/pv/display.c:920
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
msgid "/s"
|
||||
msgstr ""
|
||||
msgstr "/s"
|
||||
|
||||
#: src/pv/display.c:905 src/pv/display.c:920
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
#: src/pv/loop.c:549
|
||||
msgid "B/s"
|
||||
msgstr ""
|
||||
msgstr "B/s"
|
||||
|
||||
#: src/pv/display.c:947 src/pv/display.c:951 src/pv/display.c:1017
|
||||
#: src/pv/display.c:901 src/pv/display.c:905
|
||||
msgid "ETA"
|
||||
msgstr "ETA"
|
||||
|
||||
#: src/pv/display.c:971
|
||||
msgid "FIN"
|
||||
msgstr "Endzeit"
|
||||
|
||||
#: src/pv/file.c:149
|
||||
msgid "failed to seek to start of output"
|
||||
msgstr "Konnte nicht versuchen, die Ausgabe zu starten"
|
||||
msgstr "Konnte nicht zum Anfang der Ausgabe springen"
|
||||
|
||||
#: src/pv/file.c:294
|
||||
msgid "failed to close file"
|
||||
msgstr "Datei konnte nicht geschlossen werden"
|
||||
msgstr "konnte Datei nicht schließen"
|
||||
|
||||
#: src/pv/file.c:317
|
||||
msgid "failed to read file"
|
||||
msgstr "Datei konnte nicht gelesen werden"
|
||||
msgstr "konnte Datei nicht lesen"
|
||||
|
||||
#: src/pv/file.c:332
|
||||
msgid "failed to stat output file"
|
||||
msgstr "Dateiinformationen für Ausgabe-Datei konnten nicht gelesen werden"
|
||||
msgstr "konnte Dateiinformationen für Ausgabe-Datei nicht lesen"
|
||||
|
||||
#: src/pv/file.c:354
|
||||
msgid "input file is output file"
|
||||
@@ -442,27 +474,36 @@ msgstr "Eingabe-Datei ist Ausgabe-Datei"
|
||||
|
||||
#: src/pv/file.c:412
|
||||
msgid "(none)"
|
||||
msgstr ""
|
||||
msgstr "(keine)"
|
||||
|
||||
#: src/pv/file.c:414
|
||||
msgid "(stdin)"
|
||||
msgstr ""
|
||||
msgstr "(stdin)"
|
||||
|
||||
#: src/pv/loop.c:575 src/pv/loop.c:626 src/pv/loop.c:667 src/pv/watchpid.c:99
|
||||
#: src/pv/loop.c:548
|
||||
#, fuzzy
|
||||
msgid "rate min/avg/max/mdev"
|
||||
msgstr "Rate min/mittel/max/mdev"
|
||||
|
||||
#: src/pv/loop.c:560
|
||||
msgid "rate not measured"
|
||||
msgstr "Übertragungsrate nicht gemessen"
|
||||
|
||||
#: src/pv/loop.c:766 src/pv/loop.c:817 src/pv/loop.c:858 src/pv/watchpid.c:99
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:120 src/pv/watchpid.c:128
|
||||
#: src/pv/watchpid.c:165 src/pv/watchpid.c:184 src/pv/watchpid.c:192
|
||||
#: src/pv/watchpid.c:202 src/pv/watchpid.c:293 src/pv/watchpid.c:301
|
||||
#: src/pv/watchpid.c:377 src/pv/watchpid.c:398
|
||||
msgid "pid"
|
||||
msgstr ""
|
||||
msgstr "pid"
|
||||
|
||||
#: src/pv/state.c:40
|
||||
msgid "history structure allocation failed"
|
||||
msgstr ""
|
||||
msgstr "Speicherzuweisung für `history' fehlgeschlagen"
|
||||
|
||||
#: src/pv/state.c:444 src/pv/state.c:455
|
||||
#: src/pv/state.c:509 src/pv/state.c:520
|
||||
msgid "file list allocation failed"
|
||||
msgstr ""
|
||||
msgstr "Speicherzuweisung für die Dateiliste fehlgeschlagen"
|
||||
|
||||
#: src/pv/transfer.c:464
|
||||
msgid "read failed"
|
||||
@@ -474,7 +515,7 @@ msgstr "warnung: lesefehler erkannt"
|
||||
|
||||
#: src/pv/transfer.c:503
|
||||
msgid "file is not seekable"
|
||||
msgstr "datei ist nicht durchsuchbar"
|
||||
msgstr "Datei ist nicht durchsuchbar"
|
||||
|
||||
#: src/pv/transfer.c:581
|
||||
msgid "failed to seek past error"
|
||||
@@ -484,31 +525,35 @@ msgstr "konnte den Fehler nicht überwinden"
|
||||
msgid "skipped past read error"
|
||||
msgstr "über den Lesefehler hinaus verschoben"
|
||||
|
||||
#: src/pv/transfer.c:641
|
||||
#: src/pv/transfer.c:642
|
||||
msgid "no transfer buffer allocated"
|
||||
msgstr ""
|
||||
msgstr "Speicherzuweisung für den Transferpuffer fehlgeschlagen"
|
||||
|
||||
#: src/pv/transfer.c:682
|
||||
#: src/pv/transfer.c:684
|
||||
msgid "failed to set interval timer"
|
||||
msgstr ""
|
||||
msgstr "konnte Intervall-Timer nicht setzen"
|
||||
|
||||
#: src/pv/transfer.c:707
|
||||
#: src/pv/transfer.c:710
|
||||
msgid "failed to clear interval timer"
|
||||
msgstr ""
|
||||
msgstr "konnte Intervall-Timer nicht löschen"
|
||||
|
||||
#: src/pv/transfer.c:831
|
||||
#: src/pv/transfer.c:740
|
||||
msgid "line position buffer allocation failed"
|
||||
msgstr "Zuweisung des Zeilenpuffers fehlgeschlagen"
|
||||
|
||||
#: src/pv/transfer.c:872
|
||||
msgid "write failed"
|
||||
msgstr "write-Aufruf fehlgeschlagen"
|
||||
|
||||
#: src/pv/transfer.c:1068
|
||||
#: src/pv/transfer.c:1109
|
||||
msgid "select call failed"
|
||||
msgstr "select-Aufruf fehlgeschlagen"
|
||||
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:121 src/pv/watchpid.c:130
|
||||
#: src/pv/watchpid.c:184 src/pv/watchpid.c:193 src/pv/watchpid.c:204
|
||||
msgid "fd"
|
||||
msgstr ""
|
||||
msgstr "fd"
|
||||
|
||||
#: src/pv/watchpid.c:130 src/pv/watchpid.c:204
|
||||
msgid "not a regular file or block device"
|
||||
msgstr "keine normale Datei oder Blockgerät"
|
||||
msgstr "ist weder eine normale Datei noch ein Blockgerät"
|
||||
|
||||
@@ -0,0 +1,527 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: pv@ivarch.com\n"
|
||||
"POT-Creation-Date: 2024-10-15 22:01+0100\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/main/help.c:284
|
||||
msgid "show progress bar"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:287
|
||||
msgid "show elapsed time"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:290
|
||||
msgid "show estimated time of arrival (completion)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:293
|
||||
msgid "show absolute estimated time of arrival (completion)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:296
|
||||
msgid "show data transfer rate counter"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:299
|
||||
msgid "show data transfer average rate counter"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:301 src/main/help.c:335 src/main/help.c:350
|
||||
msgid "SEC"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:302
|
||||
msgid "compute average rate over past SEC seconds (default 30s)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:305
|
||||
msgid "show number of bytes transferred"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:308
|
||||
msgid "show number of bits transferred"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:311
|
||||
msgid "treat suffixes as multiples of 1000 rather than 1024"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:314
|
||||
msgid "show percentage of transfer buffer in use"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:316
|
||||
msgid "NUM"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:317
|
||||
msgid "show NUM bytes last written"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:319
|
||||
msgid "FORMAT"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:320
|
||||
msgid "set output format to FORMAT"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:323
|
||||
msgid "output transfer statistics at the end"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:326
|
||||
msgid "output percentages, not visual information"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:329
|
||||
msgid "do not output any transfer information at all"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:333
|
||||
msgid "display nothing until first byte transferred"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:336
|
||||
msgid "display nothing until SEC seconds have passed"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:338
|
||||
msgid "SIZE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:339
|
||||
msgid "set estimated data size to SIZE bytes"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:342
|
||||
msgid "if size unknown, show rate vs max rate"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:345
|
||||
msgid "count lines instead of bytes"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:348
|
||||
msgid "lines are null-terminated"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:351
|
||||
msgid "update every SEC seconds"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:353
|
||||
msgid "WIDTH"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:354
|
||||
msgid "assume terminal is WIDTH characters wide"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:356
|
||||
msgid "HEIGHT"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:357
|
||||
msgid "assume terminal is HEIGHT rows high"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:359
|
||||
msgid "NAME"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:360
|
||||
msgid "prefix visual information with NAME"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:363
|
||||
msgid "output even if standard error is not a terminal"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:366
|
||||
msgid "use cursor positioning escape sequences"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:369 src/main/help.c:399 src/main/help.c:408
|
||||
#: src/main/help.c:423
|
||||
msgid "FILE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:370
|
||||
msgid "write output to FILE instead of stdout"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:372
|
||||
msgid "RATE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:373
|
||||
msgid "limit transfer to RATE bytes per second"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:375 src/main/help.c:384
|
||||
msgid "BYTES"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:376
|
||||
msgid "use a buffer size of BYTES"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:379
|
||||
msgid "never use splice(), always use read/write"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:382
|
||||
msgid "skip read errors in input"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:385
|
||||
msgid "skip errors in BYTES blocks at a time"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:388
|
||||
msgid "stop after --size bytes have been transferred"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:391
|
||||
msgid "flush cache to disk after every write"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:394
|
||||
msgid "use direct I/O to bypass cache"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:397
|
||||
msgid "discard input instead of writing to output"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:400
|
||||
msgid "write all input to FILE before writing to output"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:403
|
||||
msgid "PID"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:404
|
||||
msgid "update settings of process PID"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:409
|
||||
msgid "save process ID in FILE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:412
|
||||
msgid "PID[:FD]"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:413
|
||||
msgid "watch file FD opened by process PID"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:417
|
||||
msgid "show this help and exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:420
|
||||
msgid "show version information and exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:424
|
||||
msgid "write debug logs to FILE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:449
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION] [FILE]..."
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:460
|
||||
msgid ""
|
||||
"Concatenate FILE(s), or standard input, to standard output, with monitoring."
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:597
|
||||
#, c-format
|
||||
msgid "Please report any bugs to: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/main.c:214
|
||||
msgid "(input)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/main.c:299
|
||||
msgid "state allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:140 src/pv/file.c:324
|
||||
msgid "failed to stat file"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:154
|
||||
msgid "is a directory"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:183
|
||||
msgid "failed to generate sysfs filename"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:205
|
||||
msgid "failed to read sysfs size file"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:225
|
||||
msgid "failed to open block device"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:235
|
||||
msgid "failed to determine size of block device"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:339
|
||||
msgid "option structure allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:358
|
||||
msgid "option structure argv allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:420
|
||||
msgid "integer argument expected"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:431
|
||||
msgid "numeric argument expected"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:442
|
||||
msgid "process ID or pid:fd pair expected"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:449
|
||||
msgid "invalid process ID"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:666
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:668
|
||||
#, c-format
|
||||
msgid "Try `%s -h' for more information."
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:699
|
||||
msgid ""
|
||||
"cannot use line mode or transfer modifier options when watching file "
|
||||
"descriptors"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:708
|
||||
msgid "cannot use cursor positioning when watching file descriptors"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:717
|
||||
msgid "cannot use remote control when watching file descriptors"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:726
|
||||
msgid "cannot transfer files when watching file descriptors"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:741
|
||||
msgid "not available on systems without /proc/self/fdinfo"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/remote.c:302
|
||||
msgid "message not received"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/remote.c:429
|
||||
msgid "SA_SIGINFO not supported on this system"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/version.c:28
|
||||
msgid "License: GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.html>"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/version.c:29
|
||||
msgid "This is free software: you are free to change and redistribute it."
|
||||
msgstr ""
|
||||
|
||||
#: src/main/version.c:30
|
||||
msgid "There is NO WARRANTY, to the extent permitted by law."
|
||||
msgstr ""
|
||||
|
||||
#: src/main/version.c:32
|
||||
msgid "Project web site"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/cursor.c:61
|
||||
msgid "failed to get terminal name"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/cursor.c:106
|
||||
msgid "failed to open lock file"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/cursor.c:139
|
||||
msgid "lock attempt failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/cursor.c:400
|
||||
msgid "failed to open terminal"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:233
|
||||
msgid "yzafpnum kMGTPEZY"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:251
|
||||
msgid "yzafpnum KMGTPEZY"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:678 src/pv/transfer.c:1011
|
||||
msgid "buffer allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:807
|
||||
msgid "b"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:810 src/pv/transfer.c:602
|
||||
msgid "B"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:854 src/pv/display.c:869 src/pv/display.c:1088
|
||||
#: src/pv/loop.c:549
|
||||
msgid "b/s"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
msgid "/s"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
#: src/pv/loop.c:549
|
||||
msgid "B/s"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:901 src/pv/display.c:905
|
||||
msgid "ETA"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:971
|
||||
msgid "FIN"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/file.c:149
|
||||
msgid "failed to seek to start of output"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/file.c:294
|
||||
msgid "failed to close file"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/file.c:317
|
||||
msgid "failed to read file"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/file.c:332
|
||||
msgid "failed to stat output file"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/file.c:354
|
||||
msgid "input file is output file"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/file.c:412
|
||||
msgid "(none)"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/file.c:414
|
||||
msgid "(stdin)"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/loop.c:548
|
||||
msgid "rate min/avg/max/mdev"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/loop.c:560
|
||||
msgid "rate not measured"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/loop.c:766 src/pv/loop.c:817 src/pv/loop.c:858 src/pv/watchpid.c:99
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:120 src/pv/watchpid.c:128
|
||||
#: src/pv/watchpid.c:165 src/pv/watchpid.c:184 src/pv/watchpid.c:192
|
||||
#: src/pv/watchpid.c:202 src/pv/watchpid.c:293 src/pv/watchpid.c:301
|
||||
#: src/pv/watchpid.c:377 src/pv/watchpid.c:398
|
||||
msgid "pid"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/state.c:40
|
||||
msgid "history structure allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/state.c:509 src/pv/state.c:520
|
||||
msgid "file list allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:464
|
||||
msgid "read failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:487
|
||||
msgid "warning: read errors detected"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:503
|
||||
msgid "file is not seekable"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:581
|
||||
msgid "failed to seek past error"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:601
|
||||
msgid "skipped past read error"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:642
|
||||
msgid "no transfer buffer allocated"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:684
|
||||
msgid "failed to set interval timer"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:710
|
||||
msgid "failed to clear interval timer"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:740
|
||||
msgid "line position buffer allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:872
|
||||
msgid "write failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:1109
|
||||
msgid "select call failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:121 src/pv/watchpid.c:130
|
||||
#: src/pv/watchpid.c:184 src/pv/watchpid.c:193 src/pv/watchpid.c:204
|
||||
msgid "fd"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/watchpid.c:130 src/pv/watchpid.c:204
|
||||
msgid "not a regular file or block device"
|
||||
msgstr ""
|
||||
@@ -1,9 +1,15 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: pv@ivarch.com\n"
|
||||
"POT-Creation-Date: 2024-08-18 22:01+0100\n"
|
||||
"POT-Creation-Date: 2024-10-15 22:01+0100\n"
|
||||
"PO-Revision-Date: 2024-10-12 11:13+0000\n"
|
||||
"Last-Translator: a-j-wood <a-j-wood@users.noreply.translate.codeberg.org>\n"
|
||||
"Language-Team: French <https://translate.codeberg.org/projects/pv/pv/fr/>\n"
|
||||
"Language: fr\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 5.7.2\n"
|
||||
"Date: 1999-06-01 15:18:29+0100\n"
|
||||
"From: Andrew Wood <ivarch@ubik>\n"
|
||||
"Xgettext-Options: --default-domain=pkgbuild --directory=./.pkgdir --add-"
|
||||
@@ -44,7 +50,7 @@ msgstr "afficher le taux de tranfert des données"
|
||||
msgid "show data transfer average rate counter"
|
||||
msgstr "afficher le compteur de taux moyen de transfert de données"
|
||||
|
||||
#: src/main/help.c:301 src/main/help.c:332 src/main/help.c:344
|
||||
#: src/main/help.c:301 src/main/help.c:335 src/main/help.c:350
|
||||
msgid "SEC"
|
||||
msgstr "SEC"
|
||||
|
||||
@@ -63,7 +69,7 @@ msgstr "afficher le nombre de bits transférés"
|
||||
|
||||
#: src/main/help.c:311
|
||||
msgid "treat suffixes as multiples of 1000 rather than 1024"
|
||||
msgstr ""
|
||||
msgstr "traiter les suffixes comme des multiples de 1000 au lieu de 1024"
|
||||
|
||||
#: src/main/help.c:314
|
||||
msgid "show percentage of transfer buffer in use"
|
||||
@@ -86,238 +92,257 @@ msgid "set output format to FORMAT"
|
||||
msgstr "définir le format de sortie sur FORMAT"
|
||||
|
||||
#: src/main/help.c:323
|
||||
msgid "output transfer statistics at the end"
|
||||
msgstr "afficher les statistiques de transfert à la fin"
|
||||
|
||||
#: src/main/help.c:326
|
||||
msgid "output percentages, not visual information"
|
||||
msgstr "imprimer en pourcentage plutôt que des informations visuelles"
|
||||
|
||||
#: src/main/help.c:326
|
||||
#: src/main/help.c:329
|
||||
msgid "do not output any transfer information at all"
|
||||
msgstr "n'afficher aucune information de transfert"
|
||||
|
||||
#: src/main/help.c:330
|
||||
#: src/main/help.c:333
|
||||
msgid "display nothing until first byte transferred"
|
||||
msgstr "ne rien afficher avant qu'au moins un octet soit tranféré"
|
||||
|
||||
#: src/main/help.c:333
|
||||
#: src/main/help.c:336
|
||||
msgid "display nothing until SEC seconds have passed"
|
||||
msgstr "ne rien afficher jusqu'à ce que SEC secondes se soient écoulées"
|
||||
|
||||
#: src/main/help.c:335
|
||||
#: src/main/help.c:338
|
||||
msgid "SIZE"
|
||||
msgstr "TAILLE"
|
||||
|
||||
#: src/main/help.c:336
|
||||
#: src/main/help.c:339
|
||||
msgid "set estimated data size to SIZE bytes"
|
||||
msgstr "ajuster la taille estimée des données à TAILLE octets"
|
||||
|
||||
#: src/main/help.c:339
|
||||
#: src/main/help.c:342
|
||||
msgid "if size unknown, show rate vs max rate"
|
||||
msgstr ""
|
||||
"si la taille est inconnue, afficher le taux de transfert par rapport au taux "
|
||||
"de transfert max"
|
||||
|
||||
#: src/main/help.c:345
|
||||
msgid "count lines instead of bytes"
|
||||
msgstr "compter les lignes au lieu des octets"
|
||||
|
||||
#: src/main/help.c:342
|
||||
#: src/main/help.c:348
|
||||
msgid "lines are null-terminated"
|
||||
msgstr "les lignes sont terminées par un caractère nul"
|
||||
|
||||
#: src/main/help.c:345
|
||||
#: src/main/help.c:351
|
||||
msgid "update every SEC seconds"
|
||||
msgstr "mettre à jour toutes les SEC secondes"
|
||||
|
||||
#: src/main/help.c:347
|
||||
#: src/main/help.c:353
|
||||
msgid "WIDTH"
|
||||
msgstr "LARGEUR"
|
||||
|
||||
#: src/main/help.c:348
|
||||
#: src/main/help.c:354
|
||||
msgid "assume terminal is WIDTH characters wide"
|
||||
msgstr "présumer la largeur du terminal à LARGEUR caractères"
|
||||
|
||||
#: src/main/help.c:350
|
||||
#: src/main/help.c:356
|
||||
msgid "HEIGHT"
|
||||
msgstr "HAUTEUR"
|
||||
|
||||
#: src/main/help.c:351
|
||||
#: src/main/help.c:357
|
||||
msgid "assume terminal is HEIGHT rows high"
|
||||
msgstr "présumer la hauteur du terminal à HAUTEUR lignes"
|
||||
|
||||
#: src/main/help.c:353
|
||||
#: src/main/help.c:359
|
||||
msgid "NAME"
|
||||
msgstr "NOM"
|
||||
|
||||
#: src/main/help.c:354
|
||||
#: src/main/help.c:360
|
||||
msgid "prefix visual information with NAME"
|
||||
msgstr "préfixer les informations visuelles avec NOM"
|
||||
|
||||
#: src/main/help.c:357
|
||||
#: src/main/help.c:363
|
||||
msgid "output even if standard error is not a terminal"
|
||||
msgstr ""
|
||||
"imprimer vers la sortie d'erreur standard même si ce n'est pas un terminal"
|
||||
|
||||
#: src/main/help.c:360
|
||||
#: src/main/help.c:366
|
||||
msgid "use cursor positioning escape sequences"
|
||||
msgstr "utiliser les séquences d'échappements de positionnement de curseur"
|
||||
|
||||
#: src/main/help.c:363 src/main/help.c:399 src/main/help.c:414
|
||||
#: src/main/help.c:369 src/main/help.c:399 src/main/help.c:408
|
||||
#: src/main/help.c:423
|
||||
msgid "FILE"
|
||||
msgstr "FICHIER"
|
||||
|
||||
#: src/main/help.c:364
|
||||
#: src/main/help.c:370
|
||||
msgid "write output to FILE instead of stdout"
|
||||
msgstr ""
|
||||
msgstr "écrire la sortie dans FICHIER au lieu de la sortie standard"
|
||||
|
||||
#: src/main/help.c:366
|
||||
#: src/main/help.c:372
|
||||
msgid "RATE"
|
||||
msgstr "TAUX"
|
||||
|
||||
#: src/main/help.c:367
|
||||
#: src/main/help.c:373
|
||||
msgid "limit transfer to RATE bytes per second"
|
||||
msgstr "limite le taux de transfert à TAUX octets par seconde"
|
||||
|
||||
#: src/main/help.c:369 src/main/help.c:378
|
||||
#: src/main/help.c:375 src/main/help.c:384
|
||||
msgid "BYTES"
|
||||
msgstr "OCTETS"
|
||||
|
||||
#: src/main/help.c:370
|
||||
#: src/main/help.c:376
|
||||
msgid "use a buffer size of BYTES"
|
||||
msgstr "Utiliser une mémoire tampon de OCTETS octets"
|
||||
|
||||
#: src/main/help.c:373
|
||||
#: src/main/help.c:379
|
||||
msgid "never use splice(), always use read/write"
|
||||
msgstr "ne jamais utiliser splice(), toujours utiliser read/write"
|
||||
|
||||
#: src/main/help.c:376
|
||||
#: src/main/help.c:382
|
||||
msgid "skip read errors in input"
|
||||
msgstr "ignorer les erreurs de lecture dans l'entrée"
|
||||
|
||||
#: src/main/help.c:379
|
||||
#: src/main/help.c:385
|
||||
msgid "skip errors in BYTES blocks at a time"
|
||||
msgstr "ignorer les erreurs dans OCTETS blocs à la fois"
|
||||
|
||||
#: src/main/help.c:382
|
||||
#: src/main/help.c:388
|
||||
msgid "stop after --size bytes have been transferred"
|
||||
msgstr "arrêter après le transfert de --size octets"
|
||||
|
||||
#: src/main/help.c:385
|
||||
#: src/main/help.c:391
|
||||
msgid "flush cache to disk after every write"
|
||||
msgstr "vider le cache sur le disque après chaque écriture"
|
||||
|
||||
#: src/main/help.c:388
|
||||
#: src/main/help.c:394
|
||||
msgid "use direct I/O to bypass cache"
|
||||
msgstr "utiliser les E/S directes pour contourner le cache"
|
||||
|
||||
#: src/main/help.c:391
|
||||
#: src/main/help.c:397
|
||||
msgid "discard input instead of writing to output"
|
||||
msgstr "rejeter l'entrée au lieu de l'écrire vers la sortie"
|
||||
|
||||
#: src/main/help.c:394
|
||||
#: src/main/help.c:400
|
||||
msgid "write all input to FILE before writing to output"
|
||||
msgstr "écrire toute l'entrée vers FICHIER avant de l'écrire vers la sortie"
|
||||
|
||||
#: src/main/help.c:403
|
||||
msgid "PID"
|
||||
msgstr "PID"
|
||||
|
||||
#: src/main/help.c:395
|
||||
#: src/main/help.c:404
|
||||
msgid "update settings of process PID"
|
||||
msgstr "mettre à jour la configuration du processus PID"
|
||||
|
||||
#: src/main/help.c:400
|
||||
#: src/main/help.c:409
|
||||
msgid "save process ID in FILE"
|
||||
msgstr "enregistrer l'ID de processus dans FICHIER"
|
||||
|
||||
#: src/main/help.c:403
|
||||
#: src/main/help.c:412
|
||||
msgid "PID[:FD]"
|
||||
msgstr "PID[:FD]"
|
||||
|
||||
#: src/main/help.c:404
|
||||
#: src/main/help.c:413
|
||||
msgid "watch file FD opened by process PID"
|
||||
msgstr "surveiller le fichier FD ouvert par le processus PID"
|
||||
|
||||
#: src/main/help.c:408
|
||||
#: src/main/help.c:417
|
||||
msgid "show this help and exit"
|
||||
msgstr "afficher cette aide puis quitter"
|
||||
|
||||
#: src/main/help.c:411
|
||||
#: src/main/help.c:420
|
||||
msgid "show version information and exit"
|
||||
msgstr "afficher la version puis quitter"
|
||||
|
||||
#: src/main/help.c:415
|
||||
#: src/main/help.c:424
|
||||
msgid "write debug logs to FILE"
|
||||
msgstr "écrire les journaux de déboggage vers FICHIER"
|
||||
|
||||
#: src/main/help.c:440
|
||||
#: src/main/help.c:449
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION] [FILE]..."
|
||||
msgstr "Utilisation : %s [OPTIONS] [FICHIER]..."
|
||||
|
||||
#: src/main/help.c:451
|
||||
#: src/main/help.c:460
|
||||
msgid ""
|
||||
"Concatenate FILE(s), or standard input, to standard output, with monitoring."
|
||||
msgstr ""
|
||||
"Concaténer FICHIER(s), ou l'entrée standard, sur la sortie standard avec "
|
||||
"monitorage."
|
||||
|
||||
#: src/main/help.c:588
|
||||
#: src/main/help.c:597
|
||||
#, c-format
|
||||
msgid "Please report any bugs to: %s"
|
||||
msgstr "SVP rapporter tous bogues à %s"
|
||||
|
||||
#: src/main/main.c:71
|
||||
#: src/main/main.c:214
|
||||
msgid "(input)"
|
||||
msgstr "(entrée)"
|
||||
|
||||
#: src/main/main.c:299
|
||||
msgid "state allocation failed"
|
||||
msgstr "échec de l'allocation de mémoire de condition"
|
||||
|
||||
#: src/main/options.c:138 src/pv/file.c:324
|
||||
#: src/main/options.c:140 src/pv/file.c:324
|
||||
msgid "failed to stat file"
|
||||
msgstr "échec à statuer sur le fichier"
|
||||
|
||||
#: src/main/options.c:152
|
||||
#: src/main/options.c:154
|
||||
msgid "is a directory"
|
||||
msgstr ""
|
||||
msgstr "est un répertoire"
|
||||
|
||||
#: src/main/options.c:181
|
||||
#: src/main/options.c:183
|
||||
msgid "failed to generate sysfs filename"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:203
|
||||
#: src/main/options.c:205
|
||||
msgid "failed to read sysfs size file"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:223
|
||||
#: src/main/options.c:225
|
||||
msgid "failed to open block device"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:233
|
||||
#: src/main/options.c:235
|
||||
msgid "failed to determine size of block device"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:334
|
||||
#: src/main/options.c:339
|
||||
msgid "option structure allocation failed"
|
||||
msgstr "l'allocation pour la structure d'une option a échoué"
|
||||
|
||||
#: src/main/options.c:353
|
||||
#: src/main/options.c:358
|
||||
msgid "option structure argv allocation failed"
|
||||
msgstr "l'allocation pour la structure de l'option argv a échoué"
|
||||
|
||||
#: src/main/options.c:415
|
||||
#: src/main/options.c:420
|
||||
msgid "integer argument expected"
|
||||
msgstr "Valeur entière attendue"
|
||||
|
||||
#: src/main/options.c:426
|
||||
#: src/main/options.c:431
|
||||
msgid "numeric argument expected"
|
||||
msgstr "Valeur numérique attendue"
|
||||
|
||||
#: src/main/options.c:437
|
||||
#: src/main/options.c:442
|
||||
msgid "process ID or pid:fd pair expected"
|
||||
msgstr "ID de processus ou paire pid:fd attendue"
|
||||
|
||||
#: src/main/options.c:444
|
||||
#: src/main/options.c:449
|
||||
msgid "invalid process ID"
|
||||
msgstr "ID de processus non valide"
|
||||
|
||||
#: src/main/options.c:647
|
||||
#: src/main/options.c:666
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Essayez `%s --help' pour plus d'informations."
|
||||
|
||||
#: src/main/options.c:649
|
||||
#: src/main/options.c:668
|
||||
#, c-format
|
||||
msgid "Try `%s -h' for more information."
|
||||
msgstr "Essayez `%s -h' pour plus d'informations."
|
||||
|
||||
#: src/main/options.c:680
|
||||
#: src/main/options.c:699
|
||||
msgid ""
|
||||
"cannot use line mode or transfer modifier options when watching file "
|
||||
"descriptors"
|
||||
@@ -325,25 +350,25 @@ msgstr ""
|
||||
"impossible d'utiliser le mode ligne ou les options de modificateur de "
|
||||
"transfert lors de la visualisation des descripteurs de fichiers"
|
||||
|
||||
#: src/main/options.c:689
|
||||
#: src/main/options.c:708
|
||||
msgid "cannot use cursor positioning when watching file descriptors"
|
||||
msgstr ""
|
||||
"impossible d'utiliser le positionnement du curseur lors de la visualisation "
|
||||
"des descripteurs de fichier"
|
||||
|
||||
#: src/main/options.c:698
|
||||
#: src/main/options.c:717
|
||||
msgid "cannot use remote control when watching file descriptors"
|
||||
msgstr ""
|
||||
"impossible d'utiliser la télécommande lors de la visualisation des "
|
||||
"descripteurs de fichiers"
|
||||
|
||||
#: src/main/options.c:707
|
||||
#: src/main/options.c:726
|
||||
msgid "cannot transfer files when watching file descriptors"
|
||||
msgstr ""
|
||||
"impossible de transférer des fichiers lorsque vous regardez des descripteurs "
|
||||
"de fichiers"
|
||||
|
||||
#: src/main/options.c:722
|
||||
#: src/main/options.c:741
|
||||
msgid "not available on systems without /proc/self/fdinfo"
|
||||
msgstr "non disponible sur les systèmes sans /proc/self/fdinfo"
|
||||
|
||||
@@ -373,58 +398,64 @@ msgstr "Il n'y a AUCUNE GARANTIE, dans la mesure permise par la loi."
|
||||
msgid "Project web site"
|
||||
msgstr "Site web du projet"
|
||||
|
||||
#: src/pv/cursor.c:87
|
||||
#: src/pv/cursor.c:61
|
||||
msgid "failed to get terminal name"
|
||||
msgstr "échec de lecture du nom du terminal"
|
||||
|
||||
#: src/pv/cursor.c:132
|
||||
#: src/pv/cursor.c:106
|
||||
msgid "failed to open lock file"
|
||||
msgstr "échec de l'ouverture du fichier de verrouillage"
|
||||
|
||||
#: src/pv/cursor.c:165
|
||||
#: src/pv/cursor.c:139
|
||||
msgid "lock attempt failed"
|
||||
msgstr "échec de la tentative de verrouillage"
|
||||
|
||||
#: src/pv/cursor.c:426
|
||||
#: src/pv/cursor.c:400
|
||||
msgid "failed to open terminal"
|
||||
msgstr "échec de l'ouverture du terminal"
|
||||
|
||||
#: src/pv/display.c:193
|
||||
#: src/pv/display.c:233
|
||||
msgid "yzafpnum kMGTPEZY"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:211
|
||||
#: src/pv/display.c:251
|
||||
msgid "yzafpnum KMGTPEZY"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:750 src/pv/transfer.c:970
|
||||
#: src/pv/display.c:678 src/pv/transfer.c:1011
|
||||
msgid "buffer allocation failed"
|
||||
msgstr "échec de l'allocation de mémoire tampon"
|
||||
|
||||
#: src/pv/display.c:856
|
||||
#: src/pv/display.c:807
|
||||
msgid "b"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:859 src/pv/transfer.c:602
|
||||
#: src/pv/display.c:810 src/pv/transfer.c:602
|
||||
msgid "B"
|
||||
msgstr "O"
|
||||
|
||||
#: src/pv/display.c:900 src/pv/display.c:916
|
||||
#: src/pv/display.c:854 src/pv/display.c:869 src/pv/display.c:1088
|
||||
#: src/pv/loop.c:549
|
||||
msgid "b/s"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:905 src/pv/display.c:920
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
msgid "/s"
|
||||
msgstr "/s"
|
||||
|
||||
#: src/pv/display.c:905 src/pv/display.c:920
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
#: src/pv/loop.c:549
|
||||
msgid "B/s"
|
||||
msgstr "O/s"
|
||||
|
||||
#: src/pv/display.c:947 src/pv/display.c:951 src/pv/display.c:1017
|
||||
#: src/pv/display.c:901 src/pv/display.c:905
|
||||
msgid "ETA"
|
||||
msgstr "ETA"
|
||||
|
||||
#: src/pv/display.c:971
|
||||
msgid "FIN"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/file.c:149
|
||||
msgid "failed to seek to start of output"
|
||||
msgstr "ne peut pas passer au début de la sortie"
|
||||
@@ -453,7 +484,15 @@ msgstr "(aucun)"
|
||||
msgid "(stdin)"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/loop.c:575 src/pv/loop.c:626 src/pv/loop.c:667 src/pv/watchpid.c:99
|
||||
#: src/pv/loop.c:548
|
||||
msgid "rate min/avg/max/mdev"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/loop.c:560
|
||||
msgid "rate not measured"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/loop.c:766 src/pv/loop.c:817 src/pv/loop.c:858 src/pv/watchpid.c:99
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:120 src/pv/watchpid.c:128
|
||||
#: src/pv/watchpid.c:165 src/pv/watchpid.c:184 src/pv/watchpid.c:192
|
||||
#: src/pv/watchpid.c:202 src/pv/watchpid.c:293 src/pv/watchpid.c:301
|
||||
@@ -465,7 +504,7 @@ msgstr ""
|
||||
msgid "history structure allocation failed"
|
||||
msgstr "l'allocation de la structure de l'historique a échoué"
|
||||
|
||||
#: src/pv/state.c:444 src/pv/state.c:455
|
||||
#: src/pv/state.c:509 src/pv/state.c:520
|
||||
msgid "file list allocation failed"
|
||||
msgstr "échec de l'allocation de la liste de fichiers"
|
||||
|
||||
@@ -489,23 +528,27 @@ msgstr "n'a pas réussi à dépasser l'erreur"
|
||||
msgid "skipped past read error"
|
||||
msgstr "erreur de lecture dépassée"
|
||||
|
||||
#: src/pv/transfer.c:641
|
||||
#: src/pv/transfer.c:642
|
||||
msgid "no transfer buffer allocated"
|
||||
msgstr "aucun tampon de transfert alloué"
|
||||
|
||||
#: src/pv/transfer.c:682
|
||||
#: src/pv/transfer.c:684
|
||||
msgid "failed to set interval timer"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:707
|
||||
#: src/pv/transfer.c:710
|
||||
msgid "failed to clear interval timer"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:831
|
||||
#: src/pv/transfer.c:740
|
||||
msgid "line position buffer allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:872
|
||||
msgid "write failed"
|
||||
msgstr "l'écriture a échoué"
|
||||
|
||||
#: src/pv/transfer.c:1068
|
||||
#: src/pv/transfer.c:1109
|
||||
msgid "select call failed"
|
||||
msgstr "l'appel de sélection a échoué"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: pv@ivarch.com\n"
|
||||
"POT-Creation-Date: 2024-08-18 22:01+0100\n"
|
||||
"POT-Creation-Date: 2024-10-15 22:01+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -29,7 +29,7 @@ msgstr "pokaż szacowany czas ukończenia"
|
||||
|
||||
#: src/main/help.c:293
|
||||
msgid "show absolute estimated time of arrival (completion)"
|
||||
msgstr ""
|
||||
msgstr "pokaż bezwzględny szacowany czas ukończenia"
|
||||
|
||||
#: src/main/help.c:296
|
||||
msgid "show data transfer rate counter"
|
||||
@@ -37,15 +37,16 @@ msgstr "pokaż licznik prędkości przesyłania"
|
||||
|
||||
#: src/main/help.c:299
|
||||
msgid "show data transfer average rate counter"
|
||||
msgstr ""
|
||||
msgstr "pokaż licznik uśrednionej prędkości przesyłania"
|
||||
|
||||
#: src/main/help.c:301 src/main/help.c:332 src/main/help.c:344
|
||||
#: src/main/help.c:301 src/main/help.c:335 src/main/help.c:350
|
||||
msgid "SEC"
|
||||
msgstr "WARTOŚĆ"
|
||||
msgstr "SEKUNDY"
|
||||
|
||||
#: src/main/help.c:302
|
||||
msgid "compute average rate over past SEC seconds (default 30s)"
|
||||
msgstr ""
|
||||
"oblicz średnią prędkość transferu na podstawie poprzednich SEKUNDY sekund"
|
||||
|
||||
#: src/main/help.c:305
|
||||
msgid "show number of bytes transferred"
|
||||
@@ -53,365 +54,398 @@ msgstr "pokaż ilość przesłanych bajtów"
|
||||
|
||||
#: src/main/help.c:308
|
||||
msgid "show number of bits transferred"
|
||||
msgstr ""
|
||||
msgstr "pokaż ilość przesłanych bitów"
|
||||
|
||||
#: src/main/help.c:311
|
||||
msgid "treat suffixes as multiples of 1000 rather than 1024"
|
||||
msgstr ""
|
||||
msgstr "traktuj przyrostki jako wielokrotności 1000 zamiast 1024"
|
||||
|
||||
#: src/main/help.c:314
|
||||
msgid "show percentage of transfer buffer in use"
|
||||
msgstr ""
|
||||
msgstr "pokaż procentowe użycie bufora transferu"
|
||||
|
||||
#: src/main/help.c:316
|
||||
msgid "NUM"
|
||||
msgstr ""
|
||||
msgstr "LICZBA"
|
||||
|
||||
#: src/main/help.c:317
|
||||
msgid "show NUM bytes last written"
|
||||
msgstr ""
|
||||
msgstr "pokaż ostatnie LICZBA przesłanych bajtów"
|
||||
|
||||
#: src/main/help.c:319
|
||||
msgid "FORMAT"
|
||||
msgstr ""
|
||||
msgstr "FORMAT"
|
||||
|
||||
#: src/main/help.c:320
|
||||
msgid "set output format to FORMAT"
|
||||
msgstr ""
|
||||
msgstr "ustaw FORMAT jako format wyjściowy"
|
||||
|
||||
#: src/main/help.c:323
|
||||
msgid "output percentages, not visual information"
|
||||
msgstr "wświetl wyjście procentowo, bez graficznej prezentacji"
|
||||
msgid "output transfer statistics at the end"
|
||||
msgstr "wyświetl na końcu statystyki transferu"
|
||||
|
||||
#: src/main/help.c:326
|
||||
msgid "output percentages, not visual information"
|
||||
msgstr "wyświetl wyjście procentowo, bez graficznej prezentacji"
|
||||
|
||||
#: src/main/help.c:329
|
||||
msgid "do not output any transfer information at all"
|
||||
msgstr "nie wyświetlaj żadnych informacji o przesyłaniu"
|
||||
|
||||
#: src/main/help.c:330
|
||||
#: src/main/help.c:333
|
||||
msgid "display nothing until first byte transferred"
|
||||
msgstr "nie wyświetlaj nic aż do pierwszego przesłanego bajtu"
|
||||
|
||||
#: src/main/help.c:333
|
||||
msgid "display nothing until SEC seconds have passed"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:335
|
||||
msgid "SIZE"
|
||||
msgstr "WARTOŚĆ"
|
||||
|
||||
#: src/main/help.c:336
|
||||
msgid "set estimated data size to SIZE bytes"
|
||||
msgstr "ustaw oczekiwany rozmiar danych na WARTOŚĆ bajtów"
|
||||
msgid "display nothing until SEC seconds have passed"
|
||||
msgstr "nie wyświetlaj nic do momentu upłynięcia SEKUNDY sekund"
|
||||
|
||||
#: src/main/help.c:338
|
||||
msgid "SIZE"
|
||||
msgstr "ROZMIAR"
|
||||
|
||||
#: src/main/help.c:339
|
||||
msgid "count lines instead of bytes"
|
||||
msgstr ""
|
||||
msgid "set estimated data size to SIZE bytes"
|
||||
msgstr "ustaw oczekiwany rozmiar danych na ROZMIAR bajtów"
|
||||
|
||||
#: src/main/help.c:342
|
||||
msgid "lines are null-terminated"
|
||||
msgid "if size unknown, show rate vs max rate"
|
||||
msgstr ""
|
||||
"jeśli rozmiar nie jest znany, wyświetl zestawienie prędkości do maksymalnej "
|
||||
"prędkości"
|
||||
|
||||
#: src/main/help.c:345
|
||||
msgid "update every SEC seconds"
|
||||
msgstr "aktualizuj co każde WARTOŚĆ sekund"
|
||||
|
||||
#: src/main/help.c:347
|
||||
msgid "WIDTH"
|
||||
msgstr "WARTOŚĆ"
|
||||
msgid "count lines instead of bytes"
|
||||
msgstr "zliczaj linie zamiast bajty"
|
||||
|
||||
#: src/main/help.c:348
|
||||
msgid "assume terminal is WIDTH characters wide"
|
||||
msgstr "przyjmij, że terminal ma szerokość WARTOŚĆ znaków"
|
||||
|
||||
#: src/main/help.c:350
|
||||
msgid "HEIGHT"
|
||||
msgstr ""
|
||||
msgid "lines are null-terminated"
|
||||
msgstr "linie są zakończone znakiem NUL"
|
||||
|
||||
#: src/main/help.c:351
|
||||
msgid "assume terminal is HEIGHT rows high"
|
||||
msgstr "przyjmij, że terminal ma szerokość WARTOŚĆ znaków"
|
||||
msgid "update every SEC seconds"
|
||||
msgstr "aktualizuj co każde SEKUNDY sekund"
|
||||
|
||||
#: src/main/help.c:353
|
||||
msgid "WIDTH"
|
||||
msgstr "SZEROKOŚĆ"
|
||||
|
||||
#: src/main/help.c:354
|
||||
msgid "assume terminal is WIDTH characters wide"
|
||||
msgstr "przyjmij, że terminal ma szerokość SZEROKOŚĆ znaków"
|
||||
|
||||
#: src/main/help.c:356
|
||||
msgid "HEIGHT"
|
||||
msgstr "WYSOKOŚĆ"
|
||||
|
||||
#: src/main/help.c:357
|
||||
msgid "assume terminal is HEIGHT rows high"
|
||||
msgstr "przyjmij, że terminal ma wysokość WYSOKOŚĆ linii"
|
||||
|
||||
#: src/main/help.c:359
|
||||
msgid "NAME"
|
||||
msgstr "NAZWA"
|
||||
|
||||
#: src/main/help.c:354
|
||||
#: src/main/help.c:360
|
||||
msgid "prefix visual information with NAME"
|
||||
msgstr "poprzedź informacje prefiksem NAZWA"
|
||||
|
||||
#: src/main/help.c:357
|
||||
#: src/main/help.c:363
|
||||
msgid "output even if standard error is not a terminal"
|
||||
msgstr "pokaż wyjście nawet gdy błędy nie są typu terminal"
|
||||
|
||||
#: src/main/help.c:360
|
||||
msgid "use cursor positioning escape sequences"
|
||||
msgstr "używaj sekwencji escape do pozycjonowania"
|
||||
|
||||
#: src/main/help.c:363 src/main/help.c:399 src/main/help.c:414
|
||||
msgid "FILE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:364
|
||||
msgid "write output to FILE instead of stdout"
|
||||
msgstr ""
|
||||
msgstr "pokaż wyjście nawet standardowe wyjście błędu nie jest terminalem"
|
||||
|
||||
#: src/main/help.c:366
|
||||
msgid "RATE"
|
||||
msgstr ""
|
||||
msgid "use cursor positioning escape sequences"
|
||||
msgstr "używaj znaków ucieczki do pozycjonowania kursora"
|
||||
|
||||
#: src/main/help.c:367
|
||||
msgid "limit transfer to RATE bytes per second"
|
||||
msgstr "ogranicz przesyłane dane do RATE bajtów na sekundę"
|
||||
|
||||
#: src/main/help.c:369 src/main/help.c:378
|
||||
msgid "BYTES"
|
||||
msgstr ""
|
||||
#: src/main/help.c:369 src/main/help.c:399 src/main/help.c:408
|
||||
#: src/main/help.c:423
|
||||
msgid "FILE"
|
||||
msgstr "PLIK"
|
||||
|
||||
#: src/main/help.c:370
|
||||
msgid "use a buffer size of BYTES"
|
||||
msgstr ""
|
||||
msgid "write output to FILE instead of stdout"
|
||||
msgstr "zapisz wyjście do PLIK zamiast do wyjścia standardowego"
|
||||
|
||||
#: src/main/help.c:372
|
||||
msgid "RATE"
|
||||
msgstr "PRĘDKOŚĆ"
|
||||
|
||||
#: src/main/help.c:373
|
||||
msgid "never use splice(), always use read/write"
|
||||
msgstr ""
|
||||
msgid "limit transfer to RATE bytes per second"
|
||||
msgstr "ogranicz przesyłane dane do PRĘDKOŚĆ bajtów na sekundę"
|
||||
|
||||
#: src/main/help.c:375 src/main/help.c:384
|
||||
msgid "BYTES"
|
||||
msgstr "BAJTY"
|
||||
|
||||
#: src/main/help.c:376
|
||||
msgid "skip read errors in input"
|
||||
msgstr ""
|
||||
msgid "use a buffer size of BYTES"
|
||||
msgstr "użyj bufora o rozmiarze BAJTY"
|
||||
|
||||
#: src/main/help.c:379
|
||||
msgid "skip errors in BYTES blocks at a time"
|
||||
msgstr ""
|
||||
msgid "never use splice(), always use read/write"
|
||||
msgstr "nigdy nie używaj splice(), zawsze używaj read/write"
|
||||
|
||||
#: src/main/help.c:382
|
||||
msgid "stop after --size bytes have been transferred"
|
||||
msgstr ""
|
||||
msgid "skip read errors in input"
|
||||
msgstr "pomijaj błędy odczytu wejścia"
|
||||
|
||||
#: src/main/help.c:385
|
||||
msgid "flush cache to disk after every write"
|
||||
msgstr ""
|
||||
msgid "skip errors in BYTES blocks at a time"
|
||||
msgstr "pomijaj błędy w blokach po BAJTY bajtów na raz"
|
||||
|
||||
#: src/main/help.c:388
|
||||
msgid "use direct I/O to bypass cache"
|
||||
msgstr ""
|
||||
msgid "stop after --size bytes have been transferred"
|
||||
msgstr "zakończ po przesłaniu --size bajtów"
|
||||
|
||||
#: src/main/help.c:391
|
||||
msgid "discard input instead of writing to output"
|
||||
msgstr ""
|
||||
msgid "flush cache to disk after every write"
|
||||
msgstr "wymuś zapis pamięci podręcznej na dysk po każdym zapisie"
|
||||
|
||||
#: src/main/help.c:394
|
||||
msgid "PID"
|
||||
msgid "use direct I/O to bypass cache"
|
||||
msgstr ""
|
||||
"użyj bezpośredniego wejścia/wyjścia celem pominięcia pamięci podręcznej"
|
||||
|
||||
#: src/main/help.c:395
|
||||
msgid "update settings of process PID"
|
||||
msgstr ""
|
||||
#: src/main/help.c:397
|
||||
msgid "discard input instead of writing to output"
|
||||
msgstr "zignoruj dane wejściowe zamiast wyświetlić je na wyjściu standardowym"
|
||||
|
||||
#: src/main/help.c:400
|
||||
msgid "save process ID in FILE"
|
||||
msgid "write all input to FILE before writing to output"
|
||||
msgstr ""
|
||||
"zapisz wszystkie dane wejściowe do PLIK przed wyświetleniem ich na wyjściu"
|
||||
|
||||
#: src/main/help.c:403
|
||||
msgid "PID[:FD]"
|
||||
msgstr ""
|
||||
msgid "PID"
|
||||
msgstr "PID"
|
||||
|
||||
#: src/main/help.c:404
|
||||
msgid "watch file FD opened by process PID"
|
||||
msgstr ""
|
||||
msgid "update settings of process PID"
|
||||
msgstr "zaktualizuj ustawienia procesu PID"
|
||||
|
||||
#: src/main/help.c:408
|
||||
#: src/main/help.c:409
|
||||
msgid "save process ID in FILE"
|
||||
msgstr "zapisz ID procesu do PLIK"
|
||||
|
||||
#: src/main/help.c:412
|
||||
msgid "PID[:FD]"
|
||||
msgstr "PID[:FD]"
|
||||
|
||||
#: src/main/help.c:413
|
||||
msgid "watch file FD opened by process PID"
|
||||
msgstr "obserwuj plik FD otworzony przez proces PID"
|
||||
|
||||
#: src/main/help.c:417
|
||||
msgid "show this help and exit"
|
||||
msgstr "wyświetl te informacje z pomocą i wyjdź"
|
||||
|
||||
#: src/main/help.c:411
|
||||
#: src/main/help.c:420
|
||||
msgid "show version information and exit"
|
||||
msgstr "wyświetl informacje o wersji i wyjdź"
|
||||
|
||||
#: src/main/help.c:415
|
||||
#: src/main/help.c:424
|
||||
msgid "write debug logs to FILE"
|
||||
msgstr ""
|
||||
msgstr "zapisz logi debugujące do PLIK"
|
||||
|
||||
#: src/main/help.c:440
|
||||
#: src/main/help.c:449
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION] [FILE]..."
|
||||
msgstr "Sposób użycia: %s [OPCJA] [PLIK]..."
|
||||
|
||||
#: src/main/help.c:451
|
||||
#: src/main/help.c:460
|
||||
msgid ""
|
||||
"Concatenate FILE(s), or standard input, to standard output, with monitoring."
|
||||
msgstr ""
|
||||
"Łączenie PLIK(ów) lub wejścia standardowego, do wyjścia standardowego z "
|
||||
"monitoringiem."
|
||||
|
||||
#: src/main/help.c:588
|
||||
#: src/main/help.c:597
|
||||
#, c-format
|
||||
msgid "Please report any bugs to: %s"
|
||||
msgstr "Proszę przesyłać zgłoszenia błędów do %s"
|
||||
|
||||
#: src/main/main.c:71
|
||||
msgid "state allocation failed"
|
||||
msgstr ""
|
||||
#: src/main/main.c:214
|
||||
msgid "(input)"
|
||||
msgstr "(wejście)"
|
||||
|
||||
#: src/main/options.c:138 src/pv/file.c:324
|
||||
#: src/main/main.c:299
|
||||
msgid "state allocation failed"
|
||||
msgstr "alokacja stanu programu nie powiodła się"
|
||||
|
||||
#: src/main/options.c:140 src/pv/file.c:324
|
||||
msgid "failed to stat file"
|
||||
msgstr "nie udało się wykonać operacji stat na pliku"
|
||||
|
||||
#: src/main/options.c:152
|
||||
#: src/main/options.c:154
|
||||
msgid "is a directory"
|
||||
msgstr ""
|
||||
msgstr "jest katalogiem"
|
||||
|
||||
#: src/main/options.c:181
|
||||
#: src/main/options.c:183
|
||||
msgid "failed to generate sysfs filename"
|
||||
msgstr ""
|
||||
msgstr "nie udało się wygenerować nazwy pliku dla sysfs"
|
||||
|
||||
#: src/main/options.c:203
|
||||
#: src/main/options.c:205
|
||||
msgid "failed to read sysfs size file"
|
||||
msgstr ""
|
||||
msgstr "nie udało się odczytać rozmiaru pliku sysfs"
|
||||
|
||||
#: src/main/options.c:223
|
||||
#: src/main/options.c:225
|
||||
msgid "failed to open block device"
|
||||
msgstr ""
|
||||
msgstr "nie udało się otworzyć urządzenia blokowego"
|
||||
|
||||
#: src/main/options.c:233
|
||||
#: src/main/options.c:235
|
||||
msgid "failed to determine size of block device"
|
||||
msgstr ""
|
||||
msgstr "nie udało się ustalić rozmiaru urządzenia blokowego"
|
||||
|
||||
#: src/main/options.c:334
|
||||
#: src/main/options.c:339
|
||||
msgid "option structure allocation failed"
|
||||
msgstr "nie udało się zaalokować struktur opcji"
|
||||
|
||||
#: src/main/options.c:353
|
||||
#: src/main/options.c:358
|
||||
msgid "option structure argv allocation failed"
|
||||
msgstr "nie udało się zaalokować struktur opcji argv"
|
||||
|
||||
#: src/main/options.c:415
|
||||
#: src/main/options.c:420
|
||||
msgid "integer argument expected"
|
||||
msgstr ""
|
||||
msgstr "oczekiwany argument typu liczby całkowitej"
|
||||
|
||||
#: src/main/options.c:426
|
||||
#: src/main/options.c:431
|
||||
msgid "numeric argument expected"
|
||||
msgstr ""
|
||||
msgstr "oczekiwany argument liczbowy"
|
||||
|
||||
#: src/main/options.c:437
|
||||
#: src/main/options.c:442
|
||||
msgid "process ID or pid:fd pair expected"
|
||||
msgstr ""
|
||||
msgstr "oczekiwany proces ID lub para PID:FD"
|
||||
|
||||
#: src/main/options.c:444
|
||||
#: src/main/options.c:449
|
||||
msgid "invalid process ID"
|
||||
msgstr ""
|
||||
msgstr "niepoprawne ID procesu"
|
||||
|
||||
#: src/main/options.c:647
|
||||
#: src/main/options.c:666
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Spróbuj `%s --help' by uzyskać więcej informacji"
|
||||
msgstr "Spróbuj `%s --help' by uzyskać więcej informacji."
|
||||
|
||||
#: src/main/options.c:649
|
||||
#: src/main/options.c:668
|
||||
#, c-format
|
||||
msgid "Try `%s -h' for more information."
|
||||
msgstr "Spróbuj `%s -h' by uzyskać więcej informacji"
|
||||
msgstr "Spróbuj `%s -h' by uzyskać więcej informacji."
|
||||
|
||||
#: src/main/options.c:680
|
||||
#: src/main/options.c:699
|
||||
msgid ""
|
||||
"cannot use line mode or transfer modifier options when watching file "
|
||||
"descriptors"
|
||||
msgstr ""
|
||||
"nie można użyć trybu zliczania linii lub opcji modyfikujących przesył "
|
||||
"łącznie z opcją obserwowania deskryptorów plików"
|
||||
|
||||
#: src/main/options.c:689
|
||||
#: src/main/options.c:708
|
||||
msgid "cannot use cursor positioning when watching file descriptors"
|
||||
msgstr ""
|
||||
"nie można użyć pozycjonowania kursora łącznie z opcją obserwowania "
|
||||
"deskryptorów pluków"
|
||||
|
||||
#: src/main/options.c:698
|
||||
#: src/main/options.c:717
|
||||
msgid "cannot use remote control when watching file descriptors"
|
||||
msgstr ""
|
||||
"nie można użyć opcji zaktualizowania ustawień procesu łącznie z opcją "
|
||||
"obserwowania deskryptorów plików"
|
||||
|
||||
#: src/main/options.c:707
|
||||
#: src/main/options.c:726
|
||||
msgid "cannot transfer files when watching file descriptors"
|
||||
msgstr ""
|
||||
msgstr "nie można przesyłać plików z opcją obserwowania deskryptorów plików"
|
||||
|
||||
#: src/main/options.c:722
|
||||
#: src/main/options.c:741
|
||||
msgid "not available on systems without /proc/self/fdinfo"
|
||||
msgstr ""
|
||||
msgstr "niedostępne na systemach bez /proc/self/fdinfo"
|
||||
|
||||
#: src/main/remote.c:302
|
||||
msgid "message not received"
|
||||
msgstr ""
|
||||
msgstr "wiadomość nieodebrana"
|
||||
|
||||
#: src/main/remote.c:429
|
||||
msgid "SA_SIGINFO not supported on this system"
|
||||
msgstr ""
|
||||
msgstr "SA_SIGINFO nie jest wspierane na tym systemie"
|
||||
|
||||
#: src/main/version.c:28
|
||||
msgid "License: GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.html>"
|
||||
msgstr ""
|
||||
msgstr "Licencja: GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.html>"
|
||||
|
||||
#: src/main/version.c:29
|
||||
msgid "This is free software: you are free to change and redistribute it."
|
||||
msgstr ""
|
||||
msgstr "To jest wolne oprogramowanie: masz prawo do zmian i redystrybucji."
|
||||
|
||||
#: src/main/version.c:30
|
||||
msgid "There is NO WARRANTY, to the extent permitted by law."
|
||||
msgstr ""
|
||||
msgstr "Nie udziela się GWARANCJI w zakresie dozwolonym przez prawo."
|
||||
|
||||
#: src/main/version.c:32
|
||||
msgid "Project web site"
|
||||
msgstr ""
|
||||
msgstr "Strona projektu"
|
||||
|
||||
#: src/pv/cursor.c:87
|
||||
#: src/pv/cursor.c:61
|
||||
msgid "failed to get terminal name"
|
||||
msgstr ""
|
||||
msgstr "nie udało się uzyskać nazwy terminala"
|
||||
|
||||
# "Przewidywany czas ukończenia" for ETA is too long
|
||||
#: src/pv/cursor.c:132
|
||||
#: src/pv/cursor.c:106
|
||||
msgid "failed to open lock file"
|
||||
msgstr ""
|
||||
msgstr "nie udało się otworzyć pliku blokowania zasobów"
|
||||
|
||||
#: src/pv/cursor.c:165
|
||||
#: src/pv/cursor.c:139
|
||||
msgid "lock attempt failed"
|
||||
msgstr ""
|
||||
msgstr "blokada zasobów nie powiodła się"
|
||||
|
||||
#: src/pv/cursor.c:426
|
||||
#: src/pv/cursor.c:400
|
||||
msgid "failed to open terminal"
|
||||
msgstr "nie udało się otworzyć terminala"
|
||||
|
||||
#: src/pv/display.c:193
|
||||
#: src/pv/display.c:233
|
||||
msgid "yzafpnum kMGTPEZY"
|
||||
msgstr ""
|
||||
msgstr "yzafpnum kMGTPEZY"
|
||||
|
||||
#: src/pv/display.c:211
|
||||
#: src/pv/display.c:251
|
||||
msgid "yzafpnum KMGTPEZY"
|
||||
msgstr ""
|
||||
msgstr "yzafpnum kMGTPEZY"
|
||||
|
||||
#: src/pv/display.c:750 src/pv/transfer.c:970
|
||||
#: src/pv/display.c:678 src/pv/transfer.c:1011
|
||||
msgid "buffer allocation failed"
|
||||
msgstr "nie udało się zaalokować bufora"
|
||||
|
||||
#: src/pv/display.c:856
|
||||
#: src/pv/display.c:807
|
||||
msgid "b"
|
||||
msgstr ""
|
||||
msgstr "b"
|
||||
|
||||
#: src/pv/display.c:859 src/pv/transfer.c:602
|
||||
#: src/pv/display.c:810 src/pv/transfer.c:602
|
||||
msgid "B"
|
||||
msgstr "B"
|
||||
|
||||
#: src/pv/display.c:900 src/pv/display.c:916
|
||||
#: src/pv/display.c:854 src/pv/display.c:869 src/pv/display.c:1088
|
||||
#: src/pv/loop.c:549
|
||||
msgid "b/s"
|
||||
msgstr ""
|
||||
msgstr "b/s"
|
||||
|
||||
#: src/pv/display.c:905 src/pv/display.c:920
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
msgid "/s"
|
||||
msgstr "/s"
|
||||
|
||||
#: src/pv/display.c:905 src/pv/display.c:920
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
#: src/pv/loop.c:549
|
||||
msgid "B/s"
|
||||
msgstr "B/s"
|
||||
|
||||
#: src/pv/display.c:947 src/pv/display.c:951 src/pv/display.c:1017
|
||||
#: src/pv/display.c:901 src/pv/display.c:905
|
||||
msgid "ETA"
|
||||
msgstr "ETA"
|
||||
|
||||
#: src/pv/display.c:971
|
||||
msgid "FIN"
|
||||
msgstr "FIN"
|
||||
|
||||
#: src/pv/file.c:149
|
||||
msgid "failed to seek to start of output"
|
||||
msgstr ""
|
||||
msgstr "nie udało się przewinąć wyjścia do początku"
|
||||
|
||||
# "Przewidywany czas ukończenia" for ETA is too long
|
||||
#: src/pv/file.c:294
|
||||
@@ -432,27 +466,35 @@ msgstr "plik wejściowy jest zarazem plikiem wyjściowym"
|
||||
|
||||
#: src/pv/file.c:412
|
||||
msgid "(none)"
|
||||
msgstr ""
|
||||
msgstr "(brak)"
|
||||
|
||||
#: src/pv/file.c:414
|
||||
msgid "(stdin)"
|
||||
msgstr ""
|
||||
msgstr "(stdin)"
|
||||
|
||||
#: src/pv/loop.c:575 src/pv/loop.c:626 src/pv/loop.c:667 src/pv/watchpid.c:99
|
||||
#: src/pv/loop.c:548
|
||||
msgid "rate min/avg/max/mdev"
|
||||
msgstr "prędkość min/śr/max/odch"
|
||||
|
||||
#: src/pv/loop.c:560
|
||||
msgid "rate not measured"
|
||||
msgstr "prędkość niezmierzona"
|
||||
|
||||
#: src/pv/loop.c:766 src/pv/loop.c:817 src/pv/loop.c:858 src/pv/watchpid.c:99
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:120 src/pv/watchpid.c:128
|
||||
#: src/pv/watchpid.c:165 src/pv/watchpid.c:184 src/pv/watchpid.c:192
|
||||
#: src/pv/watchpid.c:202 src/pv/watchpid.c:293 src/pv/watchpid.c:301
|
||||
#: src/pv/watchpid.c:377 src/pv/watchpid.c:398
|
||||
msgid "pid"
|
||||
msgstr ""
|
||||
msgstr "pid"
|
||||
|
||||
#: src/pv/state.c:40
|
||||
msgid "history structure allocation failed"
|
||||
msgstr ""
|
||||
msgstr "nie udało się zaalokować struktury historii"
|
||||
|
||||
#: src/pv/state.c:444 src/pv/state.c:455
|
||||
#: src/pv/state.c:509 src/pv/state.c:520
|
||||
msgid "file list allocation failed"
|
||||
msgstr ""
|
||||
msgstr "nie udało się zaalokować listy plików"
|
||||
|
||||
#: src/pv/transfer.c:464
|
||||
msgid "read failed"
|
||||
@@ -460,46 +502,50 @@ msgstr "błąd odczytu"
|
||||
|
||||
#: src/pv/transfer.c:487
|
||||
msgid "warning: read errors detected"
|
||||
msgstr ""
|
||||
msgstr "ostrzeżenie: błędy odczytu wykryte"
|
||||
|
||||
#: src/pv/transfer.c:503
|
||||
msgid "file is not seekable"
|
||||
msgstr ""
|
||||
msgstr "pliku nie da się przewijać"
|
||||
|
||||
#: src/pv/transfer.c:581
|
||||
msgid "failed to seek past error"
|
||||
msgstr ""
|
||||
msgstr "nie udało się przewinąć za błąd"
|
||||
|
||||
#: src/pv/transfer.c:601
|
||||
msgid "skipped past read error"
|
||||
msgstr ""
|
||||
msgstr "pominięto błąd odczytu"
|
||||
|
||||
#: src/pv/transfer.c:641
|
||||
#: src/pv/transfer.c:642
|
||||
msgid "no transfer buffer allocated"
|
||||
msgstr ""
|
||||
msgstr "brak zaalokowanego bufora transferu"
|
||||
|
||||
#: src/pv/transfer.c:682
|
||||
#: src/pv/transfer.c:684
|
||||
msgid "failed to set interval timer"
|
||||
msgstr ""
|
||||
msgstr "nie udało się ustawić interwału czasowego"
|
||||
|
||||
# "Przewidywany czas ukończenia" for ETA is too long
|
||||
#: src/pv/transfer.c:707
|
||||
#: src/pv/transfer.c:710
|
||||
msgid "failed to clear interval timer"
|
||||
msgstr "nie udało się wyczyścić interwału czasowego"
|
||||
|
||||
#: src/pv/transfer.c:740
|
||||
msgid "line position buffer allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:831
|
||||
#: src/pv/transfer.c:872
|
||||
msgid "write failed"
|
||||
msgstr "błąd zapisu"
|
||||
|
||||
#: src/pv/transfer.c:1068
|
||||
#: src/pv/transfer.c:1109
|
||||
msgid "select call failed"
|
||||
msgstr "nie udało się wywołać funkcji select"
|
||||
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:121 src/pv/watchpid.c:130
|
||||
#: src/pv/watchpid.c:184 src/pv/watchpid.c:193 src/pv/watchpid.c:204
|
||||
msgid "fd"
|
||||
msgstr ""
|
||||
msgstr "fd"
|
||||
|
||||
#: src/pv/watchpid.c:130 src/pv/watchpid.c:204
|
||||
msgid "not a regular file or block device"
|
||||
msgstr ""
|
||||
msgstr "plik nie jest plikiem regularnym lub urządzeniem blokowym"
|
||||
|
||||
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: pv@ivarch.com\n"
|
||||
"POT-Creation-Date: 2024-08-18 22:01+0100\n"
|
||||
"POT-Creation-Date: 2024-10-15 22:01+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -39,7 +39,7 @@ msgstr "exibe a taxa de transferência"
|
||||
msgid "show data transfer average rate counter"
|
||||
msgstr "exibe o contador da taxa média de transferência de dados"
|
||||
|
||||
#: src/main/help.c:301 src/main/help.c:332 src/main/help.c:344
|
||||
#: src/main/help.c:301 src/main/help.c:335 src/main/help.c:350
|
||||
msgid "SEC"
|
||||
msgstr ""
|
||||
|
||||
@@ -80,237 +80,254 @@ msgid "set output format to FORMAT"
|
||||
msgstr "definir o formato de saída para FORMAT"
|
||||
|
||||
#: src/main/help.c:323
|
||||
msgid "output transfer statistics at the end"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:326
|
||||
msgid "output percentages, not visual information"
|
||||
msgstr "exibe apenas as porcentagens, sem informações visuais"
|
||||
|
||||
#: src/main/help.c:326
|
||||
#: src/main/help.c:329
|
||||
msgid "do not output any transfer information at all"
|
||||
msgstr "executa programa sem exibir quaisquer informações"
|
||||
|
||||
#: src/main/help.c:330
|
||||
#: src/main/help.c:333
|
||||
msgid "display nothing until first byte transferred"
|
||||
msgstr "não exibe nada até iniciar o processamento"
|
||||
|
||||
#: src/main/help.c:333
|
||||
#: src/main/help.c:336
|
||||
msgid "display nothing until SEC seconds have passed"
|
||||
msgstr "não exibir nada até que os segundos SEC tenham passado"
|
||||
|
||||
#: src/main/help.c:335
|
||||
#: src/main/help.c:338
|
||||
msgid "SIZE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:336
|
||||
#: src/main/help.c:339
|
||||
msgid "set estimated data size to SIZE bytes"
|
||||
msgstr "seta a quantidade estimada de dados em SIZE bytes"
|
||||
|
||||
#: src/main/help.c:339
|
||||
#: src/main/help.c:342
|
||||
msgid "if size unknown, show rate vs max rate"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:345
|
||||
msgid "count lines instead of bytes"
|
||||
msgstr "contar linhas em vez de bytes"
|
||||
|
||||
#: src/main/help.c:342
|
||||
#: src/main/help.c:348
|
||||
msgid "lines are null-terminated"
|
||||
msgstr "linhas são terminadas em nulo"
|
||||
|
||||
#: src/main/help.c:345
|
||||
#: src/main/help.c:351
|
||||
msgid "update every SEC seconds"
|
||||
msgstr "atualiza informações a cada SEC segundos"
|
||||
|
||||
#: src/main/help.c:347
|
||||
#: src/main/help.c:353
|
||||
msgid "WIDTH"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:348
|
||||
#: src/main/help.c:354
|
||||
msgid "assume terminal is WIDTH characters wide"
|
||||
msgstr "presuma que o terminal tem WIDTH caracteres de largura"
|
||||
|
||||
#: src/main/help.c:350
|
||||
#: src/main/help.c:356
|
||||
msgid "HEIGHT"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:351
|
||||
#: src/main/help.c:357
|
||||
msgid "assume terminal is HEIGHT rows high"
|
||||
msgstr "presuma que o terminal tem HEIGHT caracteres de altura"
|
||||
|
||||
#: src/main/help.c:353
|
||||
#: src/main/help.c:359
|
||||
msgid "NAME"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:354
|
||||
#: src/main/help.c:360
|
||||
msgid "prefix visual information with NAME"
|
||||
msgstr "exibe NAME antes das demais informações"
|
||||
|
||||
#: src/main/help.c:357
|
||||
#: src/main/help.c:363
|
||||
msgid "output even if standard error is not a terminal"
|
||||
msgstr "gera dados mesmo que a saída de erro seja redirecionada"
|
||||
|
||||
#: src/main/help.c:360
|
||||
#: src/main/help.c:366
|
||||
msgid "use cursor positioning escape sequences"
|
||||
msgstr "utiliza caracteres de escape para posicionar o cursor"
|
||||
|
||||
#: src/main/help.c:363 src/main/help.c:399 src/main/help.c:414
|
||||
#: src/main/help.c:369 src/main/help.c:399 src/main/help.c:408
|
||||
#: src/main/help.c:423
|
||||
msgid "FILE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:364
|
||||
#: src/main/help.c:370
|
||||
msgid "write output to FILE instead of stdout"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:366
|
||||
#: src/main/help.c:372
|
||||
msgid "RATE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:367
|
||||
#: src/main/help.c:373
|
||||
msgid "limit transfer to RATE bytes per second"
|
||||
msgstr "limita a transferência a RATE bytes por segundo"
|
||||
|
||||
#: src/main/help.c:369 src/main/help.c:378
|
||||
#: src/main/help.c:375 src/main/help.c:384
|
||||
msgid "BYTES"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:370
|
||||
#: src/main/help.c:376
|
||||
msgid "use a buffer size of BYTES"
|
||||
msgstr "use um tamanho de buffer de BYTES"
|
||||
|
||||
#: src/main/help.c:373
|
||||
#: src/main/help.c:379
|
||||
msgid "never use splice(), always use read/write"
|
||||
msgstr "nunca use splice(), sempre use read/write"
|
||||
|
||||
#: src/main/help.c:376
|
||||
#: src/main/help.c:382
|
||||
msgid "skip read errors in input"
|
||||
msgstr "ignorar erros de leitura em entrada"
|
||||
|
||||
#: src/main/help.c:379
|
||||
#: src/main/help.c:385
|
||||
msgid "skip errors in BYTES blocks at a time"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:382
|
||||
#: src/main/help.c:388
|
||||
msgid "stop after --size bytes have been transferred"
|
||||
msgstr "parar após --size bytes terem sido transferidos"
|
||||
|
||||
#: src/main/help.c:385
|
||||
#: src/main/help.c:391
|
||||
msgid "flush cache to disk after every write"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:388
|
||||
#: src/main/help.c:394
|
||||
msgid "use direct I/O to bypass cache"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:391
|
||||
#: src/main/help.c:397
|
||||
msgid "discard input instead of writing to output"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:394
|
||||
#: src/main/help.c:400
|
||||
msgid "write all input to FILE before writing to output"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:403
|
||||
msgid "PID"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:395
|
||||
#: src/main/help.c:404
|
||||
msgid "update settings of process PID"
|
||||
msgstr "atualizar as configurações do processo PID"
|
||||
|
||||
#: src/main/help.c:400
|
||||
#: src/main/help.c:409
|
||||
msgid "save process ID in FILE"
|
||||
msgstr "salvar ID do processo em FILE"
|
||||
|
||||
#: src/main/help.c:403
|
||||
#: src/main/help.c:412
|
||||
msgid "PID[:FD]"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:404
|
||||
#: src/main/help.c:413
|
||||
msgid "watch file FD opened by process PID"
|
||||
msgstr "assistir arquivo FD aberto pelo processo PID"
|
||||
|
||||
#: src/main/help.c:408
|
||||
#: src/main/help.c:417
|
||||
msgid "show this help and exit"
|
||||
msgstr "exibe esta tela de ajuda e termina"
|
||||
|
||||
#: src/main/help.c:411
|
||||
#: src/main/help.c:420
|
||||
msgid "show version information and exit"
|
||||
msgstr "exibe a versão e termina"
|
||||
|
||||
#: src/main/help.c:415
|
||||
#: src/main/help.c:424
|
||||
msgid "write debug logs to FILE"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/help.c:440
|
||||
#: src/main/help.c:449
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION] [FILE]..."
|
||||
msgstr "Uso: %s [OPÇÕES] [ARQUIVOS]..."
|
||||
|
||||
#: src/main/help.c:451
|
||||
#: src/main/help.c:460
|
||||
msgid ""
|
||||
"Concatenate FILE(s), or standard input, to standard output, with monitoring."
|
||||
msgstr ""
|
||||
"Concatena ARQUIVO(s) ou a entrada padrão e grava na saída padrão, com "
|
||||
"monitoramento."
|
||||
|
||||
#: src/main/help.c:588
|
||||
#: src/main/help.c:597
|
||||
#, c-format
|
||||
msgid "Please report any bugs to: %s"
|
||||
msgstr "Por favor, reporte quaisquer defeitos para %s"
|
||||
|
||||
#: src/main/main.c:71
|
||||
#: src/main/main.c:214
|
||||
msgid "(input)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/main.c:299
|
||||
msgid "state allocation failed"
|
||||
msgstr "alocação de memória de status falhou"
|
||||
|
||||
#: src/main/options.c:138 src/pv/file.c:324
|
||||
#: src/main/options.c:140 src/pv/file.c:324
|
||||
msgid "failed to stat file"
|
||||
msgstr "erro obtendo informações do arquivo"
|
||||
|
||||
#: src/main/options.c:152
|
||||
#: src/main/options.c:154
|
||||
msgid "is a directory"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:181
|
||||
#: src/main/options.c:183
|
||||
msgid "failed to generate sysfs filename"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:203
|
||||
#: src/main/options.c:205
|
||||
msgid "failed to read sysfs size file"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:223
|
||||
#: src/main/options.c:225
|
||||
msgid "failed to open block device"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:233
|
||||
#: src/main/options.c:235
|
||||
msgid "failed to determine size of block device"
|
||||
msgstr ""
|
||||
|
||||
#: src/main/options.c:334
|
||||
#: src/main/options.c:339
|
||||
msgid "option structure allocation failed"
|
||||
msgstr "erro na alocação da estrutura de opções"
|
||||
|
||||
#: src/main/options.c:353
|
||||
#: src/main/options.c:358
|
||||
msgid "option structure argv allocation failed"
|
||||
msgstr "erro na alocação da estrutura de opções argv"
|
||||
|
||||
#: src/main/options.c:415
|
||||
#: src/main/options.c:420
|
||||
msgid "integer argument expected"
|
||||
msgstr "argumento inteiro esperado"
|
||||
|
||||
#: src/main/options.c:426
|
||||
#: src/main/options.c:431
|
||||
msgid "numeric argument expected"
|
||||
msgstr "argumento numérico esperado"
|
||||
|
||||
#: src/main/options.c:437
|
||||
#: src/main/options.c:442
|
||||
msgid "process ID or pid:fd pair expected"
|
||||
msgstr "ID do processo ou par pid:fd esperado"
|
||||
|
||||
#: src/main/options.c:444
|
||||
#: src/main/options.c:449
|
||||
msgid "invalid process ID"
|
||||
msgstr "ID de processo inválido"
|
||||
|
||||
#: src/main/options.c:647
|
||||
#: src/main/options.c:666
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Tente `%s --help' para maiores informações."
|
||||
|
||||
#: src/main/options.c:649
|
||||
#: src/main/options.c:668
|
||||
#, c-format
|
||||
msgid "Try `%s -h' for more information."
|
||||
msgstr "Tente `%s -h' para maiores informações."
|
||||
|
||||
#: src/main/options.c:680
|
||||
#: src/main/options.c:699
|
||||
msgid ""
|
||||
"cannot use line mode or transfer modifier options when watching file "
|
||||
"descriptors"
|
||||
@@ -318,21 +335,21 @@ msgstr ""
|
||||
"não pode usar o modo de linha ou opções de modificador de transferência ao "
|
||||
"assistir os descritores de arquivo"
|
||||
|
||||
#: src/main/options.c:689
|
||||
#: src/main/options.c:708
|
||||
msgid "cannot use cursor positioning when watching file descriptors"
|
||||
msgstr ""
|
||||
"não pode usar o posicionamento do cursor ao observar os descritores de "
|
||||
"arquivo"
|
||||
|
||||
#: src/main/options.c:698
|
||||
#: src/main/options.c:717
|
||||
msgid "cannot use remote control when watching file descriptors"
|
||||
msgstr "não pode usar o controle remoto ao assistir os descritores de arquivo"
|
||||
|
||||
#: src/main/options.c:707
|
||||
#: src/main/options.c:726
|
||||
msgid "cannot transfer files when watching file descriptors"
|
||||
msgstr "não pode transferir arquivos ao assistir descritores de arquivo"
|
||||
|
||||
#: src/main/options.c:722
|
||||
#: src/main/options.c:741
|
||||
msgid "not available on systems without /proc/self/fdinfo"
|
||||
msgstr "não disponível em sistemas sem /proc/self/fdinfo"
|
||||
|
||||
@@ -360,58 +377,64 @@ msgstr ""
|
||||
msgid "Project web site"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/cursor.c:87
|
||||
#: src/pv/cursor.c:61
|
||||
msgid "failed to get terminal name"
|
||||
msgstr "erro ao ler o nome do terminal"
|
||||
|
||||
#: src/pv/cursor.c:132
|
||||
#: src/pv/cursor.c:106
|
||||
msgid "failed to open lock file"
|
||||
msgstr "erro ao abrir arquivo de bloqueio"
|
||||
|
||||
#: src/pv/cursor.c:165
|
||||
#: src/pv/cursor.c:139
|
||||
msgid "lock attempt failed"
|
||||
msgstr "tentativa de bloqueio falhou"
|
||||
|
||||
#: src/pv/cursor.c:426
|
||||
#: src/pv/cursor.c:400
|
||||
msgid "failed to open terminal"
|
||||
msgstr "erro abrindo o terminal"
|
||||
|
||||
#: src/pv/display.c:193
|
||||
#: src/pv/display.c:233
|
||||
msgid "yzafpnum kMGTPEZY"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:211
|
||||
#: src/pv/display.c:251
|
||||
msgid "yzafpnum KMGTPEZY"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:750 src/pv/transfer.c:970
|
||||
#: src/pv/display.c:678 src/pv/transfer.c:1011
|
||||
msgid "buffer allocation failed"
|
||||
msgstr "erro alocando o buffer"
|
||||
|
||||
#: src/pv/display.c:856
|
||||
#: src/pv/display.c:807
|
||||
msgid "b"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:859 src/pv/transfer.c:602
|
||||
#: src/pv/display.c:810 src/pv/transfer.c:602
|
||||
msgid "B"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:900 src/pv/display.c:916
|
||||
#: src/pv/display.c:854 src/pv/display.c:869 src/pv/display.c:1088
|
||||
#: src/pv/loop.c:549
|
||||
msgid "b/s"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:905 src/pv/display.c:920
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
msgid "/s"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/display.c:905 src/pv/display.c:920
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
#: src/pv/loop.c:549
|
||||
msgid "B/s"
|
||||
msgstr "B/s"
|
||||
|
||||
#: src/pv/display.c:947 src/pv/display.c:951 src/pv/display.c:1017
|
||||
#: src/pv/display.c:901 src/pv/display.c:905
|
||||
msgid "ETA"
|
||||
msgstr "ETA"
|
||||
|
||||
#: src/pv/display.c:971
|
||||
msgid "FIN"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/file.c:149
|
||||
msgid "failed to seek to start of output"
|
||||
msgstr "não pode mover para o início da produção"
|
||||
@@ -440,7 +463,15 @@ msgstr ""
|
||||
msgid "(stdin)"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/loop.c:575 src/pv/loop.c:626 src/pv/loop.c:667 src/pv/watchpid.c:99
|
||||
#: src/pv/loop.c:548
|
||||
msgid "rate min/avg/max/mdev"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/loop.c:560
|
||||
msgid "rate not measured"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/loop.c:766 src/pv/loop.c:817 src/pv/loop.c:858 src/pv/watchpid.c:99
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:120 src/pv/watchpid.c:128
|
||||
#: src/pv/watchpid.c:165 src/pv/watchpid.c:184 src/pv/watchpid.c:192
|
||||
#: src/pv/watchpid.c:202 src/pv/watchpid.c:293 src/pv/watchpid.c:301
|
||||
@@ -452,7 +483,7 @@ msgstr ""
|
||||
msgid "history structure allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/state.c:444 src/pv/state.c:455
|
||||
#: src/pv/state.c:509 src/pv/state.c:520
|
||||
msgid "file list allocation failed"
|
||||
msgstr ""
|
||||
|
||||
@@ -476,23 +507,27 @@ msgstr "não pode ir além do erro"
|
||||
msgid "skipped past read error"
|
||||
msgstr "ignorado erro de leitura"
|
||||
|
||||
#: src/pv/transfer.c:641
|
||||
#: src/pv/transfer.c:642
|
||||
msgid "no transfer buffer allocated"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:682
|
||||
#: src/pv/transfer.c:684
|
||||
msgid "failed to set interval timer"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:707
|
||||
#: src/pv/transfer.c:710
|
||||
msgid "failed to clear interval timer"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:831
|
||||
#: src/pv/transfer.c:740
|
||||
msgid "line position buffer allocation failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/pv/transfer.c:872
|
||||
msgid "write failed"
|
||||
msgstr "erro de gravação"
|
||||
|
||||
#: src/pv/transfer.c:1068
|
||||
#: src/pv/transfer.c:1109
|
||||
msgid "select call failed"
|
||||
msgstr "erro na chamada da função select"
|
||||
|
||||
|
||||
@@ -0,0 +1,537 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: pv 1.8.14\n"
|
||||
"Report-Msgid-Bugs-To: pv@ivarch.com\n"
|
||||
"POT-Creation-Date: 2024-10-15 22:01+0100\n"
|
||||
"PO-Revision-Date: 2024-10-12 23:51+0000\n"
|
||||
"Last-Translator: a-j-wood <a-j-wood@users.noreply.translate.codeberg.org>\n"
|
||||
"Language-Team: Turkish <https://translate.codeberg.org/projects/pv/pv/tr/>\n"
|
||||
"Language: tr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.7.2\n"
|
||||
|
||||
#: src/main/help.c:284
|
||||
msgid "show progress bar"
|
||||
msgstr "ilerleme çubuğunu göster"
|
||||
|
||||
#: src/main/help.c:287
|
||||
msgid "show elapsed time"
|
||||
msgstr "geçen süreyi göster"
|
||||
|
||||
#: src/main/help.c:290
|
||||
msgid "show estimated time of arrival (completion)"
|
||||
msgstr "tahmini varış (tamamlanma) zamanını göster"
|
||||
|
||||
#: src/main/help.c:293
|
||||
msgid "show absolute estimated time of arrival (completion)"
|
||||
msgstr "mutlak tahmini varış (tamamlanma) zamanını göster"
|
||||
|
||||
#: src/main/help.c:296
|
||||
msgid "show data transfer rate counter"
|
||||
msgstr "veri aktarım oranı sayacını göster"
|
||||
|
||||
#: src/main/help.c:299
|
||||
msgid "show data transfer average rate counter"
|
||||
msgstr "veri aktarımı ortalama hız sayacını göster"
|
||||
|
||||
#: src/main/help.c:301 src/main/help.c:335 src/main/help.c:350
|
||||
msgid "SEC"
|
||||
msgstr "SEC"
|
||||
|
||||
#: src/main/help.c:302
|
||||
msgid "compute average rate over past SEC seconds (default 30s)"
|
||||
msgstr "geçmiş SEC saniyeleri üzerinden ortalama hızı hesapla (varsayılan 30s)"
|
||||
|
||||
#: src/main/help.c:305
|
||||
msgid "show number of bytes transferred"
|
||||
msgstr "aktarılan bayt sayısını göster"
|
||||
|
||||
#: src/main/help.c:308
|
||||
msgid "show number of bits transferred"
|
||||
msgstr "aktarılan bit sayısını göster"
|
||||
|
||||
#: src/main/help.c:311
|
||||
msgid "treat suffixes as multiples of 1000 rather than 1024"
|
||||
msgstr "ekleri 1024 yerine 1000'in katları olarak değerlendir"
|
||||
|
||||
#: src/main/help.c:314
|
||||
msgid "show percentage of transfer buffer in use"
|
||||
msgstr "aktarım tamponunun kullanım yüzdesini göster"
|
||||
|
||||
#: src/main/help.c:316
|
||||
msgid "NUM"
|
||||
msgstr "NUM"
|
||||
|
||||
#: src/main/help.c:317
|
||||
msgid "show NUM bytes last written"
|
||||
msgstr "son yazılan NUM baytlarını göster"
|
||||
|
||||
#: src/main/help.c:319
|
||||
msgid "FORMAT"
|
||||
msgstr "FORMAT"
|
||||
|
||||
#: src/main/help.c:320
|
||||
msgid "set output format to FORMAT"
|
||||
msgstr "çıktı formatını FORMAT olarak ayarlayın"
|
||||
|
||||
#: src/main/help.c:323
|
||||
msgid "output transfer statistics at the end"
|
||||
msgstr "transfer istatistiklerini sonda göster"
|
||||
|
||||
#: src/main/help.c:326
|
||||
msgid "output percentages, not visual information"
|
||||
msgstr "görsel bilgileri değil, yüzdeleri çıktı olarak yazdır"
|
||||
|
||||
#: src/main/help.c:329
|
||||
msgid "do not output any transfer information at all"
|
||||
msgstr "hiçbir transfer bilgisini yazdırma"
|
||||
|
||||
#: src/main/help.c:333
|
||||
msgid "display nothing until first byte transferred"
|
||||
msgstr "ilk bayt aktarılana kadar hiçbir şey gösterme"
|
||||
|
||||
#: src/main/help.c:336
|
||||
msgid "display nothing until SEC seconds have passed"
|
||||
msgstr "SEC saniye geçene kadar hiçbir şey gösterme"
|
||||
|
||||
#: src/main/help.c:338
|
||||
msgid "SIZE"
|
||||
msgstr "BOYUT"
|
||||
|
||||
#: src/main/help.c:339
|
||||
msgid "set estimated data size to SIZE bytes"
|
||||
msgstr "tahmini veri boyutunu BOYUT bayt olarak ayarlayın"
|
||||
|
||||
#: src/main/help.c:342
|
||||
msgid "if size unknown, show rate vs max rate"
|
||||
msgstr "boyut bilinmiyorsa, oranı maksimum oranla göster"
|
||||
|
||||
#: src/main/help.c:345
|
||||
msgid "count lines instead of bytes"
|
||||
msgstr "bayt yerine satır say"
|
||||
|
||||
#: src/main/help.c:348
|
||||
msgid "lines are null-terminated"
|
||||
msgstr "satırlar boş sonlandırılır"
|
||||
|
||||
#: src/main/help.c:351
|
||||
msgid "update every SEC seconds"
|
||||
msgstr "her SEC saniyede bir güncelleme"
|
||||
|
||||
#: src/main/help.c:353
|
||||
msgid "WIDTH"
|
||||
msgstr "GENİŞLİK"
|
||||
|
||||
#: src/main/help.c:354
|
||||
msgid "assume terminal is WIDTH characters wide"
|
||||
msgstr "terminalin GENİŞLİK karakter genişliğinde olduğunu varsayalım"
|
||||
|
||||
#: src/main/help.c:356
|
||||
msgid "HEIGHT"
|
||||
msgstr "YÜKSEKLİK"
|
||||
|
||||
#: src/main/help.c:357
|
||||
msgid "assume terminal is HEIGHT rows high"
|
||||
msgstr "terminalin YÜKSEKLİK sıraları yüksekliğinde olduğunu varsayalım"
|
||||
|
||||
#: src/main/help.c:359
|
||||
msgid "NAME"
|
||||
msgstr "İSİM"
|
||||
|
||||
#: src/main/help.c:360
|
||||
msgid "prefix visual information with NAME"
|
||||
msgstr "görsel bilgiyi İSİM ile öne ekle"
|
||||
|
||||
#: src/main/help.c:363
|
||||
msgid "output even if standard error is not a terminal"
|
||||
msgstr "standart hata bir terminal olmasa bile çıktı yazdır"
|
||||
|
||||
#: src/main/help.c:366
|
||||
msgid "use cursor positioning escape sequences"
|
||||
msgstr "imleç konumlandırma kaçış dizilerini kullan"
|
||||
|
||||
#: src/main/help.c:369 src/main/help.c:399 src/main/help.c:408
|
||||
#: src/main/help.c:423
|
||||
msgid "FILE"
|
||||
msgstr "DOSYA"
|
||||
|
||||
#: src/main/help.c:370
|
||||
msgid "write output to FILE instead of stdout"
|
||||
msgstr "çıktıyı stdout yerine DOSYA'ya yaz"
|
||||
|
||||
#: src/main/help.c:372
|
||||
msgid "RATE"
|
||||
msgstr "ORAN"
|
||||
|
||||
#: src/main/help.c:373
|
||||
msgid "limit transfer to RATE bytes per second"
|
||||
msgstr "aktarımı saniye başına ORAN bayt ile sınırlandırın"
|
||||
|
||||
#: src/main/help.c:375 src/main/help.c:384
|
||||
msgid "BYTES"
|
||||
msgstr "BAYTLAR"
|
||||
|
||||
#: src/main/help.c:376
|
||||
msgid "use a buffer size of BYTES"
|
||||
msgstr "BAYTLAR tampon boyutu kullanın"
|
||||
|
||||
#: src/main/help.c:379
|
||||
msgid "never use splice(), always use read/write"
|
||||
msgstr "splice() kullanma, her zaman read/write kullan"
|
||||
|
||||
#: src/main/help.c:382
|
||||
msgid "skip read errors in input"
|
||||
msgstr "girdideki okuma hatalarını atla"
|
||||
|
||||
#: src/main/help.c:385
|
||||
msgid "skip errors in BYTES blocks at a time"
|
||||
msgstr "BAYTLAR blokları halinde hataları atla"
|
||||
|
||||
#: src/main/help.c:388
|
||||
msgid "stop after --size bytes have been transferred"
|
||||
msgstr "--size bayt transfer edildikten sonra dur"
|
||||
|
||||
#: src/main/help.c:391
|
||||
msgid "flush cache to disk after every write"
|
||||
msgstr "her yazmadan sonra önbelleği diske boşalt"
|
||||
|
||||
#: src/main/help.c:394
|
||||
msgid "use direct I/O to bypass cache"
|
||||
msgstr "Önbelleği atlamak için doğrudan I/O kullan"
|
||||
|
||||
#: src/main/help.c:397
|
||||
msgid "discard input instead of writing to output"
|
||||
msgstr "Girdiyi çıktıya yazmak yerine yok say"
|
||||
|
||||
#: src/main/help.c:400
|
||||
msgid "write all input to FILE before writing to output"
|
||||
msgstr "çıktıya yazmadan önce tüm girdiyi DOSYA'ya yaz"
|
||||
|
||||
#: src/main/help.c:403
|
||||
msgid "PID"
|
||||
msgstr "PID"
|
||||
|
||||
#: src/main/help.c:404
|
||||
msgid "update settings of process PID"
|
||||
msgstr "süreç PID ayarlarını güncelle"
|
||||
|
||||
#: src/main/help.c:409
|
||||
msgid "save process ID in FILE"
|
||||
msgstr "FILE'da işlem kimliğini (ID) kaydet"
|
||||
|
||||
#: src/main/help.c:412
|
||||
msgid "PID[:FD]"
|
||||
msgstr "PID[:FD]"
|
||||
|
||||
#: src/main/help.c:413
|
||||
msgid "watch file FD opened by process PID"
|
||||
msgstr "FD izleme dosyası PID işlemi tarafından açıldı"
|
||||
|
||||
#: src/main/help.c:417
|
||||
msgid "show this help and exit"
|
||||
msgstr "bu yardımı göster ve çık"
|
||||
|
||||
#: src/main/help.c:420
|
||||
msgid "show version information and exit"
|
||||
msgstr "sürüm bilgilerini göster ve çık"
|
||||
|
||||
#: src/main/help.c:424
|
||||
msgid "write debug logs to FILE"
|
||||
msgstr "Hata ayıklama kayıtlarını DOSYA'ya yaz"
|
||||
|
||||
#: src/main/help.c:449
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION] [FILE]..."
|
||||
msgstr "Kullanım şekli: %s [AYAR] [DOSYA]..."
|
||||
|
||||
#: src/main/help.c:460
|
||||
msgid ""
|
||||
"Concatenate FILE(s), or standard input, to standard output, with monitoring."
|
||||
msgstr ""
|
||||
"İzleme ile DOSYA(lar)ı veya standart girdiyi standart çıktı ile birleştirin."
|
||||
|
||||
#: src/main/help.c:597
|
||||
#, c-format
|
||||
msgid "Please report any bugs to: %s"
|
||||
msgstr "Lütfen hataları şu adrese bildirin: %s"
|
||||
|
||||
#: src/main/main.c:214
|
||||
msgid "(input)"
|
||||
msgstr "(giriş)"
|
||||
|
||||
#: src/main/main.c:299
|
||||
msgid "state allocation failed"
|
||||
msgstr "durum tahsisi başarısız oldu"
|
||||
|
||||
#: src/main/options.c:140 src/pv/file.c:324
|
||||
msgid "failed to stat file"
|
||||
msgstr "dosya statüsünde başarısız oldu"
|
||||
|
||||
#: src/main/options.c:154
|
||||
msgid "is a directory"
|
||||
msgstr "bir dizindir"
|
||||
|
||||
#: src/main/options.c:183
|
||||
msgid "failed to generate sysfs filename"
|
||||
msgstr "sysfs dosya adı oluşturulamadı"
|
||||
|
||||
#: src/main/options.c:205
|
||||
msgid "failed to read sysfs size file"
|
||||
msgstr "sysfs boyut dosyası okunamadı"
|
||||
|
||||
#: src/main/options.c:225
|
||||
msgid "failed to open block device"
|
||||
msgstr "blok aygıtı açılamadı"
|
||||
|
||||
#: src/main/options.c:235
|
||||
msgid "failed to determine size of block device"
|
||||
msgstr "blok aygıtının boyutu belirlenemedi"
|
||||
|
||||
#: src/main/options.c:339
|
||||
msgid "option structure allocation failed"
|
||||
msgstr "seçenek yapısı tahsisi başarısız oldu"
|
||||
|
||||
#: src/main/options.c:358
|
||||
msgid "option structure argv allocation failed"
|
||||
msgstr "seçenek yapısı argv tahsisi başarısız oldu"
|
||||
|
||||
#: src/main/options.c:420
|
||||
msgid "integer argument expected"
|
||||
msgstr "tamsayı bağımsız değişkeni bekleniyor"
|
||||
|
||||
#: src/main/options.c:431
|
||||
msgid "numeric argument expected"
|
||||
msgstr "sayısal bağımsız değişken bekleniyor"
|
||||
|
||||
#: src/main/options.c:442
|
||||
msgid "process ID or pid:fd pair expected"
|
||||
msgstr "süreç kimliği (ID) veya pid:fd çifti bekleniyor"
|
||||
|
||||
#: src/main/options.c:449
|
||||
msgid "invalid process ID"
|
||||
msgstr "geçersiz süreç kimliği (ID)"
|
||||
|
||||
#: src/main/options.c:666
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Daha fazla bilgi için `%s --help' seçeneğini deneyin."
|
||||
|
||||
#: src/main/options.c:668
|
||||
#, c-format
|
||||
msgid "Try `%s -h' for more information."
|
||||
msgstr "Daha fazla bilgi için `%s -h' seçeneğini deneyin."
|
||||
|
||||
#: src/main/options.c:699
|
||||
msgid ""
|
||||
"cannot use line mode or transfer modifier options when watching file "
|
||||
"descriptors"
|
||||
msgstr ""
|
||||
"dosya tanımlayıcılarını izlerken satır modu veya aktarım değiştirici "
|
||||
"seçeneklerini kullanamaz"
|
||||
|
||||
#: src/main/options.c:708
|
||||
msgid "cannot use cursor positioning when watching file descriptors"
|
||||
msgstr "dosya tanımlayıcılarını izlerken imleç konumlandırmayı kullanamaz"
|
||||
|
||||
#: src/main/options.c:717
|
||||
msgid "cannot use remote control when watching file descriptors"
|
||||
msgstr "dosya tanımlayıcılarını izlerken uzaktan kumandayı kullanamaz"
|
||||
|
||||
#: src/main/options.c:726
|
||||
msgid "cannot transfer files when watching file descriptors"
|
||||
msgstr "dosya tanımlayıcıları izlenirken dosya aktarılamıyor"
|
||||
|
||||
#: src/main/options.c:741
|
||||
msgid "not available on systems without /proc/self/fdinfo"
|
||||
msgstr "/proc/self/fdinfo olmayan sistemlerde kullanılamaz"
|
||||
|
||||
#: src/main/remote.c:302
|
||||
msgid "message not received"
|
||||
msgstr "mesaj alınamadı"
|
||||
|
||||
#: src/main/remote.c:429
|
||||
msgid "SA_SIGINFO not supported on this system"
|
||||
msgstr "SA_SIGINFO bu sistemde desteklenmiyor"
|
||||
|
||||
#: src/main/version.c:28
|
||||
msgid "License: GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.html>"
|
||||
msgstr "Lisans: GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.html>"
|
||||
|
||||
#: src/main/version.c:29
|
||||
msgid "This is free software: you are free to change and redistribute it."
|
||||
msgstr ""
|
||||
"Bu özgür bir yazılımdır: değiştirmekte ve yeniden dağıtmakta özgürsünüz."
|
||||
|
||||
#: src/main/version.c:30
|
||||
msgid "There is NO WARRANTY, to the extent permitted by law."
|
||||
msgstr "Yasaların izin verdiği ölçüde GARANTİ YOKTUR."
|
||||
|
||||
#: src/main/version.c:32
|
||||
msgid "Project web site"
|
||||
msgstr "Proje web sitesi"
|
||||
|
||||
#: src/pv/cursor.c:61
|
||||
msgid "failed to get terminal name"
|
||||
msgstr "terminal adı alınamadı"
|
||||
|
||||
#: src/pv/cursor.c:106
|
||||
msgid "failed to open lock file"
|
||||
msgstr "lock dosyası açılamadı"
|
||||
|
||||
#: src/pv/cursor.c:139
|
||||
msgid "lock attempt failed"
|
||||
msgstr "kilit denemesi başarısız oldu"
|
||||
|
||||
#: src/pv/cursor.c:400
|
||||
msgid "failed to open terminal"
|
||||
msgstr "terminal açılamadı"
|
||||
|
||||
#: src/pv/display.c:233
|
||||
msgid "yzafpnum kMGTPEZY"
|
||||
msgstr "yzafpnum kMGTPEZY"
|
||||
|
||||
#: src/pv/display.c:251
|
||||
msgid "yzafpnum KMGTPEZY"
|
||||
msgstr "yzafpnum KMGTPEZY"
|
||||
|
||||
#: src/pv/display.c:678 src/pv/transfer.c:1011
|
||||
msgid "buffer allocation failed"
|
||||
msgstr "arabellek tahsisi başarısız oldu"
|
||||
|
||||
#: src/pv/display.c:807
|
||||
msgid "b"
|
||||
msgstr "b"
|
||||
|
||||
#: src/pv/display.c:810 src/pv/transfer.c:602
|
||||
msgid "B"
|
||||
msgstr "B"
|
||||
|
||||
#: src/pv/display.c:854 src/pv/display.c:869 src/pv/display.c:1088
|
||||
#: src/pv/loop.c:549
|
||||
msgid "b/s"
|
||||
msgstr "b/s"
|
||||
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
msgid "/s"
|
||||
msgstr "/s"
|
||||
|
||||
#: src/pv/display.c:858 src/pv/display.c:873 src/pv/display.c:1092
|
||||
#: src/pv/loop.c:549
|
||||
msgid "B/s"
|
||||
msgstr "B/s"
|
||||
|
||||
#: src/pv/display.c:901 src/pv/display.c:905
|
||||
msgid "ETA"
|
||||
msgstr "ETA"
|
||||
|
||||
#: src/pv/display.c:971
|
||||
msgid "FIN"
|
||||
msgstr "FIN"
|
||||
|
||||
#: src/pv/file.c:149
|
||||
msgid "failed to seek to start of output"
|
||||
msgstr "çıktının başlangıcına ulaşılamadı"
|
||||
|
||||
#: src/pv/file.c:294
|
||||
msgid "failed to close file"
|
||||
msgstr "dosya kapatılamadı"
|
||||
|
||||
#: src/pv/file.c:317
|
||||
msgid "failed to read file"
|
||||
msgstr "dosya okunamadı"
|
||||
|
||||
#: src/pv/file.c:332
|
||||
msgid "failed to stat output file"
|
||||
msgstr "çıktı dosyası stat edilemedi"
|
||||
|
||||
#: src/pv/file.c:354
|
||||
msgid "input file is output file"
|
||||
msgstr "girdi dosyası çıktı dosyasıdır"
|
||||
|
||||
#: src/pv/file.c:412
|
||||
msgid "(none)"
|
||||
msgstr "(yok)"
|
||||
|
||||
#: src/pv/file.c:414
|
||||
msgid "(stdin)"
|
||||
msgstr "(stdin)"
|
||||
|
||||
#: src/pv/loop.c:548
|
||||
msgid "rate min/avg/max/mdev"
|
||||
msgstr "oran min/ortalama/maks/standart sapma"
|
||||
|
||||
#: src/pv/loop.c:560
|
||||
msgid "rate not measured"
|
||||
msgstr "oran ölçülmedi"
|
||||
|
||||
#: src/pv/loop.c:766 src/pv/loop.c:817 src/pv/loop.c:858 src/pv/watchpid.c:99
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:120 src/pv/watchpid.c:128
|
||||
#: src/pv/watchpid.c:165 src/pv/watchpid.c:184 src/pv/watchpid.c:192
|
||||
#: src/pv/watchpid.c:202 src/pv/watchpid.c:293 src/pv/watchpid.c:301
|
||||
#: src/pv/watchpid.c:377 src/pv/watchpid.c:398
|
||||
msgid "pid"
|
||||
msgstr "pid"
|
||||
|
||||
#: src/pv/state.c:40
|
||||
msgid "history structure allocation failed"
|
||||
msgstr "geçmiş yapısı tahsisi başarısız oldu"
|
||||
|
||||
#: src/pv/state.c:509 src/pv/state.c:520
|
||||
msgid "file list allocation failed"
|
||||
msgstr "dosya listesi tahsisi başarısız oldu"
|
||||
|
||||
#: src/pv/transfer.c:464
|
||||
msgid "read failed"
|
||||
msgstr "okuma başarısız"
|
||||
|
||||
#: src/pv/transfer.c:487
|
||||
msgid "warning: read errors detected"
|
||||
msgstr "uyarı: okuma hataları tespit edildi"
|
||||
|
||||
#: src/pv/transfer.c:503
|
||||
msgid "file is not seekable"
|
||||
msgstr "dosya aranabilir değil"
|
||||
|
||||
#: src/pv/transfer.c:581
|
||||
msgid "failed to seek past error"
|
||||
msgstr "geçmiş hatayı aramakta başarısız oldu"
|
||||
|
||||
#: src/pv/transfer.c:601
|
||||
msgid "skipped past read error"
|
||||
msgstr "geçmiş okuma hatası atlandı"
|
||||
|
||||
#: src/pv/transfer.c:642
|
||||
msgid "no transfer buffer allocated"
|
||||
msgstr "aktarım arabelleği ayrılmamış"
|
||||
|
||||
#: src/pv/transfer.c:684
|
||||
msgid "failed to set interval timer"
|
||||
msgstr "aralık zamanlayıcısı ayarlanamadı"
|
||||
|
||||
#: src/pv/transfer.c:710
|
||||
msgid "failed to clear interval timer"
|
||||
msgstr "aralık zamanlayıcısı temizlenemedi"
|
||||
|
||||
#: src/pv/transfer.c:740
|
||||
msgid "line position buffer allocation failed"
|
||||
msgstr "satır konumu arabellek tahsisi başarısız oldu"
|
||||
|
||||
#: src/pv/transfer.c:872
|
||||
msgid "write failed"
|
||||
msgstr "yazma başarısız"
|
||||
|
||||
#: src/pv/transfer.c:1109
|
||||
msgid "select call failed"
|
||||
msgstr "seçme çağrısı başarısız oldu"
|
||||
|
||||
#: src/pv/watchpid.c:109 src/pv/watchpid.c:121 src/pv/watchpid.c:130
|
||||
#: src/pv/watchpid.c:184 src/pv/watchpid.c:193 src/pv/watchpid.c:204
|
||||
msgid "fd"
|
||||
msgstr "fd"
|
||||
|
||||
#: src/pv/watchpid.c:130 src/pv/watchpid.c:204
|
||||
msgid "not a regular file or block device"
|
||||
msgstr "normal bir dosya veya blok aygıtı değil"
|
||||
@@ -73,6 +73,9 @@
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define to 1 if you have the <math.h> header file. */
|
||||
#undef HAVE_MATH_H
|
||||
|
||||
/* Define to 1 if you have the `memcpy' function. */
|
||||
#undef HAVE_MEMCPY
|
||||
|
||||
@@ -112,6 +115,9 @@
|
||||
/* Define to 1 if you have the `splice' function. */
|
||||
#undef HAVE_SPLICE
|
||||
|
||||
/* Define to 1 if you have the `sqrtl' function. */
|
||||
#undef HAVE_SQRTL
|
||||
|
||||
/* Define to 1 if stdbool.h conforms to C99. */
|
||||
#undef HAVE_STDBOOL_H
|
||||
|
||||
|
||||
+30
-22
@@ -23,8 +23,35 @@ extern "C" {
|
||||
struct opts_s;
|
||||
typedef struct opts_s *opts_t;
|
||||
|
||||
struct opts_s { /* structure describing run-time options */
|
||||
/*
|
||||
* Structure describing run-time options.
|
||||
*
|
||||
* Members are ordered by size to minimise padding.
|
||||
*/
|
||||
struct opts_s {
|
||||
double interval; /* interval between updates */
|
||||
double delay_start; /* delay before first display */
|
||||
/*@keep@*/ const char *program_name; /* name the program is running as */
|
||||
/*@keep@*/ /*@null@*/ char *output; /* fd to write output to */
|
||||
/*@keep@*/ /*@null@*/ char *name; /* display name, if any */
|
||||
/*@keep@*/ /*@null@*/ char *format; /* output format, if any */
|
||||
/*@keep@*/ /*@null@*/ char *pidfile; /* PID file, if any */
|
||||
/*@keep@*/ /*@null@*/ char *store_and_forward_file; /* store and forward file, if any */
|
||||
/*@keep@*/ /*@null@*/ const char **argv; /* array of non-option arguments */
|
||||
size_t lastwritten; /* show N bytes last written */
|
||||
off_t rate_limit; /* rate limit, in bytes per second */
|
||||
size_t buffer_size; /* buffer size, in bytes (0=default) */
|
||||
off_t size; /* total size of data */
|
||||
off_t error_skip_block; /* skip block size, 0 for adaptive */
|
||||
unsigned int remote; /* PID of pv to update settings of */
|
||||
unsigned int skip_errors; /* skip read errors counter */
|
||||
pid_t watch_pid; /* process to watch fds of */
|
||||
int watch_fd; /* fd to watch */
|
||||
unsigned int average_rate_window; /* time window in seconds for average rate calculations */
|
||||
unsigned int width; /* screen width */
|
||||
unsigned int height; /* screen height */
|
||||
unsigned int argc; /* number of non-option arguments */
|
||||
unsigned int argv_length; /* allocated array size */
|
||||
bool do_nothing; /* exit-without-doing-anything flag */
|
||||
bool progress; /* progress bar flag */
|
||||
bool timer; /* timer flag */
|
||||
@@ -36,41 +63,22 @@ struct opts_s { /* structure describing run-time options */
|
||||
bool bits; /* report transfer size in bits */
|
||||
bool decimal_units; /* decimal prefix flag */
|
||||
bool bufpercent; /* transfer buffer percentage flag */
|
||||
size_t lastwritten; /* show N bytes last written */
|
||||
bool force; /* force-if-not-terminal flag */
|
||||
bool cursor; /* whether to use cursor positioning */
|
||||
bool numeric; /* numeric output only */
|
||||
bool wait; /* wait for transfer before display */
|
||||
bool rate_gauge; /* if size unknown, show rate vs max rate */
|
||||
bool linemode; /* count lines instead of bytes */
|
||||
bool null_terminated_lines; /* lines are null-terminated */
|
||||
bool no_display; /* do nothing other than pipe data */
|
||||
off_t rate_limit; /* rate limit, in bytes per second */
|
||||
size_t buffer_size; /* buffer size, in bytes (0=default) */
|
||||
unsigned int remote; /* PID of pv to update settings of */
|
||||
off_t size; /* total size of data */
|
||||
bool no_splice; /* flag set if never to use splice */
|
||||
unsigned int skip_errors; /* skip read errors counter */
|
||||
off_t error_skip_block; /* skip block size, 0 for adaptive */
|
||||
bool stop_at_size; /* set if we stop at "size" bytes */
|
||||
bool sync_after_write; /* set if we sync after every write */
|
||||
bool direct_io; /* set if O_DIRECT is to be used */
|
||||
bool discard_input; /* set to write nothing to output */
|
||||
double interval; /* interval between updates */
|
||||
double delay_start; /* delay before first display */
|
||||
pid_t watch_pid; /* process to watch fds of */
|
||||
int watch_fd; /* fd to watch */
|
||||
/*@keep@*/ /*@null@*/ char *output; /* fd to write output to */
|
||||
unsigned int average_rate_window; /* time window in seconds for average rate calculations */
|
||||
unsigned int width; /* screen width */
|
||||
unsigned int height; /* screen height */
|
||||
bool show_stats; /* set to write statistics at the end */
|
||||
bool width_set_manually; /* width was set manually, not detected */
|
||||
bool height_set_manually; /* height was set manually, not detected */
|
||||
/*@keep@*/ /*@null@*/ char *name; /* display name, if any */
|
||||
/*@keep@*/ /*@null@*/ char *format; /* output format, if any */
|
||||
/*@keep@*/ /*@null@*/ char *pidfile; /* PID file, if any */
|
||||
unsigned int argc; /* number of non-option arguments */
|
||||
/*@keep@*/ /*@null@*/ const char **argv; /* array of non-option arguments */
|
||||
unsigned int argv_length; /* allocated array size */
|
||||
};
|
||||
|
||||
/*@-exportlocal@*/
|
||||
|
||||
+104
-59
@@ -49,6 +49,7 @@ typedef enum {
|
||||
#define MAX_WRITE_AT_ONCE (size_t) 524288 /* max to write() in one go */
|
||||
#define TRANSFER_READ_TIMEOUT 0.09L /* seconds to time reads out at */
|
||||
#define TRANSFER_WRITE_TIMEOUT 0.9L /* seconds to time writes out at */
|
||||
#define MAX_LINE_POSITIONS 100000 /* number of lines to remember positions of */
|
||||
|
||||
#define MAXIMISE_BUFFER_FILL 1
|
||||
|
||||
@@ -75,6 +76,8 @@ struct pvcursorstate_s {
|
||||
|
||||
/*
|
||||
* Structure for holding PV internal state. Opaque outside the PV library.
|
||||
*
|
||||
* In general, members are ordered by size, to minimise padding.
|
||||
*/
|
||||
struct pvstate_s {
|
||||
/******************
|
||||
@@ -91,62 +94,57 @@ struct pvstate_s {
|
||||
* Input files *
|
||||
***************/
|
||||
struct {
|
||||
unsigned int file_count; /* number of input files */
|
||||
/*@only@*/ /*@null@*/ char **filename; /* input filenames */
|
||||
unsigned int file_count; /* number of input files */
|
||||
} files;
|
||||
|
||||
/*******************
|
||||
* Program control *
|
||||
*******************/
|
||||
struct {
|
||||
char default_format[PV_SIZEOF_DEFAULT_FORMAT]; /* default format string */
|
||||
double interval; /* interval between updates */
|
||||
double delay_start; /* delay before first display */
|
||||
/*@only@*/ /*@null@*/ char *name; /* display name */
|
||||
/*@only@*/ /*@null@*/ char *format_string; /* output format string */
|
||||
/*@null@*/ char *output_name; /* name of the output, for diagnostics */
|
||||
off_t error_skip_block; /* skip block size, 0 for adaptive */
|
||||
off_t rate_limit; /* rate limit, in bytes per second */
|
||||
size_t target_buffer_size; /* buffer size (0=default) */
|
||||
off_t size; /* total size of data */
|
||||
pid_t watch_pid; /* process to watch fds of */
|
||||
unsigned int skip_errors; /* skip read errors counter */
|
||||
int watch_fd; /* fd to watch */
|
||||
int output_fd; /* fd to write output to */
|
||||
unsigned int average_rate_window; /* time window in seconds for average rate calculations */
|
||||
unsigned int history_interval; /* seconds between each average rate calc history entry */
|
||||
unsigned int width; /* screen width */
|
||||
unsigned int height; /* screen height */
|
||||
bool force; /* display even if not on terminal */
|
||||
bool cursor; /* use cursor positioning */
|
||||
bool numeric; /* numeric output only */
|
||||
bool wait; /* wait for data before display */
|
||||
bool rate_gauge; /* if size unknown, show rate vs max rate */
|
||||
bool linemode; /* count lines instead of bytes */
|
||||
bool bits; /* report bits instead of bytes */
|
||||
bool decimal_units; /* use decimal prefixes */
|
||||
bool null_terminated_lines; /* lines are null-terminated */
|
||||
bool no_display; /* do nothing other than pipe data */
|
||||
unsigned int skip_errors; /* skip read errors counter */
|
||||
off_t error_skip_block; /* skip block size, 0 for adaptive */
|
||||
bool stop_at_size; /* set if we stop at "size" bytes */
|
||||
bool sync_after_write; /* set if we sync after every write */
|
||||
bool direct_io; /* set if O_DIRECT is to be used */
|
||||
bool direct_io_changed; /* set when direct_io is changed */
|
||||
bool no_splice; /* never use splice() */
|
||||
bool discard_input; /* write nothing to stdout */
|
||||
off_t rate_limit; /* rate limit, in bytes per second */
|
||||
size_t target_buffer_size; /* buffer size (0=default) */
|
||||
off_t size; /* total size of data */
|
||||
double interval; /* interval between updates */
|
||||
double delay_start; /* delay before first display */
|
||||
pid_t watch_pid; /* process to watch fds of */
|
||||
int watch_fd; /* fd to watch */
|
||||
int output_fd; /* fd to write output to */
|
||||
/*@null@*/ char *output_name; /* name of the output, for diagnostics */
|
||||
unsigned int average_rate_window; /* time window in seconds for average rate calculations */
|
||||
unsigned int width; /* screen width */
|
||||
unsigned int height; /* screen height */
|
||||
bool show_stats; /* show statistics on exit */
|
||||
bool width_set_manually; /* width was set manually, not detected */
|
||||
bool height_set_manually; /* height was set manually, not detected */
|
||||
/*@only@*/ /*@null@*/ char *name; /* display name */
|
||||
char default_format[PV_SIZEOF_DEFAULT_FORMAT]; /* default format string */
|
||||
/*@only@*/ /*@null@*/ char *format_string; /* output format string */
|
||||
} control;
|
||||
|
||||
/*******************
|
||||
* Signal handling *
|
||||
*******************/
|
||||
struct {
|
||||
int old_stderr; /* see pv_sig_ttou() */
|
||||
bool pv_tty_tostop_added; /* whether we had to set TOSTOP on the terminal */
|
||||
struct timespec tstp_time; /* see pv_sig_tstp() / __cont() */
|
||||
struct timespec toffset; /* total time spent stopped */
|
||||
#ifdef SA_SIGINFO
|
||||
volatile sig_atomic_t rxusr2; /* whether SIGUSR2 was received */
|
||||
volatile pid_t sender; /* PID of sending process for SIGUSR2 */
|
||||
#endif
|
||||
/* old signal handlers to restore in pv_sig_fini(). */
|
||||
struct sigaction old_sigpipe;
|
||||
struct sigaction old_sigttou;
|
||||
@@ -160,6 +158,12 @@ struct pvstate_s {
|
||||
struct sigaction old_sigusr2;
|
||||
#endif
|
||||
struct sigaction old_sigalrm;
|
||||
struct timespec tstp_time; /* see pv_sig_tstp() / __cont() */
|
||||
struct timespec toffset; /* total time spent stopped */
|
||||
#ifdef SA_SIGINFO
|
||||
volatile sig_atomic_t rxusr2; /* whether SIGUSR2 was received */
|
||||
volatile pid_t sender; /* PID of sending process for SIGUSR2 */
|
||||
#endif
|
||||
} signal;
|
||||
|
||||
/*******************
|
||||
@@ -169,72 +173,95 @@ struct pvstate_s {
|
||||
volatile sig_atomic_t reparse_display; /* whether to re-check format string */
|
||||
volatile sig_atomic_t terminal_resized; /* whether we need to get term size again */
|
||||
volatile sig_atomic_t trigger_exit; /* whether we need to abort right now */
|
||||
volatile sig_atomic_t clear_tty_tostop_on_exit; /* whether to clear tty TOSTOP on exit */
|
||||
volatile sig_atomic_t suspend_stderr; /* whether writing to stderr is suspended */
|
||||
volatile sig_atomic_t skip_next_sigcont; /* whether to ignore the next SIGCONT */
|
||||
volatile sig_atomic_t pipe_closed; /* whether the output pipe was closed */
|
||||
} flag;
|
||||
|
||||
/*****************
|
||||
* Display state *
|
||||
*****************/
|
||||
struct {
|
||||
|
||||
struct { /* format string broken into display components */
|
||||
size_t str_start; /* for strings: start offset */
|
||||
size_t str_length; /* for strings: length */
|
||||
pv_display_component type; /* type of display component */
|
||||
} format[PV_FORMAT_ARRAY_MAX];
|
||||
|
||||
struct { /* display components */
|
||||
char content[PV_SIZEOF_COMPONENT_STR]; /* string to display */
|
||||
size_t length; /* number of bytes in string */
|
||||
bool required; /* true if included in format */
|
||||
} component[PV_COMPONENT__MAX];
|
||||
|
||||
char lastoutput_buffer[PV_SIZEOF_LASTOUTPUT_BUFFER];
|
||||
|
||||
/*@only@*/ /*@null@*/ char *display_buffer; /* buffer for display string */
|
||||
size_t display_buffer_size; /* size allocated to display buffer */
|
||||
size_t display_string_len; /* length of string in display buffer */
|
||||
off_t initial_offset; /* offset when first opened (when watching fds) */
|
||||
size_t lastoutput_length; /* number of last-output bytes to show */
|
||||
|
||||
size_t format_segment_count; /* number of format string segments */
|
||||
|
||||
unsigned int prev_screen_width; /* screen width last time we were called */
|
||||
bool display_visible; /* set once anything written to terminal */
|
||||
|
||||
int percentage; /* transfer percentage completion */
|
||||
} display;
|
||||
|
||||
/************************************
|
||||
* Calculated state of the transfer *
|
||||
************************************/
|
||||
struct {
|
||||
long double transfer_rate; /* calculated transfer rate */
|
||||
long double average_rate; /* calculated average transfer rate */
|
||||
|
||||
long double prev_elapsed_sec; /* elapsed sec at which rate last calculated */
|
||||
long double prev_rate; /* last calculated instantaneous transfer rate */
|
||||
long double prev_trans; /* bytes transferred since last rate calculation */
|
||||
long double prev_trans; /* amount transferred since last rate calculation */
|
||||
long double current_avg_rate; /* current average rate over last history intervals */
|
||||
|
||||
long double rate_min; /* minimum measured transfer rate */
|
||||
long double rate_max; /* maximum measured transfer rate */
|
||||
long double rate_sum; /* sum of all measured transfer rates */
|
||||
long double ratesquared_sum; /* sum of the squares of each transfer rate */
|
||||
unsigned long measurements_taken; /* how many times the rate was measured */
|
||||
|
||||
/* Keep track of progress over last intervals to compute current average rate. */
|
||||
/*@null@*/ struct { /* state at previous intervals (circular buffer) */
|
||||
long double elapsed_sec; /* time since start of transfer */
|
||||
off_t total_bytes; /* amount transferred by that time */
|
||||
off_t transferred; /* amount transferred by that time */
|
||||
} *history;
|
||||
size_t history_len; /* total size of history array */
|
||||
int history_interval; /* seconds between each history entry */
|
||||
size_t history_first; /* index of oldest entry */
|
||||
size_t history_last; /* index of newest entry */
|
||||
long double current_avg_rate; /* current average rate over last history intervals */
|
||||
|
||||
off_t initial_offset; /* offset when first opened (when watching fds) */
|
||||
off_t prev_transferred; /* total amount transferred when called last time */
|
||||
|
||||
size_t lastoutput_length; /* number of last-output bytes to show */
|
||||
char lastoutput_buffer[PV_SIZEOF_LASTOUTPUT_BUFFER];
|
||||
|
||||
size_t format_segment_count; /* number of format string segments */
|
||||
struct { /* format string broken into display components */
|
||||
pv_display_component type; /* type of display component */
|
||||
size_t str_start; /* for strings: start offset */
|
||||
size_t str_length; /* for strings: length */
|
||||
} format[PV_FORMAT_ARRAY_MAX];
|
||||
|
||||
struct { /* display components */
|
||||
bool required; /* true if included in format */
|
||||
char content[PV_SIZEOF_COMPONENT_STR]; /* string to display */
|
||||
size_t length; /* number of bytes in string */
|
||||
} component[PV_COMPONENT__MAX];
|
||||
|
||||
} display;
|
||||
int percentage; /* transfer percentage completion */
|
||||
} calc;
|
||||
|
||||
/********************
|
||||
* Cursor/IPC state *
|
||||
********************/
|
||||
struct {
|
||||
char lock_file[PV_SIZEOF_CRS_LOCK_FILE];
|
||||
#ifdef HAVE_IPC
|
||||
/*@keep@*/ /*@null@*/ struct pvcursorstate_s *shared; /* data shared between instances */
|
||||
int shmid; /* ID of our shared memory segment */
|
||||
int pvcount; /* number of `pv' processes in total */
|
||||
int pvmax; /* highest number of `pv's seen */
|
||||
/*@keep@*/ /*@null@*/ struct pvcursorstate_s *shared; /* data shared between instances */
|
||||
int y_lastread; /* last value of _y_top seen */
|
||||
int y_offset; /* our Y offset from this top position */
|
||||
int needreinit; /* counter if we need to reinit cursor pos */
|
||||
bool noipc; /* set if we can't use IPC */
|
||||
#endif /* HAVE_IPC */
|
||||
int lock_fd; /* fd of lockfile, -1 if none open */
|
||||
char lock_file[PV_SIZEOF_CRS_LOCK_FILE];
|
||||
int y_start; /* our initial Y coordinate */
|
||||
#ifdef HAVE_IPC
|
||||
bool noipc; /* set if we can't use IPC */
|
||||
#endif /* HAVE_IPC */
|
||||
} cursor;
|
||||
|
||||
/*******************
|
||||
@@ -256,11 +283,27 @@ struct pvstate_s {
|
||||
* will always be less than or equal to read_position.
|
||||
*/
|
||||
struct {
|
||||
long double elapsed_seconds; /* how long we have been transferring data for */
|
||||
/*@only@*/ /*@null@*/ char *transfer_buffer; /* data transfer buffer */
|
||||
size_t buffer_size; /* size of buffer */
|
||||
size_t read_position; /* amount of data in buffer */
|
||||
size_t write_position; /* buffered data written */
|
||||
|
||||
ssize_t to_write; /* max to write this time around */
|
||||
ssize_t written; /* bytes sent to stdout this time */
|
||||
|
||||
size_t written_but_not_consumed; /* bytes in the output pipe, unread */
|
||||
|
||||
off_t total_written; /* total bytes or lines written */
|
||||
off_t transferred; /* amount transferred (written - unconsumed) */
|
||||
|
||||
/* Keep track of line positions to backtrack written_but_not_consumed. */
|
||||
/*@null@*/ off_t *line_positions; /* line separator write positions (circular buffer) */
|
||||
size_t line_positions_capacity; /* total size of line position array */
|
||||
size_t line_positions_length; /* number of positions stored in array */
|
||||
size_t line_positions_head; /* index to use for next position */
|
||||
off_t last_output_position; /* write position last sent to output */
|
||||
|
||||
/*
|
||||
* While reading from a file descriptor we keep track of how
|
||||
* many times in a row we've seen errors
|
||||
@@ -276,9 +319,9 @@ struct pvstate_s {
|
||||
*
|
||||
* This way, we're treating each input file separately.
|
||||
*/
|
||||
int last_read_skip_fd;
|
||||
off_t read_errors_in_a_row;
|
||||
bool read_error_warning_shown;
|
||||
int last_read_skip_fd;
|
||||
/* read_error_warning_shown is defined below. */
|
||||
#ifdef HAVE_SPLICE
|
||||
/*
|
||||
* These variables are used to keep track of whether
|
||||
@@ -291,15 +334,12 @@ struct pvstate_s {
|
||||
int splice_failed_fd;
|
||||
bool splice_used;
|
||||
#endif
|
||||
ssize_t to_write; /* max to write this time around */
|
||||
ssize_t written; /* bytes sent to stdout this time */
|
||||
bool read_error_warning_shown;
|
||||
} transfer;
|
||||
};
|
||||
|
||||
|
||||
struct pvwatchfd_s {
|
||||
pid_t watch_pid; /* PID to watch */
|
||||
int watch_fd; /* fd to watch, -1 = not displayed */
|
||||
#ifdef __APPLE__
|
||||
#else
|
||||
char file_fdinfo[PV_SIZEOF_FILE_FDINFO]; /* path to /proc fdinfo file */
|
||||
@@ -313,18 +353,23 @@ struct pvwatchfd_s {
|
||||
off_t position; /* position last seen at */
|
||||
struct timespec start_time; /* time we started watching the fd */
|
||||
/*@null@*/ pvstate_t state; /* state object for flags and display */
|
||||
pid_t watch_pid; /* PID to watch */
|
||||
int watch_fd; /* fd to watch, -1 = not displayed */
|
||||
};
|
||||
typedef struct pvwatchfd_s *pvwatchfd_t;
|
||||
|
||||
void pv_error(pvstate_t, char *, ...);
|
||||
|
||||
int pv_main_loop(pvstate_t);
|
||||
void pv_display(pvstate_t, long double, off_t, off_t);
|
||||
void pv_calculate_transfer_rate(pvstate_t, bool);
|
||||
bool pv_format(pvstate_t, bool);
|
||||
void pv_display(pvstate_t, bool);
|
||||
ssize_t pv_transfer(pvstate_t, int, bool *, bool *, off_t, long *);
|
||||
int pv_next_file(pvstate_t, unsigned int, int);
|
||||
/*@out@*/ const char *pv_current_file_name(pvstate_t);
|
||||
|
||||
void pv_write_retry(int, const char *, size_t);
|
||||
void pv_tty_write(pvstate_t, const char *, size_t);
|
||||
|
||||
void pv_crs_fini(pvstate_t);
|
||||
void pv_crs_init(pvstate_t);
|
||||
|
||||
@@ -27,6 +27,7 @@ extern "C" {
|
||||
* Exit status bitmask values.
|
||||
*/
|
||||
#define PV_ERROREXIT_REMOTE_OR_PID 1
|
||||
#define PV_ERROREXIT_SAF 1 /* store and forward error */
|
||||
#define PV_ERROREXIT_ACCESS 2
|
||||
#define PV_ERROREXIT_OUROBOROS 4
|
||||
#define PV_ERROREXIT_TRANSITION 8
|
||||
@@ -78,6 +79,13 @@ extern unsigned int pv_getnum_count(const char *, bool);
|
||||
*/
|
||||
extern bool pv_getnum_check(const char *, pv_numtype);
|
||||
|
||||
/*
|
||||
* Return an integer representing the first amount as a percentage of the
|
||||
* second total, i.e. 100*amount/total. If the second value, the total, is
|
||||
* zero or less, return 0.
|
||||
*/
|
||||
extern int pv_percentage(off_t, const off_t);
|
||||
|
||||
/*
|
||||
* String handling wrappers.
|
||||
*/
|
||||
@@ -156,6 +164,11 @@ void pv_nanosleep(long long);
|
||||
*/
|
||||
extern /*@null@*/ /*@only@*/ pvstate_t pv_state_alloc(const char *);
|
||||
|
||||
/*
|
||||
* Clear the calculated parts of a state structure.
|
||||
*/
|
||||
extern void pv_state_reset(pvstate_t state);
|
||||
|
||||
/*
|
||||
* Set the formatting string, given a set of old-style formatting options.
|
||||
*/
|
||||
@@ -172,9 +185,11 @@ extern void pv_state_set_format(pvstate_t state, bool progress,
|
||||
*/
|
||||
extern void pv_state_force_set(pvstate_t, bool);
|
||||
extern void pv_state_cursor_set(pvstate_t, bool);
|
||||
extern void pv_state_show_stats_set(pvstate_t, bool);
|
||||
extern void pv_state_numeric_set(pvstate_t, bool);
|
||||
extern void pv_state_wait_set(pvstate_t, bool);
|
||||
extern void pv_state_delay_start_set(pvstate_t, double);
|
||||
extern void pv_state_rate_gauge_set(pvstate_t, bool);
|
||||
extern void pv_state_linemode_set(pvstate_t, bool);
|
||||
extern void pv_state_bits_set(pvstate_t, bool);
|
||||
extern void pv_state_decimal_units_set(pvstate_t, bool);
|
||||
|
||||
+11
-1
@@ -63,8 +63,18 @@ void debugging_output(const char *function, const char *file, int line, const ch
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Note that here we use gmtime() rather than localtime(), otherwise
|
||||
* we can get stuck in signal handlers - testing with "strace"
|
||||
* showed many cases where "pv </dev/zero | cat >/dev/null" being
|
||||
* paused and backgrounded would cause pv to be stuck in
|
||||
* futex_wait() inside a pv_sig_alrm() inside a pv_sig_cont(). The
|
||||
* backtrace mentioned many time zone conversion steps, and all of
|
||||
* that goes away with gmtime().
|
||||
*/
|
||||
|
||||
(void) time(&t);
|
||||
tm = localtime(&t);
|
||||
tm = gmtime(&t);
|
||||
tbuf[0] = '\0';
|
||||
if (0 == strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", tm)) {
|
||||
tbuf[0] = '\0';
|
||||
|
||||
@@ -319,6 +319,9 @@ void display_help(void)
|
||||
{ "-F", "--format", N_("FORMAT"),
|
||||
N_("set output format to FORMAT"),
|
||||
{ 0, 0, 0, 0} },
|
||||
{ "-v", "--stats", NULL,
|
||||
N_("output transfer statistics at the end"),
|
||||
{ 0, 0, 0, 0} },
|
||||
{ "-n", "--numeric", NULL,
|
||||
N_("output percentages, not visual information"),
|
||||
{ 0, 0, 0, 0} },
|
||||
@@ -335,6 +338,9 @@ void display_help(void)
|
||||
{ "-s", "--size", N_("SIZE"),
|
||||
N_("set estimated data size to SIZE bytes"),
|
||||
{ 0, 0, 0, 0} },
|
||||
{ "-g", "--gauge", NULL,
|
||||
N_("if size unknown, show rate vs max rate"),
|
||||
{ 0, 0, 0, 0} },
|
||||
{ "-l", "--line-mode", NULL,
|
||||
N_("count lines instead of bytes"),
|
||||
{ 0, 0, 0, 0} },
|
||||
@@ -390,6 +396,9 @@ void display_help(void)
|
||||
{ "-X", "--discard", NULL,
|
||||
N_("discard input instead of writing to output"),
|
||||
{ 0, 0, 0, 0} },
|
||||
{ "-U", "--store-and-forward", N_("FILE"),
|
||||
N_("write all input to FILE before writing to output"),
|
||||
{ 0, 0, 0, 0} },
|
||||
#ifdef SA_SIGINFO
|
||||
{ "-R", "--remote", N_("PID"),
|
||||
N_("update settings of process PID"),
|
||||
|
||||
+248
-93
@@ -25,6 +25,233 @@ int pv_remote_set(opts_t, pvstate_t);
|
||||
void pv_remote_init(void);
|
||||
void pv_remote_fini(void);
|
||||
|
||||
/*
|
||||
* Write a PID file, returning nonzero on error.
|
||||
*/
|
||||
static int pv__write_pidfile(opts_t opts)
|
||||
{
|
||||
char *pidfile_tmp_name;
|
||||
size_t pidfile_tmp_bufsize;
|
||||
int pidfile_tmp_fd;
|
||||
FILE *pidfile_tmp_fptr;
|
||||
mode_t prev_umask;
|
||||
|
||||
if (NULL == opts->pidfile)
|
||||
return 0;
|
||||
|
||||
pidfile_tmp_bufsize = 16 + strlen(opts->pidfile); /* flawfinder: ignore */
|
||||
/*
|
||||
* flawfinder rationale: pidfile was supplied as an argument
|
||||
* so we have to assume it is \0 terminated.
|
||||
*/
|
||||
pidfile_tmp_name = malloc(pidfile_tmp_bufsize);
|
||||
if (NULL == pidfile_tmp_name) {
|
||||
fprintf(stderr, "%s: %s\n", opts->program_name, strerror(errno));
|
||||
return PV_ERROREXIT_REMOTE_OR_PID;
|
||||
}
|
||||
memset(pidfile_tmp_name, 0, pidfile_tmp_bufsize);
|
||||
(void) pv_snprintf(pidfile_tmp_name, pidfile_tmp_bufsize, "%s.XXXXXX", opts->pidfile);
|
||||
|
||||
/*@-type@ *//* splint doesn't like mode_t */
|
||||
prev_umask = umask(0000); /* flawfinder: ignore */
|
||||
(void) umask(prev_umask | 0133); /* flawfinder: ignore */
|
||||
|
||||
/*@-unrecog@ *//* splint doesn't know mkstemp() */
|
||||
pidfile_tmp_fd = mkstemp(pidfile_tmp_name); /* flawfinder: ignore */
|
||||
/*@+unrecog@ */
|
||||
if (pidfile_tmp_fd < 0) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, pidfile_tmp_name, strerror(errno));
|
||||
(void) umask(prev_umask); /* flawfinder: ignore */
|
||||
free(pidfile_tmp_name);
|
||||
return PV_ERROREXIT_REMOTE_OR_PID;
|
||||
}
|
||||
|
||||
(void) umask(prev_umask); /* flawfinder: ignore */
|
||||
|
||||
/*
|
||||
* flawfinder rationale (umask, mkstemp) - flawfinder
|
||||
* recommends setting the most restrictive umask possible
|
||||
* when calling mkstemp(), so this is what we have done.
|
||||
*
|
||||
* We get the original umask and OR it with 0133 to make
|
||||
* sure new files will be at least chmod 644. Then we put
|
||||
* the umask back to what it was, after creating the
|
||||
* temporary file.
|
||||
*/
|
||||
|
||||
/*@+type@ */
|
||||
|
||||
pidfile_tmp_fptr = fdopen(pidfile_tmp_fd, "w");
|
||||
if (NULL == pidfile_tmp_fptr) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, pidfile_tmp_name, strerror(errno));
|
||||
(void) close(pidfile_tmp_fd);
|
||||
(void) remove(pidfile_tmp_name);
|
||||
free(pidfile_tmp_name);
|
||||
return PV_ERROREXIT_REMOTE_OR_PID;
|
||||
}
|
||||
|
||||
fprintf(pidfile_tmp_fptr, "%d\n", getpid());
|
||||
if (0 != fclose(pidfile_tmp_fptr)) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, opts->pidfile, strerror(errno));
|
||||
}
|
||||
|
||||
if (rename(pidfile_tmp_name, opts->pidfile) < 0) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, opts->pidfile, strerror(errno));
|
||||
(void) remove(pidfile_tmp_name);
|
||||
}
|
||||
|
||||
free(pidfile_tmp_name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set the output file, if applicable. Returns nonzero on error.
|
||||
*/
|
||||
static int pv__set_output(pvstate_t state, opts_t opts, /*@null@ */ const char *output_file)
|
||||
{
|
||||
int output_fd;
|
||||
|
||||
if ((NULL == state) || (NULL == opts))
|
||||
return 0;
|
||||
|
||||
if (NULL == output_file || 0 == strcmp(output_file, "-")) {
|
||||
pv_state_output_set(state, STDOUT_FILENO, "(stdout)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
output_fd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, 0600); /* flawfinder: ignore */
|
||||
/*
|
||||
* flawfinder rationale: the output filename has been
|
||||
* explicitly provided, and in many cases the operator will
|
||||
* want to write to device files and other special
|
||||
* destinations, so there is no sense-checking we can do to
|
||||
* make this safer.
|
||||
*/
|
||||
if (output_fd < 0) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, output_file, strerror(errno));
|
||||
return PV_ERROREXIT_ACCESS;
|
||||
}
|
||||
|
||||
pv_state_output_set(state, output_fd, output_file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Run in store-and-forward mode: run the main loop once with the output
|
||||
* forced to the store-and-forward file (taking care of creation and removal
|
||||
* of a temporary file if "-" was specified); then run the main loop again
|
||||
* with the input file list forced to be just the store-and-forward file.
|
||||
* Returns nonzero on error.
|
||||
*/
|
||||
static int pv__store_and_forward(pvstate_t state, opts_t opts, bool can_have_eta)
|
||||
{
|
||||
char tmp_filename[4096]; /* flawfinder: ignore */
|
||||
bool use_temporary_file;
|
||||
char *real_store_and_forward_file;
|
||||
int retcode;
|
||||
|
||||
/* flawfinder: zeroed with memset and bounded by pv_snprintf. */
|
||||
|
||||
if ((NULL == state) || (NULL == opts) || (NULL == opts->store_and_forward_file))
|
||||
return 0;
|
||||
|
||||
memset(tmp_filename, 0, sizeof(tmp_filename));
|
||||
|
||||
use_temporary_file = false;
|
||||
if (0 == strcmp(opts->store_and_forward_file, "-"))
|
||||
use_temporary_file = true;
|
||||
|
||||
/*
|
||||
* Create a temporary file if the specified file was "-".
|
||||
*/
|
||||
if (use_temporary_file) {
|
||||
char *tmpdir;
|
||||
int tmp_fd;
|
||||
|
||||
tmpdir = (char *) getenv("TMPDIR"); /* flawfinder: ignore */
|
||||
if ((NULL == tmpdir) || ('\0' == tmpdir[0]))
|
||||
tmpdir = (char *) getenv("TMP"); /* flawfinder: ignore */
|
||||
if ((NULL == tmpdir) || ('\0' == tmpdir[0]))
|
||||
tmpdir = "/tmp";
|
||||
|
||||
/*
|
||||
* flawfinder rationale: null and zero-size values of $TMPDIR and
|
||||
* $TMP are rejected, and the destination buffer is bounded.
|
||||
*/
|
||||
|
||||
(void) pv_snprintf(tmp_filename, sizeof(tmp_filename), "%s/pv.XXXXXX", tmpdir);
|
||||
/*@-unrecog@ *//* splint doesn't know mkstemp() */
|
||||
tmp_fd = mkstemp(tmp_filename); /* flawfinder: ignore */
|
||||
/*@+unrecog@ */
|
||||
if (tmp_fd < 0) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, tmp_filename, strerror(errno));
|
||||
return PV_ERROREXIT_SAF;
|
||||
}
|
||||
(void) close(tmp_fd);
|
||||
}
|
||||
|
||||
/*
|
||||
* Real store-and-forward file: either the one we were given, or the
|
||||
* temporary file we created if we were given "-".
|
||||
*/
|
||||
real_store_and_forward_file = use_temporary_file ? tmp_filename : opts->store_and_forward_file;
|
||||
|
||||
/*
|
||||
* First, set the output file to the store-and-forward file.
|
||||
*/
|
||||
debug("%s: %s", "setting output to store-and-forward file", real_store_and_forward_file);
|
||||
retcode = pv__set_output(state, opts, real_store_and_forward_file);
|
||||
if (0 != retcode)
|
||||
goto end_store_and_forward;
|
||||
|
||||
/* Reset the formatting to set the displayed name to "(input)". */
|
||||
/*@-mustfreefresh@ */
|
||||
pv_state_set_format(state, opts->progress, opts->timer, can_have_eta ? opts->eta : false,
|
||||
can_have_eta ? opts->fineta : false, opts->rate, opts->average_rate,
|
||||
opts->bytes, opts->bufpercent, opts->lastwritten, _("(input)"));
|
||||
/*@+mustfreefresh@ *//* see below about gettext _() calls. */
|
||||
|
||||
/* Run the main loop as normal. */
|
||||
debug("%s", "running store-and-forward receiver");
|
||||
retcode = pv_main_loop(state);
|
||||
if (0 != retcode)
|
||||
goto end_store_and_forward;
|
||||
|
||||
/* Set the output file back to what it originally was. */
|
||||
debug("%s: %s", "setting output to original value", NULL == opts->output ? "(null)" : opts->output);
|
||||
retcode = pv__set_output(state, opts, opts->output);
|
||||
if (0 != retcode)
|
||||
goto end_store_and_forward;
|
||||
|
||||
/* Replace the list of input files with the store-and-forward file. */
|
||||
debug("%s", "resetting input file list");
|
||||
pv_state_inputfiles(state, 1, (const char **) &real_store_and_forward_file);
|
||||
|
||||
/* Recalculate the input size. */
|
||||
pv_state_size_set(state, pv_calc_total_size(state));
|
||||
|
||||
/* Reset the format, since we might have been asked to show ETA. */
|
||||
pv_state_set_format(state, opts->progress, opts->timer, opts->eta,
|
||||
opts->fineta, opts->rate, opts->average_rate,
|
||||
opts->bytes, opts->bufpercent, opts->lastwritten, opts->name);
|
||||
|
||||
/* Reset calculated values in the state. */
|
||||
pv_state_reset(state);
|
||||
|
||||
/* Run the main loop again. */
|
||||
debug("%s", "running store-and-forward transmitter");
|
||||
retcode = pv_main_loop(state);
|
||||
|
||||
end_store_and_forward:
|
||||
if (use_temporary_file)
|
||||
(void) remove(tmp_filename);
|
||||
|
||||
return retcode;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Process command-line arguments and set option flags, then call functions
|
||||
@@ -35,6 +262,7 @@ int main(int argc, char **argv)
|
||||
/*@only@ */ opts_t opts = NULL;
|
||||
/*@only@ */ pvstate_t state = NULL;
|
||||
int retcode = 0;
|
||||
bool can_have_eta = true;
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
/* Initialise language translation. */
|
||||
@@ -96,80 +324,13 @@ int main(int argc, char **argv)
|
||||
* Write a PID file if -P was specified.
|
||||
*/
|
||||
if (opts->pidfile != NULL) {
|
||||
char *pidfile_tmp_name;
|
||||
size_t pidfile_tmp_bufsize;
|
||||
int pidfile_tmp_fd;
|
||||
FILE *pidfile_tmp_fptr;
|
||||
mode_t prev_umask;
|
||||
|
||||
pidfile_tmp_bufsize = 16 + strlen(opts->pidfile); /* flawfinder: ignore */
|
||||
/*
|
||||
* flawfinder rationale: pidfile was supplied as an argument
|
||||
* so we have to assume it is \0 terminated.
|
||||
*/
|
||||
pidfile_tmp_name = malloc(pidfile_tmp_bufsize);
|
||||
if (NULL == pidfile_tmp_name) {
|
||||
fprintf(stderr, "%s: %s\n", opts->program_name, strerror(errno));
|
||||
int pidfile_rc;
|
||||
pidfile_rc = pv__write_pidfile(opts);
|
||||
if (0 != pidfile_rc) {
|
||||
pv_state_free(state);
|
||||
opts_free(opts);
|
||||
return PV_ERROREXIT_REMOTE_OR_PID;
|
||||
return pidfile_rc;
|
||||
}
|
||||
memset(pidfile_tmp_name, 0, pidfile_tmp_bufsize);
|
||||
(void) pv_snprintf(pidfile_tmp_name, pidfile_tmp_bufsize, "%s.XXXXXX", opts->pidfile);
|
||||
|
||||
/*@-type@ *//* splint doesn't like mode_t */
|
||||
prev_umask = umask(0000); /* flawfinder: ignore */
|
||||
(void) umask(prev_umask | 0133); /* flawfinder: ignore */
|
||||
|
||||
/*@-unrecog@ *//* splint doesn't know mkstemp() */
|
||||
pidfile_tmp_fd = mkstemp(pidfile_tmp_name); /* flawfinder: ignore */
|
||||
/*@+unrecog@ */
|
||||
if (pidfile_tmp_fd < 0) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, pidfile_tmp_name, strerror(errno));
|
||||
(void) umask(prev_umask); /* flawfinder: ignore */
|
||||
free(pidfile_tmp_name);
|
||||
pv_state_free(state);
|
||||
opts_free(opts);
|
||||
return PV_ERROREXIT_REMOTE_OR_PID;
|
||||
}
|
||||
|
||||
(void) umask(prev_umask); /* flawfinder: ignore */
|
||||
|
||||
/*
|
||||
* flawfinder rationale (umask, mkstemp) - flawfinder
|
||||
* recommends setting the most restrictive umask possible
|
||||
* when calling mkstemp(), so this is what we have done.
|
||||
*
|
||||
* We get the original umask and OR it with 0133 to make
|
||||
* sure new files will be at least chmod 644. Then we put
|
||||
* the umask back to what it was, after creating the
|
||||
* temporary file.
|
||||
*/
|
||||
|
||||
/*@+type@ */
|
||||
|
||||
pidfile_tmp_fptr = fdopen(pidfile_tmp_fd, "w");
|
||||
if (NULL == pidfile_tmp_fptr) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, pidfile_tmp_name, strerror(errno));
|
||||
(void) close(pidfile_tmp_fd);
|
||||
(void) remove(pidfile_tmp_name);
|
||||
free(pidfile_tmp_name);
|
||||
pv_state_free(state);
|
||||
opts_free(opts);
|
||||
return PV_ERROREXIT_REMOTE_OR_PID;
|
||||
}
|
||||
|
||||
fprintf(pidfile_tmp_fptr, "%d\n", getpid());
|
||||
if (0 != fclose(pidfile_tmp_fptr)) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, opts->pidfile, strerror(errno));
|
||||
}
|
||||
|
||||
if (rename(pidfile_tmp_name, opts->pidfile) < 0) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, opts->pidfile, strerror(errno));
|
||||
(void) remove(pidfile_tmp_name);
|
||||
}
|
||||
|
||||
free(pidfile_tmp_name);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -246,24 +407,11 @@ int main(int argc, char **argv)
|
||||
* calculation looks at the output file if the input size can't be
|
||||
* calculated (issue #91).
|
||||
*/
|
||||
if (NULL == opts->output || 0 == strcmp(opts->output, "-")) {
|
||||
pv_state_output_set(state, STDOUT_FILENO, "(stdout)");
|
||||
} else {
|
||||
int fd = open(opts->output, O_WRONLY | O_CREAT | O_TRUNC, 0600); /* flawfinder: ignore */
|
||||
/*
|
||||
* flawfinder rationale: the output filename has been
|
||||
* explicitly provided, and in many cases the operator will
|
||||
* want to write to device files and other special
|
||||
* destinations, so there is no sense-checking we can do to
|
||||
* make this safer.
|
||||
*/
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "%s: %s: %s\n", opts->program_name, opts->output, strerror(errno));
|
||||
pv_state_free(state);
|
||||
opts_free(opts);
|
||||
return PV_ERROREXIT_ACCESS;
|
||||
}
|
||||
pv_state_output_set(state, fd, opts->output);
|
||||
retcode = pv__set_output(state, opts, opts->output);
|
||||
if (0 != retcode) {
|
||||
pv_state_free(state);
|
||||
opts_free(opts);
|
||||
return retcode;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -290,7 +438,7 @@ int main(int argc, char **argv)
|
||||
* If the size is unknown, we cannot have an ETA.
|
||||
*/
|
||||
if (opts->size < 1) {
|
||||
opts->eta = false;
|
||||
can_have_eta = false;
|
||||
debug("%s", "size unknown - ETA disabled");
|
||||
}
|
||||
}
|
||||
@@ -306,9 +454,11 @@ int main(int argc, char **argv)
|
||||
pv_state_no_display_set(state, opts->no_display);
|
||||
pv_state_force_set(state, opts->force);
|
||||
pv_state_cursor_set(state, opts->cursor);
|
||||
pv_state_show_stats_set(state, opts->show_stats);
|
||||
pv_state_numeric_set(state, opts->numeric);
|
||||
pv_state_wait_set(state, opts->wait);
|
||||
pv_state_delay_start_set(state, opts->delay_start);
|
||||
pv_state_rate_gauge_set(state, opts->rate_gauge);
|
||||
pv_state_linemode_set(state, opts->linemode);
|
||||
pv_state_bits_set(state, opts->bits);
|
||||
pv_state_decimal_units_set(state, opts->decimal_units);
|
||||
@@ -328,19 +478,24 @@ int main(int argc, char **argv)
|
||||
pv_state_watch_fd_set(state, opts->watch_fd);
|
||||
pv_state_average_rate_window_set(state, opts->average_rate_window);
|
||||
|
||||
pv_state_set_format(state, opts->progress, opts->timer, opts->eta,
|
||||
opts->fineta, opts->rate, opts->average_rate,
|
||||
pv_state_set_format(state, opts->progress, opts->timer, can_have_eta ? opts->eta : false,
|
||||
can_have_eta ? opts->fineta : false, opts->rate, opts->average_rate,
|
||||
opts->bytes, opts->bufpercent, opts->lastwritten, opts->name);
|
||||
|
||||
/* Initialise the signal handling. */
|
||||
pv_sig_init(state);
|
||||
|
||||
/* Run the appropriate main loop. */
|
||||
if (0 == opts->watch_pid) {
|
||||
if (0 == opts->watch_pid && NULL == opts->store_and_forward_file) {
|
||||
/* Normal "transfer data" mode. */
|
||||
pv_remote_init();
|
||||
retcode = pv_main_loop(state);
|
||||
pv_remote_fini();
|
||||
} else if (0 == opts->watch_pid && NULL != opts->store_and_forward_file) {
|
||||
/* Store-and-forward transfer mode. */
|
||||
pv_remote_init();
|
||||
retcode = pv__store_and_forward(state, opts, can_have_eta);
|
||||
pv_remote_fini();
|
||||
} else if (0 != opts->watch_pid && -1 == opts->watch_fd) {
|
||||
/* "Watch all file descriptors of another process" mode. */
|
||||
retcode = pv_watchpid_loop(state);
|
||||
|
||||
+20
-1
@@ -55,6 +55,8 @@ void opts_free( /*@only@ */ opts_t opts)
|
||||
free(opts->pidfile);
|
||||
if (NULL != opts->output)
|
||||
free(opts->output);
|
||||
if (NULL != opts->store_and_forward_file)
|
||||
free(opts->store_and_forward_file);
|
||||
if (NULL != opts->argv)
|
||||
free(opts->argv);
|
||||
/*@+keeptrans@ */
|
||||
@@ -283,6 +285,7 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
{ "wait", 0, NULL, (int) 'W' },
|
||||
{ "delay-start", 1, NULL, (int) 'D' },
|
||||
{ "size", 1, NULL, (int) 's' },
|
||||
{ "gauge", 0, NULL, (int) 'g' },
|
||||
{ "line-mode", 0, NULL, (int) 'l' },
|
||||
{ "null", 0, NULL, (int) '0' },
|
||||
{ "interval", 1, NULL, (int) 'i' },
|
||||
@@ -290,6 +293,7 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
{ "height", 1, NULL, (int) 'H' },
|
||||
{ "name", 1, NULL, (int) 'N' },
|
||||
{ "format", 1, NULL, (int) 'F' },
|
||||
{ "stats", 0, NULL, (int) 'v' },
|
||||
{ "rate-limit", 1, NULL, (int) 'L' },
|
||||
{ "buffer-size", 1, NULL, (int) 'B' },
|
||||
{ "no-splice", 0, NULL, (int) 'C' },
|
||||
@@ -299,6 +303,7 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
{ "sync", 0, NULL, (int) 'Y' },
|
||||
{ "direct-io", 0, NULL, (int) 'K' },
|
||||
{ "discard", 0, NULL, (int) 'X' },
|
||||
{ "store-and-forward", 1, NULL, (int) 'U' },
|
||||
{ "remote", 1, NULL, (int) 'R' },
|
||||
{ "pidfile", 1, NULL, (int) 'P' },
|
||||
{ "watchfd", 1, NULL, (int) 'd' },
|
||||
@@ -312,7 +317,7 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
/*@+nullassign@ */
|
||||
int option_index = 0;
|
||||
#endif /* HAVE_GETOPT_LONG */
|
||||
char *short_options = "hVpteIrab8kTA:fnqcWD:s:l0i:w:H:N:F:L:B:CEZ:SYKXR:P:d:m:o:"
|
||||
char *short_options = "hVpteIrab8kTA:fvnqcWD:s:gl0i:w:H:N:F:L:B:CEZ:SYKXU:R:P:d:m:o:"
|
||||
#ifdef ENABLE_DEBUGGING
|
||||
"!:"
|
||||
#endif
|
||||
@@ -512,6 +517,9 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
case 'f':
|
||||
opts->force = true;
|
||||
break;
|
||||
case 'v':
|
||||
opts->show_stats = true;
|
||||
break;
|
||||
case 'n':
|
||||
opts->numeric = true;
|
||||
numopts++;
|
||||
@@ -542,6 +550,9 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'g':
|
||||
opts->rate_gauge = true;
|
||||
break;
|
||||
case 'l':
|
||||
opts->linemode = true;
|
||||
break;
|
||||
@@ -597,6 +608,14 @@ opts_t opts_parse(unsigned int argc, char **argv)
|
||||
opts->discard_input = true;
|
||||
opts->no_splice = true;
|
||||
break;
|
||||
case 'U':
|
||||
opts->store_and_forward_file = pv_strdup(optarg);
|
||||
if (NULL == opts->store_and_forward_file) {
|
||||
fprintf(stderr, "%s: -U: %s\n", opts->program_name, strerror(errno));
|
||||
opts_free(opts);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 'R':
|
||||
opts->remote = pv_getnum_count(optarg, false);
|
||||
break;
|
||||
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
* Functions for updating the calculated state of the transfer.
|
||||
*
|
||||
* Copyright 2024 Andrew Wood
|
||||
*
|
||||
* License GPLv3+: GNU GPL version 3 or later; see `docs/COPYING'.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "pv.h"
|
||||
#include "pv-internal.h"
|
||||
|
||||
|
||||
/*
|
||||
* Update the current average rate, using a ring buffer of past transfer
|
||||
* positions - if this is the first entry, use the provided instantaneous
|
||||
* rate, otherwise calulate the average rate from the difference between the
|
||||
* current position + elapsed time pair, and the oldest pair in the buffer.
|
||||
*/
|
||||
static void pv__update_average_rate_history(pvstate_t state, long double rate)
|
||||
{
|
||||
size_t first = state->calc.history_first;
|
||||
size_t last = state->calc.history_last;
|
||||
long double last_elapsed;
|
||||
|
||||
if (NULL == state->calc.history)
|
||||
return;
|
||||
|
||||
last_elapsed = state->calc.history[last].elapsed_sec;
|
||||
|
||||
/*
|
||||
* Do nothing if this is not the first call but not enough time has
|
||||
* elapsed since the previous call yet.
|
||||
*/
|
||||
if ((last_elapsed > 0.0)
|
||||
&& (state->transfer.elapsed_seconds < (last_elapsed + state->control.history_interval)))
|
||||
return;
|
||||
|
||||
/*
|
||||
* If this is not the first call, add a new entry to the circular
|
||||
* buffer.
|
||||
*/
|
||||
if (last_elapsed > 0.0) {
|
||||
size_t len = state->calc.history_len;
|
||||
last = (last + 1) % len;
|
||||
state->calc.history_last = last;
|
||||
if (last == first) {
|
||||
first = (first + 1) % len;
|
||||
state->calc.history_first = first;
|
||||
}
|
||||
}
|
||||
|
||||
state->calc.history[last].elapsed_sec = state->transfer.elapsed_seconds;
|
||||
state->calc.history[last].transferred = state->transfer.transferred;
|
||||
|
||||
if (first == last) {
|
||||
state->calc.current_avg_rate = rate;
|
||||
} else {
|
||||
off_t bytes = (state->calc.history[last].transferred - state->calc.history[first].transferred);
|
||||
long double sec = (state->calc.history[last].elapsed_sec - state->calc.history[first].elapsed_sec);
|
||||
state->calc.current_avg_rate = (long double) bytes / sec;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Update all calculated transfer state (state->calc).
|
||||
*
|
||||
* If "final" is true, this is the final update, so
|
||||
* state->calc.transfer_rate and state->calc.average_rate are given as an
|
||||
* average over the whole transfer; otherwise they are the current transfer
|
||||
* rate and current average rate.
|
||||
*
|
||||
* The value of state->calc.percentage will reflect the percentage
|
||||
* completion if state->control.size is greater than zero, otherwise it will
|
||||
* increase by 2 each call and wrap at 200.
|
||||
*/
|
||||
void pv_calculate_transfer_rate(pvstate_t state, bool final)
|
||||
{
|
||||
off_t bytes_since_last;
|
||||
long double time_since_last, transfer_rate, average_rate;
|
||||
|
||||
/* Quick safety check - state must exist. */
|
||||
if (NULL == state)
|
||||
return;
|
||||
|
||||
bytes_since_last = 0;
|
||||
if (state->transfer.transferred >= 0) {
|
||||
bytes_since_last = state->transfer.transferred - state->calc.prev_transferred;
|
||||
state->calc.prev_transferred = state->transfer.transferred;
|
||||
}
|
||||
|
||||
/*
|
||||
* In case the time since the last update is very small, we keep
|
||||
* track of amount transferred since the last update, and just keep
|
||||
* adding to that until a reasonable amount of time has passed to
|
||||
* avoid rate spikes or division by zero.
|
||||
*/
|
||||
time_since_last = state->transfer.elapsed_seconds - state->calc.prev_elapsed_sec;
|
||||
if (time_since_last <= 0.01) {
|
||||
transfer_rate = state->calc.prev_rate;
|
||||
state->calc.prev_trans += bytes_since_last;
|
||||
} else {
|
||||
long double measured_rate;
|
||||
|
||||
transfer_rate = ((long double) bytes_since_last + state->calc.prev_trans) / time_since_last;
|
||||
measured_rate = transfer_rate;
|
||||
|
||||
state->calc.prev_elapsed_sec = state->transfer.elapsed_seconds;
|
||||
state->calc.prev_trans = 0;
|
||||
|
||||
if (state->control.bits)
|
||||
measured_rate = 8.0 * measured_rate;
|
||||
|
||||
if ((state->calc.measurements_taken < 1) || (measured_rate < state->calc.rate_min)) {
|
||||
state->calc.rate_min = measured_rate;
|
||||
}
|
||||
if (measured_rate > state->calc.rate_max) {
|
||||
state->calc.rate_max = measured_rate;
|
||||
}
|
||||
state->calc.rate_sum += measured_rate;
|
||||
state->calc.ratesquared_sum += (measured_rate * measured_rate);
|
||||
state->calc.measurements_taken++;
|
||||
}
|
||||
state->calc.prev_rate = transfer_rate;
|
||||
|
||||
/* Update history and current average rate for ETA. */
|
||||
pv__update_average_rate_history(state, transfer_rate);
|
||||
average_rate = state->calc.current_avg_rate;
|
||||
|
||||
/*
|
||||
* If this is the final update at the end of the transfer, we
|
||||
* recalculate the rate - and the average rate - across the whole
|
||||
* period of the transfer.
|
||||
*/
|
||||
if (final) {
|
||||
/* Safety check to avoid division by zero. */
|
||||
if (state->transfer.elapsed_seconds < 0.000001)
|
||||
state->transfer.elapsed_seconds = 0.000001;
|
||||
average_rate =
|
||||
(((long double) (state->transfer.transferred)) -
|
||||
((long double) state->display.initial_offset)) / (long double) (state->transfer.elapsed_seconds);
|
||||
transfer_rate = average_rate;
|
||||
}
|
||||
|
||||
state->calc.transfer_rate = transfer_rate;
|
||||
state->calc.average_rate = average_rate;
|
||||
|
||||
if (state->control.size <= 0) {
|
||||
/*
|
||||
* If we don't know the total size of the incoming data,
|
||||
* then for a percentage, we gradually increase the
|
||||
* percentage completion as data arrives, to a maximum of
|
||||
* 200, then reset it - we use this if we can't calculate
|
||||
* it, so that the numeric percentage output will go
|
||||
* 0%-100%, 100%-0%, 0%-100%, and so on.
|
||||
*/
|
||||
if (transfer_rate > 0)
|
||||
state->calc.percentage += 2;
|
||||
if (state->calc.percentage > 199)
|
||||
state->calc.percentage = 0;
|
||||
} else {
|
||||
state->calc.percentage = pv_percentage(state->transfer.transferred, state->control.size);
|
||||
}
|
||||
|
||||
/* Ensure the percentage is never negative or huge. */
|
||||
if (state->calc.percentage < 0)
|
||||
state->calc.percentage = 0;
|
||||
if (state->calc.percentage > 100000)
|
||||
state->calc.percentage = 100000;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
+17
-37
@@ -43,32 +43,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Write the given buffer to the given file descriptor, retrying until all
|
||||
* bytes have been written or an error has occurred.
|
||||
*/
|
||||
void pv_write_retry(int fd, const char *buf, size_t count)
|
||||
{
|
||||
while (count > 0) {
|
||||
ssize_t nwritten;
|
||||
|
||||
nwritten = write(fd, buf, count);
|
||||
|
||||
if (nwritten < 0) {
|
||||
if ((EINTR == errno) || (EAGAIN == errno)) {
|
||||
continue;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (nwritten < 1)
|
||||
return;
|
||||
|
||||
count -= nwritten;
|
||||
buf += nwritten;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Create a per-euid, per-tty, lockfile in ${TMPDIR:-${TMP:-/tmp}} for the
|
||||
* tty on the given file descriptor.
|
||||
@@ -437,8 +411,8 @@ void pv_crs_init(pvstate_t state)
|
||||
* If we have already set the terminal TOSTOP attribute, set the
|
||||
* flag in shared memory to let the other instances know.
|
||||
*/
|
||||
if ((!state->cursor.noipc) && state->signal.pv_tty_tostop_added && (NULL != state->cursor.shared)) {
|
||||
debug("%s", "propagating local pv_tty_tostop_added true value to shared flag");
|
||||
if ((!state->cursor.noipc) && (1 == state->flag.clear_tty_tostop_on_exit) && (NULL != state->cursor.shared)) {
|
||||
debug("%s", "propagating local clear_tty_tostop_on_exit true value to shared tty_tostop_added flag");
|
||||
state->cursor.shared->tty_tostop_added = true;
|
||||
}
|
||||
|
||||
@@ -462,7 +436,7 @@ void pv_crs_init(pvstate_t state)
|
||||
* initial ypos.
|
||||
*/
|
||||
if (state->cursor.y_start > 0)
|
||||
pv_write_retry(STDERR_FILENO, "\n", 1);
|
||||
pv_tty_write(state, "\n", 1);
|
||||
pv_crs_unlock(state, terminalfd);
|
||||
|
||||
if (state->cursor.y_start < 1)
|
||||
@@ -495,6 +469,11 @@ static void pv_crs_reinit(pvstate_t state)
|
||||
{
|
||||
debug("%s", "reinit");
|
||||
|
||||
if (1 == state->flag.suspend_stderr) {
|
||||
debug("%s", "reinit abandoned - stderr is suspended");
|
||||
return;
|
||||
}
|
||||
|
||||
pv_crs_lock(state, STDERR_FILENO);
|
||||
|
||||
state->cursor.needreinit--;
|
||||
@@ -589,9 +568,9 @@ void pv_crs_update(pvstate_t state, const char *output_line)
|
||||
memset(cup_cmd, 0, sizeof(cup_cmd));
|
||||
(void) pv_snprintf(cup_cmd, sizeof(cup_cmd), "\033[%u;1H", state->control.height);
|
||||
cup_cmd_length = strlen(cup_cmd); /* flawfinder: ignore */
|
||||
pv_write_retry(STDERR_FILENO, cup_cmd, cup_cmd_length);
|
||||
pv_tty_write(state, cup_cmd, cup_cmd_length);
|
||||
for (; offs > 0; offs--) {
|
||||
pv_write_retry(STDERR_FILENO, "\n", 1);
|
||||
pv_tty_write(state, "\n", 1);
|
||||
}
|
||||
|
||||
pv_crs_unlock(state, STDERR_FILENO);
|
||||
@@ -624,8 +603,8 @@ void pv_crs_update(pvstate_t state, const char *output_line)
|
||||
|
||||
pv_crs_lock(state, STDERR_FILENO);
|
||||
|
||||
pv_write_retry(STDERR_FILENO, cup_cmd, cup_cmd_length);
|
||||
pv_write_retry(STDERR_FILENO, output_line, output_line_length);
|
||||
pv_tty_write(state, cup_cmd, cup_cmd_length);
|
||||
pv_tty_write(state, output_line, output_line_length);
|
||||
|
||||
pv_crs_unlock(state, STDERR_FILENO);
|
||||
}
|
||||
@@ -664,7 +643,7 @@ void pv_crs_fini(pvstate_t state)
|
||||
|
||||
pv_crs_lock(state, STDERR_FILENO);
|
||||
|
||||
pv_write_retry(STDERR_FILENO, cup_cmd, strlen(cup_cmd)); /* flawfinder: ignore */
|
||||
pv_tty_write(state, cup_cmd, strlen(cup_cmd)); /* flawfinder: ignore */
|
||||
/* flawfinder - pv_snprintf() always \0-terminates (see above). */
|
||||
|
||||
#ifdef HAVE_IPC
|
||||
@@ -674,9 +653,10 @@ void pv_crs_fini(pvstate_t state)
|
||||
* it.
|
||||
*/
|
||||
if ((!state->cursor.noipc) && (NULL != state->cursor.shared) && state->cursor.shared->tty_tostop_added) {
|
||||
if (!state->signal.pv_tty_tostop_added) {
|
||||
debug("%s", "propagating shared tty_tostop_added true value to local flag");
|
||||
state->signal.pv_tty_tostop_added = true;
|
||||
if (0 == state->flag.clear_tty_tostop_on_exit) {
|
||||
debug("%s",
|
||||
"propagating shared tty_tostop_added true value to local clear_tty_tostop_on_exit flag");
|
||||
state->flag.clear_tty_tostop_on_exit = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+233
-262
@@ -66,7 +66,7 @@ bool pv_in_foreground(void)
|
||||
pid_t tty_process_group;
|
||||
|
||||
if (0 == isatty(STDERR_FILENO)) {
|
||||
debug("%s: true: %s", "pv_in_foreground", "not a tty");
|
||||
debug("true: %s", "not a tty");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -76,22 +76,77 @@ bool pv_in_foreground(void)
|
||||
/*@+type@ */
|
||||
|
||||
if (tty_process_group == -1 && errno == ENOTTY) {
|
||||
debug("%s: true: %s", "pv_in_foreground", "tty_process_group is -1, errno is ENOTTY");
|
||||
debug("true: %s", "tty_process_group is -1, errno is ENOTTY");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (our_process_group == tty_process_group) {
|
||||
debug("%s: true: %s", "pv_in_foreground", "our_process_group == tty_process_group");
|
||||
debug("true: %s (%d)", "our_process_group == tty_process_group", our_process_group);
|
||||
return true;
|
||||
}
|
||||
|
||||
debug("%s: false: our_process_group=%d, tty_process_group=%d",
|
||||
"pv_in_foreground", our_process_group, tty_process_group);
|
||||
/*
|
||||
* If the terminal process group ID doesn't match our own, assume
|
||||
* we're in the background.
|
||||
*/
|
||||
debug("false: our_process_group=%d, tty_process_group=%d", our_process_group, tty_process_group);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Write the given buffer to the given file descriptor, retrying until all
|
||||
* bytes have been written or an error has occurred.
|
||||
*/
|
||||
void pv_write_retry(int fd, const char *buf, size_t count)
|
||||
{
|
||||
while (count > 0) {
|
||||
ssize_t nwritten;
|
||||
|
||||
nwritten = write(fd, buf, count);
|
||||
|
||||
if (nwritten < 0) {
|
||||
if ((EINTR == errno) || (EAGAIN == errno)) {
|
||||
continue;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (nwritten < 1)
|
||||
return;
|
||||
|
||||
count -= nwritten;
|
||||
buf += nwritten;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Write the given buffer to the terminal, like pv_write_retry(), unless
|
||||
* stderr is suspended.
|
||||
*/
|
||||
void pv_tty_write(pvstate_t state, const char *buf, size_t count)
|
||||
{
|
||||
while (0 == state->flag.suspend_stderr && count > 0) {
|
||||
ssize_t nwritten;
|
||||
|
||||
nwritten = write(STDERR_FILENO, buf, count);
|
||||
|
||||
if (nwritten < 0) {
|
||||
if ((EINTR == errno) || (EAGAIN == errno)) {
|
||||
continue;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (nwritten < 1)
|
||||
return;
|
||||
|
||||
count -= nwritten;
|
||||
buf += nwritten;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Fill in *width and *height with the current terminal size,
|
||||
* if possible.
|
||||
@@ -113,21 +168,6 @@ void pv_screensize(unsigned int *width, unsigned int *height)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Calculate the percentage transferred so far and return it.
|
||||
*/
|
||||
static int pv__calc_percentage(off_t so_far, const off_t total)
|
||||
{
|
||||
if (total < 1)
|
||||
return 0;
|
||||
|
||||
so_far *= 100;
|
||||
so_far /= total;
|
||||
|
||||
return (int) so_far;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Given how many bytes have been transferred, the total byte count to
|
||||
* transfer, and the current average transfer rate, return the estimated
|
||||
@@ -422,15 +462,15 @@ static void pv__format_init(pvstate_t state)
|
||||
* with a particular length.
|
||||
*
|
||||
* A type other than PV_COMPONENT_STRING indicates that the segment
|
||||
* is a string updated by pv__format(), whose contents will be in
|
||||
* is a string updated by pv_format(), whose contents will be in
|
||||
* component[type].
|
||||
*
|
||||
* In pv__format(), the content of a PV_COMPONENT_PROGRESS component
|
||||
* In pv_format(), the content of a PV_COMPONENT_PROGRESS component
|
||||
* is calculated after first populating all the other components
|
||||
* referenced by the format segments.
|
||||
*
|
||||
* Then, pv_format() generates the output string by sticking all of
|
||||
* these segments together.
|
||||
* Then, that function generates the output string by sticking all
|
||||
* of these segments together.
|
||||
*/
|
||||
segment = 0;
|
||||
for (strpos = 0; formatstr[strpos] != '\0' && segment < PV_FORMAT_ARRAY_MAX; strpos++, segment++) {
|
||||
@@ -552,6 +592,7 @@ static void pv__format_init(pvstate_t state)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return the original value x so that it has been clamped between
|
||||
* [min..max]
|
||||
@@ -561,103 +602,41 @@ static long bound_long(long x, long min, long max)
|
||||
return x < min ? min : x > max ? max : x;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update the current average rate, using a ring buffer of past transfer
|
||||
* positions - if this is the first entry, use the provided instantaneous
|
||||
* rate, otherwise calulate the average rate from the difference between the
|
||||
* current position + elapsed time pair, and the oldest pair in the buffer.
|
||||
*/
|
||||
static void pv__update_average_rate_history(pvstate_t state, off_t total_bytes, long double elapsed_sec,
|
||||
long double rate)
|
||||
{
|
||||
size_t first = state->display.history_first;
|
||||
size_t last = state->display.history_last;
|
||||
long double last_elapsed;
|
||||
|
||||
if (NULL == state->display.history)
|
||||
return;
|
||||
|
||||
last_elapsed = state->display.history[last].elapsed_sec;
|
||||
|
||||
/*
|
||||
* Do nothing if this is not the first call but not enough time has
|
||||
* elapsed since the previous call yet.
|
||||
*/
|
||||
if ((last_elapsed > 0.0)
|
||||
&& (elapsed_sec < (last_elapsed + state->display.history_interval)))
|
||||
return;
|
||||
|
||||
/*
|
||||
* If this is not the first call, add a new entry to the circular
|
||||
* buffer.
|
||||
*/
|
||||
if (last_elapsed > 0.0) {
|
||||
size_t len = state->display.history_len;
|
||||
last = (last + 1) % len;
|
||||
state->display.history_last = last;
|
||||
if (last == first) {
|
||||
first = (first + 1) % len;
|
||||
state->display.history_first = first;
|
||||
}
|
||||
}
|
||||
|
||||
state->display.history[last].elapsed_sec = elapsed_sec;
|
||||
state->display.history[last].total_bytes = total_bytes;
|
||||
|
||||
if (first == last) {
|
||||
state->display.current_avg_rate = rate;
|
||||
} else {
|
||||
off_t bytes = (state->display.history[last].total_bytes - state->display.history[first].total_bytes);
|
||||
long double sec =
|
||||
(state->display.history[last].elapsed_sec - state->display.history[first].elapsed_sec);
|
||||
state->display.current_avg_rate = (long double) bytes / sec;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Update state->display.display_buffer with status information formatted
|
||||
* according to the state held within the given structure, where
|
||||
* "elapsed_sec" is the seconds elapsed since the transfer started,
|
||||
* "bytes_since_last" is the number of bytes transferred since the last
|
||||
* update, and "total_bytes" is the total number of bytes transferred so
|
||||
* far.
|
||||
* according to the state held within the given structure.
|
||||
*
|
||||
* If "bytes_since_last" is negative, this is the final update so the rate
|
||||
* is given as an an average over the whole transfer; otherwise the current
|
||||
* rate is shown.
|
||||
*
|
||||
* In line mode, "bytes_since_last" and "total_bytes" are in lines, not bytes.
|
||||
* If "final" is true, this is the final update so the rate is given as an
|
||||
* an average over the whole transfer; otherwise the current rate is shown.
|
||||
*
|
||||
* Returns true if the display buffer can be used, false if not.
|
||||
*
|
||||
* When returning true, this function will have also set
|
||||
* state->display.display_string_len to the length of the string in
|
||||
* state->display.display_buffer, in bytes.
|
||||
*
|
||||
* If "total_bytes" is negative, then free the display buffer and return
|
||||
* false.
|
||||
*/
|
||||
static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_since_last, off_t total_bytes)
|
||||
bool pv_format(pvstate_t state, bool final)
|
||||
{
|
||||
long double time_since_last, rate, average_rate;
|
||||
long eta;
|
||||
int static_portion_size;
|
||||
pv_display_component component_type;
|
||||
size_t segment;
|
||||
size_t new_display_string_len;
|
||||
const char *formatstr;
|
||||
pv__transfercount_t count_type;
|
||||
|
||||
/* Quick sanity check - state must exist. */
|
||||
/* Quick safety check - state must exist. */
|
||||
if (NULL == state)
|
||||
return false;
|
||||
|
||||
/* Negative total transfer - free memory and return false. */
|
||||
if (total_bytes < 0) {
|
||||
if (NULL != state->display.display_buffer)
|
||||
free(state->display.display_buffer);
|
||||
state->display.display_buffer = NULL;
|
||||
state->display.display_buffer_size = 0;
|
||||
return false;
|
||||
/*
|
||||
* If the display options need reparsing, do so to generate new
|
||||
* formatting parameters.
|
||||
*/
|
||||
if (0 != state->flag.reparse_display) {
|
||||
pv__format_init(state);
|
||||
state->flag.reparse_display = 0;
|
||||
}
|
||||
|
||||
/* The format string is needed for the static segments. */
|
||||
@@ -665,63 +644,12 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
if (NULL == formatstr)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* In case the time since the last update is very small, we keep
|
||||
* track of amount transferred since the last update, and just keep
|
||||
* adding to that until a reasonable amount of time has passed to
|
||||
* avoid rate spikes or division by zero.
|
||||
*/
|
||||
time_since_last = elapsed_sec - state->display.prev_elapsed_sec;
|
||||
if (time_since_last <= 0.01) {
|
||||
rate = state->display.prev_rate;
|
||||
state->display.prev_trans += bytes_since_last;
|
||||
} else {
|
||||
rate = ((long double) bytes_since_last + state->display.prev_trans) / time_since_last;
|
||||
state->display.prev_elapsed_sec = elapsed_sec;
|
||||
state->display.prev_trans = 0;
|
||||
}
|
||||
state->display.prev_rate = rate;
|
||||
|
||||
/* Update history and current average rate for ETA. */
|
||||
pv__update_average_rate_history(state, total_bytes, elapsed_sec, rate);
|
||||
average_rate = state->display.current_avg_rate;
|
||||
|
||||
/*
|
||||
* If this is the final update at the end of the transfer, we
|
||||
* recalculate the rate - and the average rate - across the whole
|
||||
* period of the transfer.
|
||||
*/
|
||||
if (bytes_since_last < 0) {
|
||||
/* Sanity check to avoid division by zero */
|
||||
if (elapsed_sec < 0.000001)
|
||||
elapsed_sec = 0.000001;
|
||||
average_rate =
|
||||
(((long double) total_bytes) -
|
||||
((long double) state->display.initial_offset)) / (long double) elapsed_sec;
|
||||
rate = average_rate;
|
||||
}
|
||||
|
||||
if (state->control.size <= 0) {
|
||||
/*
|
||||
* If we don't know the total size of the incoming data,
|
||||
* then for a percentage, we gradually increase the
|
||||
* percentage completion as data arrives, to a maximum of
|
||||
* 200, then reset it - we use this if we can't calculate
|
||||
* it, so that the numeric percentage output will go
|
||||
* 0%-100%, 100%-0%, 0%-100%, and so on.
|
||||
*/
|
||||
if (rate > 0)
|
||||
state->display.percentage += 2;
|
||||
if (state->display.percentage > 199)
|
||||
state->display.percentage = 0;
|
||||
} else if (state->control.numeric || state->display.component[PV_COMPONENT_PROGRESS].required) {
|
||||
/*
|
||||
* If we do know the total size, and we're going to show
|
||||
* the percentage (numeric mode or a progress bar),
|
||||
* calculate the percentage completion.
|
||||
*/
|
||||
state->display.percentage = pv__calc_percentage(total_bytes, state->control.size);
|
||||
}
|
||||
/* Determine the type of thing being counted for transfer, rate, etc. */
|
||||
count_type = PV_TRANSFERCOUNT_BYTES;
|
||||
if (state->control.linemode)
|
||||
count_type = PV_TRANSFERCOUNT_LINES;
|
||||
else if (state->control.decimal_units)
|
||||
count_type = PV_TRANSFERCOUNT_DECBYTES;
|
||||
|
||||
/*
|
||||
* Reallocate output buffer if width changes.
|
||||
@@ -759,37 +687,67 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
}
|
||||
|
||||
/*
|
||||
* In numeric output mode, our output is just a number.
|
||||
* In numeric output mode, our output is just the percentage
|
||||
* completion, as a number by itself.
|
||||
*
|
||||
* Patch from Sami Liedes:
|
||||
* With --timer we prefix the output with the elapsed time.
|
||||
* With --bytes we output the bytes transferred so far instead
|
||||
* of the percentage. (Or lines, if --lines was given with --bytes).
|
||||
* With --timer, we prefix the output with the elapsed time.
|
||||
*
|
||||
* With --bytes, we output the bytes transferred so far instead of
|
||||
* the percentage (or we output the number lines transferred, if
|
||||
* --lines was given with --bytes).
|
||||
*
|
||||
* With --rate was given, we output the current transfer rate
|
||||
* instead of the percentage. With --bytes as well, the rate is
|
||||
* given after the bytes/lines.
|
||||
*/
|
||||
if (state->control.numeric) {
|
||||
char numericprefix[128]; /* flawfinder: ignore - only populated by pv_snprintf(). */
|
||||
char msg_timer[128]; /* flawfinder: ignore */
|
||||
char msg_bytes[128]; /* flawfinder: ignore */
|
||||
char msg_rate[128]; /* flawfinder: ignore */
|
||||
char msg_percent[128]; /* flawfinder: ignore */
|
||||
bool first_item, show_percentage;
|
||||
|
||||
numericprefix[0] = '\0';
|
||||
/* flawfinder: each buffer is kept safe by pv_snprintf(). */
|
||||
|
||||
if (state->display.component[PV_COMPONENT_TIMER].required)
|
||||
(void) pv_snprintf(numericprefix, sizeof(numericprefix), "%.4Lf ", elapsed_sec);
|
||||
first_item = true;
|
||||
show_percentage = true;
|
||||
|
||||
if (state->display.component[PV_COMPONENT_BYTES].required) {
|
||||
if (state->control.bits) {
|
||||
(void) pv_snprintf(state->display.display_buffer,
|
||||
state->display.display_buffer_size,
|
||||
"%.99s%lld\n", numericprefix, (long long) (8 * total_bytes));
|
||||
} else {
|
||||
(void) pv_snprintf(state->display.display_buffer,
|
||||
state->display.display_buffer_size,
|
||||
"%.99s%lld\n", numericprefix, (long long) total_bytes);
|
||||
}
|
||||
} else {
|
||||
(void) pv_snprintf(state->display.display_buffer,
|
||||
state->display.display_buffer_size, "%.99s%ld\n", numericprefix,
|
||||
(long) (state->display.percentage));
|
||||
msg_timer[0] = '\0';
|
||||
if (state->display.component[PV_COMPONENT_TIMER].required) {
|
||||
(void) pv_snprintf(msg_timer, sizeof(msg_timer), "%s%.4Lf", first_item ? "" : " ",
|
||||
state->transfer.elapsed_seconds);
|
||||
first_item = false;
|
||||
}
|
||||
|
||||
msg_bytes[0] = '\0';
|
||||
if (state->display.component[PV_COMPONENT_BYTES].required) {
|
||||
(void) pv_snprintf(msg_bytes, sizeof(msg_bytes),
|
||||
"%s%lld", first_item ? "" : " ",
|
||||
(long long) ((state->control.bits ? 8 : 1) * state->transfer.transferred));
|
||||
first_item = false;
|
||||
show_percentage = false;
|
||||
}
|
||||
|
||||
msg_rate[0] = '\0';
|
||||
if (state->display.component[PV_COMPONENT_RATE].required) {
|
||||
(void) pv_snprintf(msg_rate, sizeof(msg_rate),
|
||||
"%s%.4Lf", first_item ? "" : " ",
|
||||
((state->control.bits ? 8.0 : 1.0) * state->calc.transfer_rate));
|
||||
first_item = false;
|
||||
show_percentage = false;
|
||||
}
|
||||
|
||||
msg_percent[0] = '\0';
|
||||
if (show_percentage) {
|
||||
(void) pv_snprintf(msg_percent, sizeof(msg_percent),
|
||||
"%s%d", first_item ? "" : " ", state->calc.percentage);
|
||||
first_item = false;
|
||||
}
|
||||
|
||||
(void) pv_snprintf(state->display.display_buffer,
|
||||
state->display.display_buffer_size, "%.39s%.39s%.39s%.39s\n", msg_timer, msg_bytes,
|
||||
msg_rate, msg_percent);
|
||||
|
||||
state->display.display_string_len = strlen(state->display.display_buffer); /* flawfinder: ignore */
|
||||
/* flawfinder: always \0 terminated by pv_snprintf(). */
|
||||
|
||||
@@ -807,12 +765,11 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
char *component_content;
|
||||
size_t component_buf_size;
|
||||
size_t buf_idx;
|
||||
bool show_eta;
|
||||
bool show_fineta;
|
||||
time_t now;
|
||||
time_t then;
|
||||
struct tm *time_ptr;
|
||||
char *time_format;
|
||||
pv__transfercount_t count_type;
|
||||
|
||||
if (!state->display.component[component_type].required)
|
||||
continue;
|
||||
@@ -833,12 +790,6 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
component_content[0] = '\0';
|
||||
component_buf_size = PV_SIZEOF_COMPONENT_STR;
|
||||
|
||||
count_type = PV_TRANSFERCOUNT_BYTES;
|
||||
if (state->control.linemode)
|
||||
count_type = PV_TRANSFERCOUNT_LINES;
|
||||
else if (state->control.decimal_units)
|
||||
count_type = PV_TRANSFERCOUNT_DECBYTES;
|
||||
|
||||
switch (component_type) {
|
||||
|
||||
case PV_COMPONENT_STRING:
|
||||
@@ -853,10 +804,10 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
/*@-mustfreefresh @ */
|
||||
if (state->control.bits && !state->control.linemode) {
|
||||
pv__sizestr(component_content, component_buf_size, "%s",
|
||||
(long double) total_bytes * 8, "", _("b"), count_type);
|
||||
(long double) (state->transfer.transferred * 8), "", _("b"), count_type);
|
||||
} else {
|
||||
pv__sizestr(component_content, component_buf_size, "%s",
|
||||
(long double) total_bytes, "", _("B"), count_type);
|
||||
(long double) (state->transfer.transferred), "", _("B"), count_type);
|
||||
}
|
||||
/*@+mustfreefresh @ */
|
||||
/* splint: we trust gettext() not to really leak memory. */
|
||||
@@ -869,26 +820,28 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
* does mean that the timer will stop at a 100,000 hours,
|
||||
* but since that's 11 years, it shouldn't be a problem.
|
||||
*/
|
||||
if (elapsed_sec > (long double) 360000000.0L)
|
||||
elapsed_sec = (long double) 360000000.0L;
|
||||
if (state->transfer.elapsed_seconds > (long double) 360000000.0L)
|
||||
state->transfer.elapsed_seconds = (long double) 360000000.0L;
|
||||
|
||||
/*
|
||||
* If the elapsed time is more than a day, include a day count as
|
||||
* well as hours, minutes, and seconds.
|
||||
*/
|
||||
if (elapsed_sec > (long double) 86400.0L) {
|
||||
if (state->transfer.elapsed_seconds > (long double) 86400.0L) {
|
||||
(void) pv_snprintf(component_content,
|
||||
component_buf_size,
|
||||
"%ld:%02ld:%02ld:%02ld",
|
||||
((long) elapsed_sec) / 86400,
|
||||
(((long) elapsed_sec) / 3600) %
|
||||
24, (((long) elapsed_sec) / 60) % 60, ((long) elapsed_sec) % 60);
|
||||
((long) (state->transfer.elapsed_seconds)) / 86400,
|
||||
(((long) (state->transfer.elapsed_seconds)) / 3600) %
|
||||
24, (((long) (state->transfer.elapsed_seconds)) / 60) % 60,
|
||||
((long) (state->transfer.elapsed_seconds)) % 60);
|
||||
} else {
|
||||
(void) pv_snprintf(component_content,
|
||||
component_buf_size,
|
||||
"%ld:%02ld:%02ld",
|
||||
((long) elapsed_sec) / 3600,
|
||||
(((long) elapsed_sec) / 60) % 60, ((long) elapsed_sec) % 60);
|
||||
((long) (state->transfer.elapsed_seconds)) / 3600,
|
||||
(((long) (state->transfer.elapsed_seconds)) / 60) % 60,
|
||||
((long) (state->transfer.elapsed_seconds)) % 60);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -897,12 +850,12 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
/*@-mustfreefresh @ */
|
||||
if (state->control.bits && !state->control.linemode) {
|
||||
/* bits per second */
|
||||
pv__sizestr(component_content, component_buf_size, "[%s]", 8 * rate, "", _("b/s"),
|
||||
count_type);
|
||||
pv__sizestr(component_content, component_buf_size, "[%s]",
|
||||
8 * state->calc.transfer_rate, "", _("b/s"), count_type);
|
||||
} else {
|
||||
/* bytes or lines per second */
|
||||
pv__sizestr(component_content, component_buf_size,
|
||||
"[%s]", rate, _("/s"), _("B/s"), count_type);
|
||||
"[%s]", state->calc.transfer_rate, _("/s"), _("B/s"), count_type);
|
||||
}
|
||||
/*@+mustfreefresh @ *//* splint: see above. */
|
||||
break;
|
||||
@@ -913,11 +866,12 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
if (state->control.bits && !state->control.linemode) {
|
||||
/* bits per second */
|
||||
pv__sizestr(component_content, component_buf_size,
|
||||
"[%s]", 8 * average_rate, "", _("b/s"), count_type);
|
||||
"(%s)", 8 * state->calc.average_rate, "", _("b/s"), count_type);
|
||||
} else {
|
||||
/* bytes or lines per second */
|
||||
pv__sizestr(component_content,
|
||||
component_buf_size, "[%s]", average_rate, _("/s"), _("B/s"), count_type);
|
||||
component_buf_size, "(%s)", state->calc.average_rate, _("/s"), _("B/s"),
|
||||
count_type);
|
||||
}
|
||||
/*@+mustfreefresh @ *//* splint: see above. */
|
||||
break;
|
||||
@@ -925,9 +879,9 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
case PV_COMPONENT_ETA:
|
||||
/* Estimated time remaining until completion - if size is known. */
|
||||
eta =
|
||||
pv__seconds_remaining(((off_t) total_bytes - state->display.initial_offset),
|
||||
pv__seconds_remaining((state->transfer.transferred - state->display.initial_offset),
|
||||
state->control.size - state->display.initial_offset,
|
||||
state->display.current_avg_rate);
|
||||
state->calc.current_avg_rate);
|
||||
|
||||
/*
|
||||
* Bounds check, so we don't overrun the suffix buffer. This
|
||||
@@ -957,7 +911,7 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
* If this is the final update, show a blank space where the
|
||||
* ETA used to be.
|
||||
*/
|
||||
if (bytes_since_last < 0) {
|
||||
if (final) {
|
||||
size_t erase_idx;
|
||||
for (erase_idx = 0;
|
||||
erase_idx < component_buf_size && component_content[erase_idx] != '\0';
|
||||
@@ -971,18 +925,18 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
/* Estimated time of completion - if size is known. */
|
||||
|
||||
now = time(NULL);
|
||||
show_eta = true;
|
||||
show_fineta = true;
|
||||
time_format = NULL;
|
||||
|
||||
/*
|
||||
* The ETA may be hidden by a failed ETA string
|
||||
* generation.
|
||||
* The completion clock time may be hidden by a
|
||||
* failed localtime lookup.
|
||||
*/
|
||||
|
||||
eta =
|
||||
pv__seconds_remaining((off_t) (total_bytes - state->display.initial_offset),
|
||||
pv__seconds_remaining(state->transfer.transferred - state->display.initial_offset,
|
||||
state->control.size - state->display.initial_offset,
|
||||
state->display.current_avg_rate);
|
||||
state->calc.current_avg_rate);
|
||||
|
||||
/*
|
||||
* Bounds check, so we don't overrun the suffix buffer. This
|
||||
@@ -1004,7 +958,7 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
time_ptr = localtime(&then);
|
||||
|
||||
if (NULL == time_ptr) {
|
||||
show_eta = false;
|
||||
show_fineta = false;
|
||||
} else {
|
||||
/* Localtime keeps data stored in a static
|
||||
* buffer that gets overwritten by time
|
||||
@@ -1014,7 +968,7 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
size_t component_content_length;
|
||||
|
||||
/*@-mustfreefresh @ */
|
||||
(void) pv_snprintf(component_content, component_buf_size, "%.16s ", _("ETA"));
|
||||
(void) pv_snprintf(component_content, component_buf_size, "%.16s ", _("FIN"));
|
||||
/*@+mustfreefresh @ *//* splint: see above. */
|
||||
component_content_length = strlen(component_content); /* flawfinder: ignore */
|
||||
/* flawfinder: always bounded with \0 by pv_snprintf(). */
|
||||
@@ -1022,7 +976,7 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
component_buf_size - 1 - component_content_length, time_format, &time);
|
||||
}
|
||||
|
||||
if (!show_eta) {
|
||||
if (!show_fineta) {
|
||||
size_t erase_idx;
|
||||
for (erase_idx = 0;
|
||||
erase_idx < component_buf_size && component_content[erase_idx] != '\0';
|
||||
@@ -1043,11 +997,11 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
case PV_COMPONENT_BUFPERCENT:
|
||||
/* Transfer buffer percentage utilisation. */
|
||||
if (state->transfer.buffer_size > 0) {
|
||||
int pct_used = pv__calc_percentage((off_t)
|
||||
(state->transfer.read_position -
|
||||
state->transfer.write_position),
|
||||
(off_t)
|
||||
(state->transfer.buffer_size));
|
||||
int pct_used = pv_percentage((off_t)
|
||||
(state->transfer.read_position -
|
||||
state->transfer.write_position),
|
||||
(off_t)
|
||||
(state->transfer.buffer_size));
|
||||
(void) pv_snprintf(component_content, component_buf_size, "{%3d%%}", pct_used);
|
||||
}
|
||||
#ifdef HAVE_SPLICE
|
||||
@@ -1098,31 +1052,54 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
if (state->display.component[PV_COMPONENT_PROGRESS].required) {
|
||||
char *component_content;
|
||||
size_t component_buf_size;
|
||||
char pct[16]; /* flawfinder: ignore - only populated by pv_snprintf(). */
|
||||
char after_bar[32]; /* flawfinder: ignore - only populated by pv_snprintf(). */
|
||||
int available_width, bar_length, pad_count;
|
||||
|
||||
component_content = state->display.component[PV_COMPONENT_PROGRESS].content;
|
||||
component_content[0] = '\0';
|
||||
component_buf_size = PV_SIZEOF_COMPONENT_STR;
|
||||
|
||||
memset(pct, 0, sizeof(pct));
|
||||
memset(after_bar, 0, sizeof(after_bar));
|
||||
|
||||
/* The opening of the bar area. */
|
||||
(void) pv_snprintf(component_content, component_buf_size, "[");
|
||||
if (state->control.size > 0 || state->control.rate_gauge) {
|
||||
/*
|
||||
* Known size, or rate gauge mode. Show a bar, and
|
||||
* a percentage (size) or max rate (gauge).
|
||||
*/
|
||||
size_t after_bar_width;
|
||||
int bar_percentage;
|
||||
|
||||
if (state->control.size > 0) {
|
||||
/* Known size; show a bar and a percentage. */
|
||||
size_t pct_width;
|
||||
if (state->control.size > 0) {
|
||||
/* Percentage of data transferred. */
|
||||
bar_percentage = state->calc.percentage;
|
||||
(void) pv_snprintf(after_bar, sizeof(after_bar), " %3ld%%", bar_percentage);
|
||||
} else {
|
||||
/* Current rate vs max rate. */
|
||||
bar_percentage = 0;
|
||||
if (state->calc.rate_max > 0) {
|
||||
bar_percentage =
|
||||
(int) (100.0 * state->calc.transfer_rate / state->calc.rate_max);
|
||||
}
|
||||
|
||||
if (state->display.percentage < 0)
|
||||
state->display.percentage = 0;
|
||||
if (state->display.percentage > 100000)
|
||||
state->display.percentage = 100000;
|
||||
(void) pv_snprintf(pct, sizeof(pct), "%3ld%%", state->display.percentage);
|
||||
pct_width = strlen(pct); /* flawfinder: ignore */
|
||||
/*@-mustfreefresh @ */
|
||||
if (state->control.bits && !state->control.linemode) {
|
||||
/* bits per second */
|
||||
pv__sizestr(after_bar, sizeof(after_bar), "/%s",
|
||||
8.0 * state->calc.rate_max, "", _("b/s"), count_type);
|
||||
} else {
|
||||
/* bytes or lines per second */
|
||||
pv__sizestr(after_bar, sizeof(after_bar),
|
||||
"/%s", state->calc.rate_max, _("/s"), _("B/s"), count_type);
|
||||
}
|
||||
/*@+mustfreefresh @ */
|
||||
/* splint: see above about gettext(). */
|
||||
}
|
||||
|
||||
after_bar_width = strlen(after_bar); /* flawfinder: ignore */
|
||||
/* flawfinder: always \0-terminated by pv_snprintf() and the earlier memset(). */
|
||||
|
||||
available_width = (int) (state->control.width) - static_portion_size - (int) (pct_width) - 3;
|
||||
available_width =
|
||||
(int) (state->control.width) - static_portion_size - (int) (after_bar_width) - 2;
|
||||
|
||||
if (available_width < 0)
|
||||
available_width = 0;
|
||||
@@ -1130,8 +1107,11 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
if (available_width > (int) (component_buf_size) - 16)
|
||||
available_width = (int) (component_buf_size - 16);
|
||||
|
||||
/* The opening of the bar area. */
|
||||
(void) pv_snprintf(component_content, component_buf_size, "[");
|
||||
|
||||
/* The bar portion. */
|
||||
bar_length = (int) ((available_width * state->display.percentage) / 100 - 1);
|
||||
bar_length = (int) ((available_width * bar_percentage) / 100 - 1);
|
||||
for (pad_count = 0; pad_count < bar_length; pad_count++) {
|
||||
if (pad_count < available_width)
|
||||
(void) pv_strlcat(component_content, "=", component_buf_size);
|
||||
@@ -1149,13 +1129,13 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
}
|
||||
|
||||
/* The closure of the bar area, and the percentage. */
|
||||
(void) pv_strlcat(component_content, "] ", component_buf_size);
|
||||
(void) pv_strlcat(component_content, pct, component_buf_size);
|
||||
(void) pv_strlcat(component_content, "]", component_buf_size);
|
||||
(void) pv_strlcat(component_content, after_bar, component_buf_size);
|
||||
|
||||
} else {
|
||||
/* Unknown size; show a moving indicator. */
|
||||
|
||||
int indicator_position = state->display.percentage;
|
||||
int indicator_position = state->calc.percentage;
|
||||
|
||||
available_width = (int) (state->control.width) - static_portion_size - 5;
|
||||
|
||||
@@ -1168,15 +1148,18 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
debug("available_width: %d", available_width);
|
||||
|
||||
/*
|
||||
* Earlier code in this function sets the percentage
|
||||
* when the size is unknown to a value that goes 0 -
|
||||
* 200 and resets, so here we make values above 100
|
||||
* send the indicator back down again, so it moves
|
||||
* back and forth.
|
||||
* Note that pv_calculate_transfer_rate() sets the
|
||||
* percentage when the size is unknown to a value
|
||||
* that goes 0 - 200 and resets, so here we make
|
||||
* values above 100 send the indicator back down
|
||||
* again, so it moves back and forth.
|
||||
*/
|
||||
if (indicator_position > 100)
|
||||
indicator_position = 200 - indicator_position;
|
||||
|
||||
/* The opening of the bar area. */
|
||||
(void) pv_snprintf(component_content, component_buf_size, "[");
|
||||
|
||||
/* The spaces before the indicator. */
|
||||
for (pad_count = 0; pad_count < (available_width * indicator_position) / 100; pad_count++) {
|
||||
if (pad_count < available_width)
|
||||
@@ -1288,40 +1271,28 @@ static bool pv__format(pvstate_t state, long double elapsed_sec, off_t bytes_sin
|
||||
|
||||
|
||||
/*
|
||||
* Output status information on standard error, where "esec" is the seconds
|
||||
* elapsed since the transfer started, "sl" is the number of bytes transferred
|
||||
* since the last update, and "tot" is the total number of bytes transferred
|
||||
* so far.
|
||||
* Output status information on standard error.
|
||||
*
|
||||
* If "sl" is negative, this is the final update so the rate is given as an
|
||||
* If "final" is true, this is the final update, so the rate is given as an
|
||||
* an average over the whole transfer; otherwise the current rate is shown.
|
||||
*
|
||||
* In line mode, "sl" and "tot" are in lines, not bytes.
|
||||
*/
|
||||
void pv_display(pvstate_t state, long double esec, off_t sl, off_t tot)
|
||||
void pv_display(pvstate_t state, bool final)
|
||||
{
|
||||
if (NULL == state)
|
||||
return;
|
||||
|
||||
/*
|
||||
* If the display options need reparsing, do so to generate new
|
||||
* formatting parameters.
|
||||
*/
|
||||
if (0 != state->flag.reparse_display) {
|
||||
pv__format_init(state);
|
||||
state->flag.reparse_display = 0;
|
||||
}
|
||||
|
||||
pv_sig_checkbg();
|
||||
|
||||
if (!pv__format(state, esec, sl, tot))
|
||||
pv_calculate_transfer_rate(state, final);
|
||||
|
||||
if (!pv_format(state, final))
|
||||
return;
|
||||
|
||||
if (NULL == state->display.display_buffer)
|
||||
return;
|
||||
|
||||
if (state->control.numeric) {
|
||||
pv_write_retry(STDERR_FILENO, state->display.display_buffer, state->display.display_string_len);
|
||||
pv_tty_write(state, state->display.display_buffer, state->display.display_string_len);
|
||||
} else if (state->control.cursor) {
|
||||
if (state->control.force || pv_in_foreground()) {
|
||||
pv_crs_update(state, state->display.display_buffer);
|
||||
@@ -1329,8 +1300,8 @@ void pv_display(pvstate_t state, long double esec, off_t sl, off_t tot)
|
||||
}
|
||||
} else {
|
||||
if (state->control.force || pv_in_foreground()) {
|
||||
pv_write_retry(STDERR_FILENO, state->display.display_buffer, state->display.display_string_len);
|
||||
pv_write_retry(STDERR_FILENO, "\r", 1);
|
||||
pv_tty_write(state, state->display.display_buffer, state->display.display_string_len);
|
||||
pv_tty_write(state, "\r", 1);
|
||||
state->display.display_visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
+284
-75
@@ -24,6 +24,32 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if HAVE_MATH_H
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
|
||||
#if HAVE_SQRTL
|
||||
#else
|
||||
/*
|
||||
* Square root of a long double. Adapted from iputils ping/ping_common.c.
|
||||
*/
|
||||
static long ldsqrt(long double value)
|
||||
{
|
||||
long double previous = (long double) LLONG_MAX;
|
||||
long double result = value;
|
||||
|
||||
if (result > 0) {
|
||||
while (result < previous) {
|
||||
previous = result;
|
||||
result = (result + (value / result)) / 2;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Pipe data from a list of files to standard output, giving information
|
||||
@@ -34,15 +60,15 @@
|
||||
int pv_main_loop(pvstate_t state)
|
||||
{
|
||||
long lineswritten;
|
||||
off_t total_written, transferred_since_last, cansend;
|
||||
off_t cansend;
|
||||
ssize_t written;
|
||||
long double target;
|
||||
bool eof_in, eof_out, final_update;
|
||||
struct timespec start_time, next_update, next_ratecheck, cur_time;
|
||||
struct timespec init_time, next_remotecheck, transfer_elapsed;
|
||||
long double elapsed_seconds;
|
||||
int fd;
|
||||
int input_fd, output_fd;
|
||||
unsigned int file_idx;
|
||||
bool output_is_pipe;
|
||||
|
||||
/*
|
||||
* "written" is ALWAYS bytes written by the last transfer.
|
||||
@@ -50,26 +76,56 @@ int pv_main_loop(pvstate_t state)
|
||||
* "lineswritten" is the lines written by the last transfer,
|
||||
* but is only updated in line mode.
|
||||
*
|
||||
* "total_written" is the total bytes written since the start,
|
||||
* or in line mode, the total lines written since the start.
|
||||
*
|
||||
* "transferred_since_last" is the bytes written since the last
|
||||
* display, or in line mode, the lines written since the last
|
||||
* display.
|
||||
* "state->transfer.total_written" is the total bytes written since
|
||||
* the start, or in line mode, the total lines written since the
|
||||
* start.
|
||||
*
|
||||
* The remaining variables are all unchanged by linemode.
|
||||
*/
|
||||
|
||||
fd = -1;
|
||||
input_fd = -1;
|
||||
|
||||
output_fd = state->control.output_fd;
|
||||
if (output_fd < 0)
|
||||
output_fd = STDOUT_FILENO;
|
||||
|
||||
/* Determine whether the output is a pipe. */
|
||||
output_is_pipe = false;
|
||||
{
|
||||
struct stat sb;
|
||||
memset(&sb, 0, sizeof(sb));
|
||||
if (0 == fstat(output_fd, &sb)) {
|
||||
/*@-type@ */
|
||||
if ((sb.st_mode & S_IFMT) == S_IFIFO) {
|
||||
output_is_pipe = true;
|
||||
debug("%s", "output is a pipe");
|
||||
}
|
||||
/*@+type@ *//* splint says st_mode is __mode_t, not mode_t */
|
||||
} else {
|
||||
debug("%s(%d): %s", "fstat", output_fd, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Note that we could reduce the size of the output pipe buffer like
|
||||
* this, to avoid the case where we write a load of data and it just
|
||||
* goes into the buffer so we think we're done, but the consumer
|
||||
* takes ages to process it:
|
||||
*
|
||||
* fcntl(output_fd, F_SETPIPE_SZ, 4096);
|
||||
*
|
||||
* If we can peek at how much has been consumed by the other end, we
|
||||
* don't need to.
|
||||
*/
|
||||
|
||||
pv_crs_init(state);
|
||||
|
||||
eof_in = false;
|
||||
eof_out = false;
|
||||
total_written = 0;
|
||||
state->transfer.total_written = 0;
|
||||
lineswritten = 0;
|
||||
transferred_since_last = 0;
|
||||
state->display.initial_offset = 0;
|
||||
state->transfer.written_but_not_consumed = 0;
|
||||
|
||||
memset(&cur_time, 0, sizeof(cur_time));
|
||||
memset(&start_time, 0, sizeof(start_time));
|
||||
@@ -98,32 +154,31 @@ int pv_main_loop(pvstate_t state)
|
||||
/*
|
||||
* Open the first readable input file.
|
||||
*/
|
||||
fd = -1;
|
||||
while (fd < 0 && file_idx < state->files.file_count) {
|
||||
fd = pv_next_file(state, file_idx, -1);
|
||||
if (fd < 0)
|
||||
input_fd = -1;
|
||||
while (input_fd < 0 && file_idx < state->files.file_count) {
|
||||
input_fd = pv_next_file(state, file_idx, -1);
|
||||
if (input_fd < 0)
|
||||
file_idx++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Exit early if there was no readable input file.
|
||||
*/
|
||||
if (fd < 0) {
|
||||
if (input_fd < 0) {
|
||||
if (state->control.cursor)
|
||||
pv_crs_fini(state);
|
||||
return state->status.exit_status;
|
||||
}
|
||||
#if HAVE_POSIX_FADVISE
|
||||
/* Advise the OS that we will only be reading sequentially. */
|
||||
(void) posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
(void) posix_fadvise(input_fd, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
#endif
|
||||
|
||||
#ifdef O_DIRECT
|
||||
/*
|
||||
* Set or clear O_DIRECT on the output.
|
||||
*/
|
||||
if (0 !=
|
||||
fcntl(STDOUT_FILENO, F_SETFL, (state->control.direct_io ? O_DIRECT : 0) | fcntl(STDOUT_FILENO, F_GETFL))) {
|
||||
if (0 != fcntl(output_fd, F_SETFL, (state->control.direct_io ? O_DIRECT : 0) | fcntl(output_fd, F_GETFL))) {
|
||||
debug("%s: %s", "fcntl", strerror(errno));
|
||||
}
|
||||
state->control.direct_io_changed = false;
|
||||
@@ -137,7 +192,7 @@ int pv_main_loop(pvstate_t state)
|
||||
if (0 == state->control.target_buffer_size) {
|
||||
struct stat sb;
|
||||
memset(&sb, 0, sizeof(sb));
|
||||
if (0 == fstat(fd, &sb)) {
|
||||
if (0 == fstat(input_fd, &sb)) {
|
||||
size_t sz;
|
||||
sz = (size_t) (sb.st_blksize * 32);
|
||||
if (sz > BUFFER_SIZE_MAX) {
|
||||
@@ -151,6 +206,11 @@ int pv_main_loop(pvstate_t state)
|
||||
if (0 == state->control.target_buffer_size)
|
||||
state->control.target_buffer_size = BUFFER_SIZE;
|
||||
|
||||
/*
|
||||
* Repeat until eof_in is true, eof_out is true, and final_update is
|
||||
* true.
|
||||
*/
|
||||
|
||||
while ((!(eof_in && eof_out)) || (!final_update)) {
|
||||
|
||||
cansend = 0;
|
||||
@@ -187,10 +247,10 @@ int pv_main_loop(pvstate_t state)
|
||||
* try to write more than we're allowed to.
|
||||
*/
|
||||
if ((0 < state->control.size) && (state->control.stop_at_size)) {
|
||||
if ((state->control.size < (total_written + cansend))
|
||||
if ((state->control.size < (state->transfer.total_written + cansend))
|
||||
|| ((0 == cansend)
|
||||
&& (0 == state->control.rate_limit))) {
|
||||
cansend = state->control.size - total_written;
|
||||
cansend = state->control.size - state->transfer.total_written;
|
||||
if (0 >= cansend) {
|
||||
debug("%s", "write limit reached (size explicitly set) - setting EOF flags");
|
||||
eof_in = true;
|
||||
@@ -203,7 +263,7 @@ int pv_main_loop(pvstate_t state)
|
||||
&& (0 >= cansend) && eof_in && eof_out) {
|
||||
written = 0;
|
||||
} else {
|
||||
written = pv_transfer(state, fd, &eof_in, &eof_out, cansend, &lineswritten);
|
||||
written = pv_transfer(state, input_fd, &eof_in, &eof_out, cansend, &lineswritten);
|
||||
}
|
||||
|
||||
/* End on write error. */
|
||||
@@ -215,34 +275,124 @@ int pv_main_loop(pvstate_t state)
|
||||
}
|
||||
|
||||
if (state->control.linemode) {
|
||||
transferred_since_last += lineswritten;
|
||||
total_written += lineswritten;
|
||||
state->transfer.total_written += lineswritten;
|
||||
if (state->control.rate_limit > 0)
|
||||
target -= lineswritten;
|
||||
} else {
|
||||
transferred_since_last += written;
|
||||
total_written += written;
|
||||
state->transfer.total_written += written;
|
||||
if (state->control.rate_limit > 0)
|
||||
target -= written;
|
||||
}
|
||||
|
||||
#ifdef FIONREAD
|
||||
/*
|
||||
* If writing to a pipe, look at how much is sitting in the
|
||||
* pipe buffer waiting for the receiver to read.
|
||||
*/
|
||||
if (output_is_pipe) {
|
||||
int nbytes;
|
||||
nbytes = 0;
|
||||
if (0 != state->flag.pipe_closed) {
|
||||
if (0 != state->transfer.written_but_not_consumed)
|
||||
debug("%s",
|
||||
"clearing written_but_not_consumed because the output pipe was closed");
|
||||
state->transfer.written_but_not_consumed = 0;
|
||||
} else if (0 == ioctl(output_fd, FIONREAD, &nbytes)) {
|
||||
if (nbytes >= 0) {
|
||||
if (((size_t) nbytes) != state->transfer.written_but_not_consumed)
|
||||
debug("%s: %d", "written_but_not_consumed is now", nbytes);
|
||||
state->transfer.written_but_not_consumed = (size_t) nbytes;
|
||||
} else {
|
||||
debug("%s: %d", "FIONREAD gave a negative byte count", nbytes);
|
||||
state->transfer.written_but_not_consumed = 0;
|
||||
}
|
||||
} else {
|
||||
debug("%s(%d,%s): %s", "ioctl", output_fd, "FIONREAD", strerror(errno));
|
||||
state->transfer.written_but_not_consumed = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
state->transfer.transferred = state->transfer.total_written;
|
||||
if (output_is_pipe && !state->control.linemode) {
|
||||
/*
|
||||
* Writing bytes to a pipe - the amount transferred
|
||||
* to the receiver is the total amount we've
|
||||
* written, minus what's sitting in the pipe buffer
|
||||
* waiting for the receiver to consume it.
|
||||
*/
|
||||
state->transfer.transferred -= state->transfer.written_but_not_consumed;
|
||||
|
||||
} else if (output_is_pipe && state->control.linemode && state->transfer.written_but_not_consumed > 0
|
||||
&& NULL != state->transfer.line_positions) {
|
||||
/*
|
||||
* Writing lines to a pipe - similar to above, but
|
||||
* we have to work out how many lines the
|
||||
* yet-to-be-consumed data in the buffer equates to.
|
||||
*
|
||||
* To do this, we walk backwards through our record
|
||||
* of the line positions in the output we've
|
||||
* written.
|
||||
*/
|
||||
off_t last_consumed_position =
|
||||
state->transfer.last_output_position - state->transfer.written_but_not_consumed;
|
||||
size_t lines_not_consumed = 0;
|
||||
size_t line_from_end = 0;
|
||||
|
||||
/*
|
||||
* positions[head-1] = position of last separator written
|
||||
* positions[head-2] = position of second last separator written
|
||||
* etc
|
||||
*
|
||||
* We start at [head-1] and go backwards, wrapping
|
||||
* around as it's a circular buffer, stopping at the
|
||||
* length (number of positions stored), or when we
|
||||
* have gone before the last consumed position.
|
||||
*/
|
||||
for (line_from_end = 0; line_from_end < state->transfer.line_positions_length; line_from_end++) {
|
||||
size_t array_index;
|
||||
array_index =
|
||||
state->transfer.line_positions_head + state->transfer.line_positions_capacity -
|
||||
line_from_end - 1;
|
||||
while (array_index >= state->transfer.line_positions_capacity)
|
||||
array_index -= state->transfer.line_positions_capacity;
|
||||
if (state->transfer.line_positions[array_index] <= last_consumed_position)
|
||||
break;
|
||||
lines_not_consumed++;
|
||||
}
|
||||
|
||||
debug("%s: %lld -> %lld", "written_but_not_consumed bytes to lines",
|
||||
(unsigned long long) (state->transfer.written_but_not_consumed),
|
||||
(unsigned long long) lines_not_consumed);
|
||||
|
||||
state->transfer.transferred -= lines_not_consumed;
|
||||
}
|
||||
|
||||
/*
|
||||
* EOF, and files remain - advance to the next file.
|
||||
*/
|
||||
while (eof_in && eof_out && file_idx < (state->files.file_count - 1)) {
|
||||
file_idx++;
|
||||
fd = pv_next_file(state, file_idx, fd);
|
||||
if (fd >= 0) {
|
||||
input_fd = pv_next_file(state, file_idx, input_fd);
|
||||
if (input_fd >= 0) {
|
||||
eof_in = false;
|
||||
eof_out = false;
|
||||
#if HAVE_POSIX_FADVISE
|
||||
/* Advise the OS that we will only be reading sequentially. */
|
||||
(void) posix_fadvise(input_fd, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* Now check the current time. */
|
||||
pv_elapsedtime_read(&cur_time);
|
||||
|
||||
/* If full EOF, final update, and force a display updaate. */
|
||||
if (eof_in && eof_out) {
|
||||
/*
|
||||
* If we've read everything and written everything, and the
|
||||
* output pipe buffer is empty, then set the final update
|
||||
* flag, and force a display update.
|
||||
*/
|
||||
if (eof_in && eof_out && 0 == state->transfer.written_but_not_consumed) {
|
||||
final_update = true;
|
||||
if ((state->display.display_visible)
|
||||
|| (state->control.delay_start < 0.001)) {
|
||||
@@ -250,8 +400,11 @@ int pv_main_loop(pvstate_t state)
|
||||
}
|
||||
}
|
||||
|
||||
/* Just go round the loop again if there's no display. */
|
||||
if (state->control.no_display)
|
||||
/*
|
||||
* Just go round the loop again if there's no display and
|
||||
* we're not reporting statistics.
|
||||
*/
|
||||
if (state->control.no_display && !state->control.show_stats)
|
||||
continue;
|
||||
|
||||
/*
|
||||
@@ -320,10 +473,7 @@ int pv_main_loop(pvstate_t state)
|
||||
memset(&transfer_elapsed, 0, sizeof(transfer_elapsed));
|
||||
pv_elapsedtime_subtract(&transfer_elapsed, &cur_time, &init_time);
|
||||
|
||||
elapsed_seconds = pv_elapsedtime_seconds(&transfer_elapsed);
|
||||
|
||||
if (final_update)
|
||||
transferred_since_last = -1;
|
||||
state->transfer.elapsed_seconds = pv_elapsedtime_seconds(&transfer_elapsed);
|
||||
|
||||
/* Resize the display, if a resize signal was received. */
|
||||
if (1 == state->flag.terminal_resized) {
|
||||
@@ -341,9 +491,13 @@ int pv_main_loop(pvstate_t state)
|
||||
state->control.height = new_height;
|
||||
}
|
||||
|
||||
pv_display(state, elapsed_seconds, transferred_since_last, total_written);
|
||||
|
||||
transferred_since_last = 0;
|
||||
if (state->control.no_display) {
|
||||
/* If there's no display, calculate rate for the statistics. */
|
||||
pv_calculate_transfer_rate(state, final_update);
|
||||
} else {
|
||||
/* Produce the display. */
|
||||
pv_display(state, final_update);
|
||||
}
|
||||
}
|
||||
|
||||
debug("%s: %s=%s, %s=%s", "loop ended", "eof_in", eof_in ? "true" : "false", "eof_out",
|
||||
@@ -354,14 +508,60 @@ int pv_main_loop(pvstate_t state)
|
||||
} else {
|
||||
if ((!state->control.numeric) && (!state->control.no_display)
|
||||
&& (state->display.display_visible))
|
||||
pv_write_retry(STDERR_FILENO, "\n", 1);
|
||||
pv_tty_write(state, "\n", 1);
|
||||
}
|
||||
|
||||
if (1 == state->flag.trigger_exit)
|
||||
state->status.exit_status |= PV_ERROREXIT_SIGNAL;
|
||||
|
||||
if (fd >= 0)
|
||||
(void) close(fd);
|
||||
if (input_fd >= 0)
|
||||
(void) close(input_fd);
|
||||
|
||||
/* Calculate and display the transfer statistics. */
|
||||
if (state->control.show_stats && state->calc.measurements_taken > 0) {
|
||||
char stats_buf[256]; /* flawfinder: ignore */
|
||||
long double rate_mean, rate_variance, rate_deviation;
|
||||
int stats_size;
|
||||
|
||||
/* flawfinder: made safe by use of pv_snprintf() */
|
||||
|
||||
rate_mean = state->calc.rate_sum / ((long double) (state->calc.measurements_taken));
|
||||
rate_variance =
|
||||
(state->calc.ratesquared_sum / ((long double) (state->calc.measurements_taken))) -
|
||||
(rate_mean * rate_mean);
|
||||
#if HAVE_SQRTL
|
||||
rate_deviation = sqrtl(rate_variance);
|
||||
#else
|
||||
rate_deviation = ldsqrt(rate_variance);
|
||||
#endif
|
||||
|
||||
debug("%s: %ld", "measurements taken", state->calc.measurements_taken);
|
||||
debug("%s: %.3Lf", "rate_sum", state->calc.rate_sum);
|
||||
debug("%s: %.3Lf", "ratesquared_sum", state->calc.ratesquared_sum);
|
||||
debug("%s: %.3Lf", "rate_mean", rate_mean);
|
||||
debug("%s: %.3Lf", "rate_variance", rate_variance);
|
||||
debug("%s: %.3Lf", "rate_deviation", rate_deviation);
|
||||
|
||||
memset(stats_buf, 0, sizeof(stats_buf));
|
||||
stats_size =
|
||||
pv_snprintf(stats_buf, sizeof(stats_buf), "%s = %.3Lf/%.3Lf/%.3Lf/%.3Lf %s\n",
|
||||
_("rate min/avg/max/mdev"), state->calc.rate_min, rate_mean, state->calc.rate_max,
|
||||
rate_deviation, state->control.bits ? _("b/s") : _("B/s"));
|
||||
|
||||
if (stats_size > 0 && stats_size < (int) (sizeof(stats_buf)))
|
||||
pv_tty_write(state, stats_buf, (size_t) stats_size);
|
||||
} else if (state->control.show_stats && state->calc.measurements_taken < 1) {
|
||||
char msg_buf[256]; /* flawfinder: ignore */
|
||||
int msg_size;
|
||||
|
||||
/* flawfinder: made safe by use of pv_snprintf() */
|
||||
|
||||
memset(msg_buf, 0, sizeof(msg_buf));
|
||||
msg_size = pv_snprintf(msg_buf, sizeof(msg_buf), "%s\n", _("rate not measured"));
|
||||
|
||||
if (msg_size > 0 && msg_size < (int) (sizeof(msg_buf)))
|
||||
pv_tty_write(state, msg_buf, (size_t) msg_size);
|
||||
}
|
||||
|
||||
return state->status.exit_status;
|
||||
}
|
||||
@@ -377,10 +577,9 @@ int pv_main_loop(pvstate_t state)
|
||||
int pv_watchfd_loop(pvstate_t state)
|
||||
{
|
||||
struct pvwatchfd_s info;
|
||||
off_t position_now, total_written, transferred_since_last;
|
||||
off_t position_now;
|
||||
struct timespec next_update, cur_time;
|
||||
struct timespec init_time, next_remotecheck, transfer_elapsed;
|
||||
long double elapsed_seconds;
|
||||
bool ended, first_check;
|
||||
int rc;
|
||||
|
||||
@@ -427,8 +626,6 @@ int pv_watchfd_loop(pvstate_t state)
|
||||
pv_elapsedtime_add_nsec(&next_update, (long long) (1000000000.0 * state->control.interval));
|
||||
|
||||
ended = false;
|
||||
total_written = 0;
|
||||
transferred_since_last = 0;
|
||||
first_check = true;
|
||||
|
||||
while (!ended) {
|
||||
@@ -448,12 +645,11 @@ int pv_watchfd_loop(pvstate_t state)
|
||||
if (position_now < 0) {
|
||||
ended = true;
|
||||
} else {
|
||||
transferred_since_last += position_now - total_written;
|
||||
total_written = position_now;
|
||||
if (first_check) {
|
||||
state->display.initial_offset = position_now;
|
||||
first_check = false;
|
||||
}
|
||||
state->transfer.total_written = position_now;
|
||||
}
|
||||
|
||||
pv_elapsedtime_read(&cur_time);
|
||||
@@ -490,10 +686,7 @@ int pv_watchfd_loop(pvstate_t state)
|
||||
*/
|
||||
pv_elapsedtime_subtract(&transfer_elapsed, &cur_time, &init_time);
|
||||
|
||||
elapsed_seconds = pv_elapsedtime_seconds(&transfer_elapsed);
|
||||
|
||||
if (ended)
|
||||
transferred_since_last = -1;
|
||||
state->transfer.elapsed_seconds = pv_elapsedtime_seconds(&transfer_elapsed);
|
||||
|
||||
/* Resize the display, if a resize signal was received. */
|
||||
if (1 == state->flag.terminal_resized) {
|
||||
@@ -511,13 +704,11 @@ int pv_watchfd_loop(pvstate_t state)
|
||||
state->control.height = new_height;
|
||||
}
|
||||
|
||||
pv_display(state, elapsed_seconds, transferred_since_last, total_written);
|
||||
|
||||
transferred_since_last = 0;
|
||||
pv_display(state, ended);
|
||||
}
|
||||
|
||||
if (!state->control.numeric)
|
||||
pv_write_retry(STDERR_FILENO, "\n", 1);
|
||||
pv_tty_write(state, "\n", 1);
|
||||
|
||||
if (1 == state->flag.trigger_exit)
|
||||
state->status.exit_status |= PV_ERROREXIT_SIGNAL;
|
||||
@@ -677,9 +868,8 @@ int pv_watchpid_loop(pvstate_t state)
|
||||
displayed_lines = 0;
|
||||
|
||||
for (fd = 0; fd < FD_SETSIZE && NULL != info_array; fd++) {
|
||||
off_t position_now, transferred_since_last;
|
||||
off_t position_now;
|
||||
struct timespec init_time, transfer_elapsed;
|
||||
long double elapsed_seconds;
|
||||
|
||||
if (displayed_lines >= (int) (state->control.height))
|
||||
break;
|
||||
@@ -697,6 +887,11 @@ int pv_watchpid_loop(pvstate_t state)
|
||||
if (pv_watchfd_changed(&(info_array[idx]))) {
|
||||
fd_to_idx[fd] = -1;
|
||||
info_array[idx].watch_pid = 0;
|
||||
if (NULL != info_array[idx].state)
|
||||
pv_state_free(info_array[idx].state);
|
||||
/*@-mustfreeonly@ *//* not a leak - we've just free()d it. */
|
||||
info_array[idx].state = NULL;
|
||||
/*@+mustfreeonly@ */
|
||||
debug("%s %d: %s", "fd", fd, "removing");
|
||||
}
|
||||
continue;
|
||||
@@ -716,11 +911,15 @@ int pv_watchpid_loop(pvstate_t state)
|
||||
if (position_now < 0) {
|
||||
fd_to_idx[fd] = -1;
|
||||
info_array[idx].watch_pid = 0;
|
||||
if (NULL != info_array[idx].state)
|
||||
pv_state_free(info_array[idx].state);
|
||||
/*@-mustfreeonly@ *//* not a leak - we've just free()d it. */
|
||||
info_array[idx].state = NULL;
|
||||
/*@+mustfreeonly@ */
|
||||
debug("%s %d: %s", "fd", fd, "removing");
|
||||
continue;
|
||||
}
|
||||
|
||||
transferred_since_last = position_now - info_array[idx].position;
|
||||
info_array[idx].position = position_now;
|
||||
|
||||
memset(&init_time, 0, sizeof(init_time));
|
||||
@@ -738,18 +937,28 @@ int pv_watchpid_loop(pvstate_t state)
|
||||
*/
|
||||
pv_elapsedtime_subtract(&transfer_elapsed, &cur_time, &init_time);
|
||||
|
||||
elapsed_seconds = pv_elapsedtime_seconds(&transfer_elapsed);
|
||||
if (NULL != info_array[idx].state) {
|
||||
info_array[idx].state->transfer.elapsed_seconds =
|
||||
pv_elapsedtime_seconds(&transfer_elapsed);
|
||||
}
|
||||
|
||||
if (displayed_lines > 0) {
|
||||
debug("%s", "adding newline");
|
||||
pv_write_retry(STDERR_FILENO, "\n", 1);
|
||||
pv_tty_write(state, "\n", 1);
|
||||
}
|
||||
|
||||
debug("%s %d [%d]: %Lf / %Ld / %Ld", "fd", fd, idx, elapsed_seconds, transferred_since_last,
|
||||
position_now);
|
||||
if (NULL == info_array[idx].state) {
|
||||
debug("%s %d [%d]: %s / %Ld", "fd", fd, idx, "(null state)", position_now);
|
||||
} else {
|
||||
debug("%s %d [%d]: %Lf / %Ld", "fd", fd, idx,
|
||||
info_array[idx].state->transfer.elapsed_seconds, position_now);
|
||||
}
|
||||
|
||||
pv_display(info_array[idx].state, elapsed_seconds, transferred_since_last, position_now);
|
||||
displayed_lines++;
|
||||
if (NULL != info_array[idx].state) {
|
||||
info_array[idx].state->transfer.total_written = position_now;
|
||||
pv_display(info_array[idx].state, false);
|
||||
displayed_lines++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -765,10 +974,10 @@ int pv_watchpid_loop(pvstate_t state)
|
||||
while (blank_lines > 0) {
|
||||
unsigned int x;
|
||||
if (displayed_lines > 0)
|
||||
pv_write_retry(STDERR_FILENO, "\n", 1);
|
||||
pv_tty_write(state, "\n", 1);
|
||||
for (x = 0; x < state->control.width; x++)
|
||||
pv_write_retry(STDERR_FILENO, " ", 1);
|
||||
pv_write_retry(STDERR_FILENO, "\r", 1);
|
||||
pv_tty_write(state, " ", 1);
|
||||
pv_tty_write(state, "\r", 1);
|
||||
blank_lines--;
|
||||
displayed_lines++;
|
||||
}
|
||||
@@ -776,7 +985,7 @@ int pv_watchpid_loop(pvstate_t state)
|
||||
debug("%s: %d", "displayed lines", displayed_lines);
|
||||
|
||||
while (displayed_lines > 1) {
|
||||
pv_write_retry(STDERR_FILENO, "\033[A", 3);
|
||||
pv_tty_write(state, "\033[A", 3);
|
||||
displayed_lines--;
|
||||
}
|
||||
}
|
||||
@@ -788,14 +997,14 @@ int pv_watchpid_loop(pvstate_t state)
|
||||
while (blank_lines > 0) {
|
||||
unsigned int x;
|
||||
for (x = 0; x < state->control.width; x++)
|
||||
pv_write_retry(STDERR_FILENO, " ", 1);
|
||||
pv_write_retry(STDERR_FILENO, "\r", 1);
|
||||
pv_tty_write(state, " ", 1);
|
||||
pv_tty_write(state, "\r", 1);
|
||||
blank_lines--;
|
||||
if (blank_lines > 0)
|
||||
pv_write_retry(STDERR_FILENO, "\n", 1);
|
||||
pv_tty_write(state, "\n", 1);
|
||||
}
|
||||
while (prev_displayed_lines > 1) {
|
||||
pv_write_retry(STDERR_FILENO, "\033[A", 3);
|
||||
pv_tty_write(state, "\033[A", 3);
|
||||
prev_displayed_lines--;
|
||||
}
|
||||
|
||||
|
||||
@@ -280,4 +280,20 @@ bool pv_getnum_check(const char *str, pv_numtype type)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return an integer representing "amount" as a percentage of "total", i.e.
|
||||
* 100*amount/total. If "total" is zero or less, return 0.
|
||||
*/
|
||||
int pv_percentage(off_t amount, const off_t total)
|
||||
{
|
||||
if (total < 1)
|
||||
return 0;
|
||||
|
||||
amount *= 100;
|
||||
amount /= total;
|
||||
|
||||
return (int) amount;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
+104
-93
@@ -27,8 +27,13 @@ void pv_crs_needreinit(pvstate_t);
|
||||
|
||||
/*
|
||||
* Ensure that terminal attribute TOSTOP is set. If we have to set it,
|
||||
* record that fact by setting the state boolean "pv_tty_tostop_added" to
|
||||
* true, so that in pv_sig_fini() we can turn it back off again.
|
||||
* record that fact by setting "clear_tty_tostop_on_exit" to 1, so that in
|
||||
* pv_sig_fini() we can turn it back off again.
|
||||
*
|
||||
* In "-c" mode with IPC, then if we have to set TOSTOP, we also tell the
|
||||
* other PV instances about it via the shared "tty_tostop_added" flag, so
|
||||
* those instances can set their own on-exit flag, meaning that if any of
|
||||
* the PV instances set it, the last one to exit will clear it.
|
||||
*/
|
||||
static void pv_sig_ensure_tty_tostop()
|
||||
{
|
||||
@@ -37,71 +42,72 @@ static void pv_sig_ensure_tty_tostop()
|
||||
if (NULL == pv_sig_state)
|
||||
return;
|
||||
|
||||
/* Can't look at terminal flags if backgrounded. */
|
||||
if (1 == pv_sig_state->flag.suspend_stderr)
|
||||
return;
|
||||
|
||||
if (0 != tcgetattr(STDERR_FILENO, &terminal_attributes)) {
|
||||
debug("%s: %s", "failed to read terminal attributes", strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Can't set terminal flags if backgrounded. */
|
||||
if (1 == pv_sig_state->flag.suspend_stderr)
|
||||
return;
|
||||
|
||||
if (0 == (terminal_attributes.c_lflag & TOSTOP)) {
|
||||
terminal_attributes.c_lflag |= TOSTOP;
|
||||
if (0 == tcsetattr(STDERR_FILENO, TCSANOW, &terminal_attributes)) {
|
||||
pv_sig_state->signal.pv_tty_tostop_added = true;
|
||||
pv_sig_state->flag.clear_tty_tostop_on_exit = 1;
|
||||
debug("%s", "set terminal TOSTOP attribute");
|
||||
#if HAVE_IPC
|
||||
/*
|
||||
* In "-c" mode with IPC, make all "pv -c" instances
|
||||
* aware that we set TOSTOP, so the last one can
|
||||
* clear it on exit.
|
||||
*/
|
||||
if (pv_sig_state->control.cursor && (NULL != pv_sig_state->cursor.shared)
|
||||
&& (!pv_sig_state->cursor.noipc)) {
|
||||
pv_sig_state->cursor.shared->tty_tostop_added = true;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
debug("%s: %s", "failed to set terminal TOSTOP attribute", strerror(errno));
|
||||
}
|
||||
#if HAVE_IPC
|
||||
/*
|
||||
* In "-c" mode with IPC, make all "pv -c" instances aware
|
||||
* that we set TOSTOP, so the last one can clear it on exit.
|
||||
*/
|
||||
if (pv_sig_state->control.cursor && (NULL != pv_sig_state->cursor.shared)
|
||||
&& (!pv_sig_state->cursor.noipc)) {
|
||||
pv_sig_state->cursor.shared->tty_tostop_added = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle SIGTTOU (tty output for background process) by redirecting stderr
|
||||
* to /dev/null, so that we can be stopped and backgrounded without messing
|
||||
* up the terminal. We store the old stderr file descriptor so that on a
|
||||
* subsequent SIGCONT we can try writing to the terminal again, in case we
|
||||
* get backgrounded and later get foregrounded again.
|
||||
* Handle SIGTTOU (tty output for background process) by setting the flag to
|
||||
* suspend writes to stderr, so that we can be stopped and backgrounded
|
||||
* without messing up the terminal. On a subsequent SIGCONT we will try
|
||||
* writing to the terminal again, in case we get backgrounded and later get
|
||||
* foregrounded again.
|
||||
*
|
||||
* When we get backgrounded and cause a SIGTTOU, the rest of the pipeline
|
||||
* gets stopped too, so transfers involving pipelines need us to send a
|
||||
* SIGCONT to the rest of the process group here, otherwise backgrounding
|
||||
* stops transfers involving pipes.
|
||||
*/
|
||||
static void pv_sig_ttou( /*@unused@ */ __attribute__((unused))
|
||||
int s)
|
||||
{
|
||||
int fd;
|
||||
|
||||
if (NULL == pv_sig_state)
|
||||
return;
|
||||
|
||||
fd = open("/dev/null", O_RDWR); /* flawfinder: ignore */
|
||||
if (fd < 0) {
|
||||
debug("%s: %s", "failed to open /dev/null", strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* flawfinder rationale: not checking for symlinks because this is
|
||||
* explicitly a device file under /dev so we assume it is safe to
|
||||
* open.
|
||||
*
|
||||
* TODO: look at just preventing stderr output instead of writing to
|
||||
* stderr while backgrounded.
|
||||
*/
|
||||
|
||||
if (-1 == pv_sig_state->signal.old_stderr)
|
||||
pv_sig_state->signal.old_stderr = dup(STDERR_FILENO);
|
||||
|
||||
if (dup2(fd, STDERR_FILENO) < 0) {
|
||||
debug("%s: %s", "failed to replace stderr", strerror(errno));
|
||||
}
|
||||
|
||||
if (0 != close(fd)) {
|
||||
debug("%s: %s", "failed to close /dev/null", strerror(errno));
|
||||
if (1 != pv_sig_state->flag.suspend_stderr) {
|
||||
debug("%s", "SIGTTOU - suspending stderr");
|
||||
pv_sig_state->flag.suspend_stderr = 1;
|
||||
/* Also tell the SIGCONT handler to do nothing next time. */
|
||||
pv_sig_state->flag.skip_next_sigcont++;
|
||||
/* Raise an immediate SIGCONT to bring the rest of the pipeline back up. */
|
||||
/*@-unrecog@ *//* splint doesn't know about killpg() */
|
||||
if (0 != killpg(getpgrp(), SIGCONT)) {
|
||||
debug("%s: %s", "killpg", strerror(errno));
|
||||
}
|
||||
/*@+unrecog@ */
|
||||
} else {
|
||||
debug("%s", "SIGTTOU - but stderr was already suspended");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +131,7 @@ static void pv_sig_tstp( /*@unused@ */ __attribute__((unused))
|
||||
/*
|
||||
* Handle SIGCONT (continue if stopped) by adding the elapsed time since the
|
||||
* last SIGTSTP to the elapsed time offset, and by trying to write to the
|
||||
* terminal again (by replacing the /dev/null stderr with the old stderr).
|
||||
* terminal again.
|
||||
*/
|
||||
static void pv_sig_cont( /*@unused@ */ __attribute__((unused))
|
||||
int s)
|
||||
@@ -136,6 +142,18 @@ static void pv_sig_cont( /*@unused@ */ __attribute__((unused))
|
||||
if (NULL == pv_sig_state)
|
||||
return;
|
||||
|
||||
if (pv_sig_state->flag.skip_next_sigcont > 0) {
|
||||
debug("%s: %d", "SIGCONT received but ignored - current value of skip_next_sigcont",
|
||||
pv_sig_state->flag.skip_next_sigcont);
|
||||
pv_sig_state->flag.skip_next_sigcont--;
|
||||
return;
|
||||
} else if (pv_sig_state->flag.skip_next_sigcont < 0) {
|
||||
pv_sig_state->flag.skip_next_sigcont = 0;
|
||||
debug("%s", "skip_next_sigcont underrun cleared");
|
||||
}
|
||||
|
||||
debug("%s: %d", "SIGCONT received - current value of suspend_stderr", pv_sig_state->flag.suspend_stderr);
|
||||
|
||||
pv_sig_state->flag.terminal_resized = 1;
|
||||
|
||||
/*
|
||||
@@ -161,23 +179,24 @@ static void pv_sig_cont( /*@unused@ */ __attribute__((unused))
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore the old stderr, if we had replaced it.
|
||||
* Try resuming our use of stderr, if we had suspended it, but only
|
||||
* if we're now in the foreground.
|
||||
*/
|
||||
if (pv_sig_state->signal.old_stderr != -1) {
|
||||
if (dup2(pv_sig_state->signal.old_stderr, STDERR_FILENO) < 0) {
|
||||
debug("%s: %s", "failed to restore old stderr", strerror(errno));
|
||||
if (1 == pv_sig_state->flag.suspend_stderr) {
|
||||
if (pv_in_foreground()) {
|
||||
debug("%s", "SIGCONT - resuming stderr");
|
||||
pv_sig_state->flag.suspend_stderr = 0;
|
||||
} else {
|
||||
debug("%s", "SIGCONT but still in background - not resuming stderr");
|
||||
}
|
||||
if (0 != close(pv_sig_state->signal.old_stderr)) {
|
||||
debug("%s: %s", "failed to close duplicate old stderr", strerror(errno));
|
||||
}
|
||||
pv_sig_state->signal.old_stderr = -1;
|
||||
}
|
||||
|
||||
pv_sig_ensure_tty_tostop();
|
||||
|
||||
if (0 == pv_sig_state->flag.suspend_stderr) {
|
||||
pv_sig_ensure_tty_tostop();
|
||||
#ifdef HAVE_IPC
|
||||
pv_crs_needreinit(pv_sig_state);
|
||||
pv_crs_needreinit(pv_sig_state);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -272,13 +291,13 @@ void pv_sig_init(pvstate_t state)
|
||||
/*
|
||||
* Note that wherever we use a "struct sigaction", we declare it
|
||||
* static and explicitly zero it before use, because it may contain
|
||||
* deeper structures (e.g. "sigset_t") which trigger splint
|
||||
* deeper structures (e.g. "sigset_t") which trigger splint
|
||||
* warnings about potential memory leaks.
|
||||
*/
|
||||
|
||||
pv_sig_state = state;
|
||||
|
||||
pv_sig_state->signal.old_stderr = -1;
|
||||
pv_sig_state->flag.suspend_stderr = 0;
|
||||
pv_elapsedtime_zero(&(pv_sig_state->signal.tstp_time));
|
||||
pv_elapsedtime_zero(&(pv_sig_state->signal.toffset));
|
||||
|
||||
@@ -301,6 +320,7 @@ void pv_sig_init(pvstate_t state)
|
||||
* Handle SIGTTOU by continuing with output switched off, so that we
|
||||
* can be stopped and backgrounded without messing up the terminal.
|
||||
*/
|
||||
pv_sig_state->flag.skip_next_sigcont = 0;
|
||||
sa.sa_handler = pv_sig_ttou;
|
||||
(void) sigemptyset(&(sa.sa_mask));
|
||||
sa.sa_flags = 0;
|
||||
@@ -416,7 +436,7 @@ void pv_sig_fini( /*@unused@ */ __attribute__((unused)) pvstate_t state)
|
||||
#endif
|
||||
(void) sigaction(SIGALRM, &(pv_sig_state->signal.old_sigalrm), NULL);
|
||||
|
||||
need_to_clear_tostop = pv_sig_state->signal.pv_tty_tostop_added;
|
||||
need_to_clear_tostop = (1 == pv_sig_state->flag.clear_tty_tostop_on_exit) ? true : false;
|
||||
|
||||
if (pv_sig_state->control.cursor) {
|
||||
#ifdef HAVE_IPC
|
||||
@@ -457,7 +477,7 @@ void pv_sig_fini( /*@unused@ */ __attribute__((unused)) pvstate_t state)
|
||||
}
|
||||
}
|
||||
|
||||
pv_sig_state->signal.pv_tty_tostop_added = false;
|
||||
pv_sig_state->flag.clear_tty_tostop_on_exit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,19 +487,17 @@ void pv_sig_fini( /*@unused@ */ __attribute__((unused)) pvstate_t state)
|
||||
*/
|
||||
void pv_sig_nopause(void)
|
||||
{
|
||||
static struct sigaction sa;
|
||||
sigset_t signal_set, signal_oldset;
|
||||
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
debug("%s", "blocking SIGTSTP, SIGCONT");
|
||||
|
||||
sa.sa_handler = SIG_IGN;
|
||||
(void) sigemptyset(&(sa.sa_mask));
|
||||
sa.sa_flags = 0;
|
||||
(void) sigaction(SIGTSTP, &sa, NULL);
|
||||
(void) sigemptyset(&signal_set);
|
||||
(void) sigaddset(&signal_set, SIGTSTP);
|
||||
(void) sigaddset(&signal_set, SIGCONT);
|
||||
|
||||
sa.sa_handler = SIG_DFL;
|
||||
(void) sigemptyset(&(sa.sa_mask));
|
||||
sa.sa_flags = 0;
|
||||
(void) sigaction(SIGCONT, &sa, NULL);
|
||||
if (0 != sigprocmask(SIG_BLOCK, &signal_set, &signal_oldset)) {
|
||||
debug("%s: %s", "failed to set signal mask", strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -488,27 +506,24 @@ void pv_sig_nopause(void)
|
||||
*/
|
||||
void pv_sig_allowpause(void)
|
||||
{
|
||||
static struct sigaction sa;
|
||||
sigset_t signal_set, signal_oldset;
|
||||
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
debug("%s", "unblocking SIGTSTP, SIGCONT");
|
||||
|
||||
sa.sa_handler = pv_sig_tstp;
|
||||
(void) sigemptyset(&(sa.sa_mask));
|
||||
sa.sa_flags = 0;
|
||||
(void) sigaction(SIGTSTP, &sa, NULL);
|
||||
(void) sigemptyset(&signal_set);
|
||||
(void) sigaddset(&signal_set, SIGTSTP);
|
||||
(void) sigaddset(&signal_set, SIGCONT);
|
||||
|
||||
sa.sa_handler = pv_sig_cont;
|
||||
(void) sigemptyset(&(sa.sa_mask));
|
||||
sa.sa_flags = 0;
|
||||
(void) sigaction(SIGCONT, &sa, NULL);
|
||||
if (0 != sigprocmask(SIG_UNBLOCK, &signal_set, &signal_oldset)) {
|
||||
debug("%s: %s", "failed to set signal mask", strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If we have redirected stderr to /dev/null, check every second or so to
|
||||
* see whether we can write to the terminal again - this is so that if we
|
||||
* get backgrounded, then foregrounded again, we start writing to the
|
||||
* terminal again.
|
||||
* If we have suspended stderr, check every second or so to see whether we
|
||||
* can write to the terminal again - this is so that if we get backgrounded,
|
||||
* then foregrounded again, we start writing to the terminal again.
|
||||
*/
|
||||
void pv_sig_checkbg(void)
|
||||
{
|
||||
@@ -522,18 +537,14 @@ void pv_sig_checkbg(void)
|
||||
|
||||
next_check = time(NULL) + 1;
|
||||
|
||||
if (-1 == pv_sig_state->signal.old_stderr)
|
||||
if (0 == pv_sig_state->flag.suspend_stderr)
|
||||
return;
|
||||
|
||||
if (dup2(pv_sig_state->signal.old_stderr, STDERR_FILENO) < 0) {
|
||||
debug("%s: %s", "failed to restore old stderr", strerror(errno));
|
||||
}
|
||||
if (!pv_in_foreground())
|
||||
return;
|
||||
|
||||
if (0 != close(pv_sig_state->signal.old_stderr)) {
|
||||
debug("%s: %s", "failed to close duplicate old stderr", strerror(errno));
|
||||
}
|
||||
|
||||
pv_sig_state->signal.old_stderr = -1;
|
||||
debug("%s: %s", "pv_sig_checkbg", "attempting to resume stderr");
|
||||
pv_sig_state->flag.suspend_stderr = 0;
|
||||
|
||||
pv_sig_ensure_tty_tostop();
|
||||
#ifdef HAVE_IPC
|
||||
|
||||
+85
-20
@@ -24,12 +24,12 @@
|
||||
/* alloc / realloc history buffer */
|
||||
static void pv_alloc_history(pvstate_t state)
|
||||
{
|
||||
if (NULL != state->display.history)
|
||||
free(state->display.history);
|
||||
state->display.history = NULL;
|
||||
if (NULL != state->calc.history)
|
||||
free(state->calc.history);
|
||||
state->calc.history = NULL;
|
||||
|
||||
state->display.history = calloc((size_t) (state->display.history_len), sizeof(state->display.history[0]));
|
||||
if (NULL == state->display.history) {
|
||||
state->calc.history = calloc((size_t) (state->calc.history_len), sizeof(state->calc.history[0]));
|
||||
if (NULL == state->calc.history) {
|
||||
/*@-mustfreefresh@ */
|
||||
/*
|
||||
* splint note: the gettext calls made by _() cause memory
|
||||
@@ -42,10 +42,66 @@ static void pv_alloc_history(pvstate_t state)
|
||||
return;
|
||||
}
|
||||
|
||||
state->display.history_first = state->display.history_last = 0;
|
||||
state->display.history[0].elapsed_sec = 0.0; /* to be safe, memset() not recommended for doubles */
|
||||
state->calc.history_first = state->calc.history_last = 0;
|
||||
state->calc.history[0].elapsed_sec = 0.0; /* to be safe, memset() not recommended for doubles */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Clear the calculated parts of a state structure.
|
||||
*/
|
||||
void pv_state_reset(pvstate_t state)
|
||||
{
|
||||
if (NULL == state)
|
||||
return;
|
||||
|
||||
state->flag.reparse_display = 1;
|
||||
state->status.current_input_file = -1;
|
||||
|
||||
state->display.initial_offset = 0;
|
||||
state->display.display_visible = false;
|
||||
|
||||
/*
|
||||
* Explicitly set important floating point values to 0, as memset()
|
||||
* is not recommended for this.
|
||||
*/
|
||||
state->calc.transfer_rate = 0.0;
|
||||
state->calc.average_rate = 0.0;
|
||||
state->calc.prev_elapsed_sec = 0.0;
|
||||
state->calc.prev_rate = 0.0;
|
||||
state->calc.prev_trans = 0.0;
|
||||
state->calc.current_avg_rate = 0.0;
|
||||
state->calc.rate_min = 0.0;
|
||||
state->calc.rate_max = 0.0;
|
||||
state->calc.rate_sum = 0.0;
|
||||
state->calc.ratesquared_sum = 0.0;
|
||||
state->calc.measurements_taken = 0;
|
||||
state->calc.prev_transferred = 0;
|
||||
state->calc.percentage = 0;
|
||||
state->calc.history_first = state->calc.history_last = 0;
|
||||
if (NULL != state->calc.history) {
|
||||
state->calc.history[0].elapsed_sec = 0.0;
|
||||
}
|
||||
|
||||
state->transfer.elapsed_seconds = 0.0;
|
||||
state->transfer.read_position = 0;
|
||||
state->transfer.write_position = 0;
|
||||
state->transfer.to_write = 0;
|
||||
state->transfer.written = 0;
|
||||
state->transfer.total_written = 0;
|
||||
state->transfer.written_but_not_consumed = 0;
|
||||
state->transfer.read_errors_in_a_row = 0;
|
||||
state->transfer.last_read_skip_fd = 0;
|
||||
#ifdef HAVE_SPLICE
|
||||
state->transfer.splice_failed_fd = -1;
|
||||
#endif /* HAVE_SPLICE */
|
||||
|
||||
state->transfer.line_positions_length = 0;
|
||||
state->transfer.line_positions_head = 0;
|
||||
state->transfer.last_output_position = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Create a new state structure, and return it, or 0 (NULL) on error.
|
||||
*/
|
||||
@@ -78,12 +134,7 @@ pvstate_t pv_state_alloc(const char *program_name)
|
||||
#endif /* HAVE_IPC */
|
||||
state->cursor.lock_fd = -1;
|
||||
|
||||
state->flag.reparse_display = 1;
|
||||
state->status.current_input_file = -1;
|
||||
#ifdef HAVE_SPLICE
|
||||
state->transfer.splice_failed_fd = -1;
|
||||
#endif /* HAVE_SPLICE */
|
||||
state->display.display_visible = false;
|
||||
pv_state_reset(state);
|
||||
|
||||
/*
|
||||
* Get the current working directory, if possible, as a base for
|
||||
@@ -156,9 +207,13 @@ void pv_state_free(pvstate_t state)
|
||||
/*@+keeptrans@ */
|
||||
/* splint - explicitly freeing this structure, so free() here is OK. */
|
||||
|
||||
if (NULL != state->display.history)
|
||||
free(state->display.history);
|
||||
state->display.history = NULL;
|
||||
if (NULL != state->transfer.line_positions)
|
||||
free(state->transfer.line_positions);
|
||||
state->transfer.line_positions = NULL;
|
||||
|
||||
if (NULL != state->calc.history)
|
||||
free(state->calc.history);
|
||||
state->calc.history = NULL;
|
||||
|
||||
if (NULL != state->files.filename) {
|
||||
unsigned int file_idx;
|
||||
@@ -234,6 +289,11 @@ void pv_state_cursor_set(pvstate_t state, bool val)
|
||||
state->control.cursor = val;
|
||||
}
|
||||
|
||||
void pv_state_show_stats_set(pvstate_t state, bool val)
|
||||
{
|
||||
state->control.show_stats = val;
|
||||
}
|
||||
|
||||
void pv_state_numeric_set(pvstate_t state, bool val)
|
||||
{
|
||||
state->control.numeric = val;
|
||||
@@ -249,6 +309,11 @@ void pv_state_delay_start_set(pvstate_t state, double val)
|
||||
state->control.delay_start = val;
|
||||
}
|
||||
|
||||
void pv_state_rate_gauge_set(pvstate_t state, bool val)
|
||||
{
|
||||
state->control.rate_gauge = val;
|
||||
}
|
||||
|
||||
void pv_state_linemode_set(pvstate_t state, bool val)
|
||||
{
|
||||
state->control.linemode = val;
|
||||
@@ -406,11 +471,11 @@ void pv_state_average_rate_window_set(pvstate_t state, unsigned int val)
|
||||
val = 1;
|
||||
state->control.average_rate_window = val;
|
||||
if (val >= 20) {
|
||||
state->display.history_len = (size_t) (val / 5 + 1);
|
||||
state->display.history_interval = 5;
|
||||
state->calc.history_len = (size_t) (val / 5 + 1);
|
||||
state->control.history_interval = 5;
|
||||
} else {
|
||||
state->display.history_len = (size_t) (val + 1);
|
||||
state->display.history_interval = 1;
|
||||
state->calc.history_len = (size_t) (val + 1);
|
||||
state->control.history_interval = 1;
|
||||
}
|
||||
pv_alloc_history(state);
|
||||
}
|
||||
|
||||
+48
-7
@@ -636,6 +636,7 @@ static int pv__transfer_read(pvstate_t state, int fd, bool *eof_in, bool *eof_ou
|
||||
static int pv__transfer_write(pvstate_t state, bool *eof_in, bool *eof_out, long *lineswritten)
|
||||
{
|
||||
ssize_t nwritten;
|
||||
int write_errno;
|
||||
|
||||
if (NULL == state->transfer.transfer_buffer) {
|
||||
pv_error(state, "%s", _("no transfer buffer allocated"));
|
||||
@@ -646,6 +647,7 @@ static int pv__transfer_write(pvstate_t state, bool *eof_in, bool *eof_out, long
|
||||
}
|
||||
|
||||
nwritten = 0;
|
||||
write_errno = 0;
|
||||
|
||||
if (state->control.discard_input) {
|
||||
nwritten = state->transfer.to_write;
|
||||
@@ -693,6 +695,7 @@ static int pv__transfer_write(pvstate_t state, bool *eof_in, bool *eof_out, long
|
||||
(size_t) (state->transfer.to_write),
|
||||
state->control.sync_after_write);
|
||||
if (nwritten < 0) {
|
||||
write_errno = (int) errno;
|
||||
debug("%s: %ld: %s", "bytes written", (long) nwritten, strerror(errno));
|
||||
} else {
|
||||
debug("%s: %ld", "bytes written", (long) nwritten);
|
||||
@@ -723,6 +726,22 @@ static int pv__transfer_write(pvstate_t state, bool *eof_in, bool *eof_out, long
|
||||
char *ptr;
|
||||
long lines = 0;
|
||||
|
||||
/*
|
||||
* Line mode - look through what we've just written
|
||||
* to count how many lines there were.
|
||||
*/
|
||||
|
||||
/* Allocate buffer to remember line positions. */
|
||||
if (NULL == state->transfer.line_positions) {
|
||||
state->transfer.line_positions_capacity = MAX_LINE_POSITIONS;
|
||||
state->transfer.line_positions =
|
||||
calloc((size_t) (state->transfer.line_positions_capacity), sizeof(off_t));
|
||||
if (NULL == state->transfer.line_positions) {
|
||||
pv_error(state, "%s: %s", _("line position buffer allocation failed"),
|
||||
strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
if (state->control.null_terminated_lines) {
|
||||
separator = '\0';
|
||||
} else {
|
||||
@@ -732,9 +751,30 @@ static int pv__transfer_write(pvstate_t state, bool *eof_in, bool *eof_out, long
|
||||
ptr = (char *) (state->transfer.transfer_buffer + state->transfer.write_position - 1);
|
||||
for (ptr++;
|
||||
ptr - (char *) state->transfer.transfer_buffer - state->transfer.write_position <
|
||||
(size_t) nwritten; ptr++) {
|
||||
if (*ptr == separator)
|
||||
++lines;
|
||||
(size_t) nwritten; ptr++, state->transfer.last_output_position++) {
|
||||
if (*ptr != separator)
|
||||
continue;
|
||||
|
||||
/* Separator found - increment line count. */
|
||||
++lines;
|
||||
|
||||
if (NULL == state->transfer.line_positions)
|
||||
continue;
|
||||
|
||||
/* Store the position of the separator. */
|
||||
state->transfer.line_positions[state->transfer.line_positions_head] =
|
||||
state->transfer.last_output_position;
|
||||
state->transfer.line_positions_head++;
|
||||
|
||||
/* Circular buffer - wrap around. */
|
||||
if (state->transfer.line_positions_head >= state->transfer.line_positions_capacity) {
|
||||
state->transfer.line_positions_head = 0;
|
||||
}
|
||||
|
||||
/* Increment count of line positions, if below capacity. */
|
||||
if (state->transfer.line_positions_length < state->transfer.line_positions_capacity) {
|
||||
state->transfer.line_positions_length++;
|
||||
}
|
||||
}
|
||||
|
||||
*lineswritten += lines;
|
||||
@@ -808,11 +848,11 @@ static int pv__transfer_write(pvstate_t state, bool *eof_in, bool *eof_out, long
|
||||
* blocked on first write such that nwritten == 0, just wait a bit and
|
||||
* then return zero, since this was a transient error.
|
||||
*/
|
||||
if ((0 == nwritten) || (EINTR == errno) || (EAGAIN == errno)) {
|
||||
if ((0 == nwritten) || (EINTR == write_errno) || (EAGAIN == write_errno)) {
|
||||
if (0 == nwritten) {
|
||||
debug("%s", "attempted write blocked - waiting briefly");
|
||||
} else {
|
||||
debug("%s: %s", "transient write error - waiting briefly", strerror(errno));
|
||||
debug("%s: %s", "transient write error - waiting briefly", strerror(write_errno));
|
||||
}
|
||||
(void) is_data_ready(-1, NULL, -1, NULL, 10000);
|
||||
return 0;
|
||||
@@ -822,13 +862,14 @@ static int pv__transfer_write(pvstate_t state, bool *eof_in, bool *eof_out, long
|
||||
* SIGPIPE means we've finished. Don't output an error because it's
|
||||
* not really our error to report.
|
||||
*/
|
||||
if (EPIPE == errno) {
|
||||
if (EPIPE == write_errno) {
|
||||
*eof_in = true;
|
||||
*eof_out = true;
|
||||
state->flag.pipe_closed = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
pv_error(state, "%s: %s", _("write failed"), strerror(errno));
|
||||
pv_error(state, "%s: %s", _("write failed"), strerror(write_errno));
|
||||
state->status.exit_status |= PV_ERROREXIT_TRANSFER;
|
||||
*eof_out = true;
|
||||
state->transfer.written = -1;
|
||||
|
||||
+2
-2
@@ -498,8 +498,8 @@ int pv_watchpid_scanfds(pvstate_t state,
|
||||
/*@-mustfreeonly@ *//* splint - this is not a leak, this is a new entry. */
|
||||
info_array[use_idx].state->display.display_buffer = NULL;
|
||||
info_array[use_idx].state->display.display_buffer_size = 0;
|
||||
info_array[use_idx].state->display.history = NULL;
|
||||
info_array[use_idx].state->display.history_len = 0;
|
||||
info_array[use_idx].state->calc.history = NULL;
|
||||
info_array[use_idx].state->calc.history_len = 0;
|
||||
/*@+mustfreeonly@ */
|
||||
pv_state_average_rate_window_set(info_array[use_idx].state, state->control.average_rate_window);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user