ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit c7075764b397aceea0c69ab692021e97d7f202e9
parent 1c4f10e69059ae17049dc66b035a546e1cea5142
Author: Eivind Uggedal <eivind@uggedal.com>
Date:   Tue Mar 15 20:16:05 +0000

dd: allow count=0

Diffstat:
dd.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dd.c b/dd.c @@ -126,7 +126,7 @@ prepare_copy(struct dd_config *ddc, int *ifd, int *ofd) ddc->count *= ddc->bs; /* If no count is given, its the filesize minus skip offset */ - if (ddc->count == 0) + if (ddc->count == (uint64_t) -1) ddc->count = ddc->fsize - ddc->skip; return 0; @@ -243,6 +243,7 @@ main(int argc, char *argv[]) config.bs = 1<<16; config.in = NULL; config.out = NULL; + config.count = (uint64_t) -1; /* emulate 'dd' argument parsing */ for (i = 1; i < argc; ++i) {