summaryrefslogtreecommitdiffstats
path: root/lib/libstand/cd9660.c
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-02-11 22:55:24 +0000
committerian <ian@FreeBSD.org>2015-02-11 22:55:24 +0000
commitf8178723e9bb3e51a017187b2a3694e110ad5202 (patch)
treef1c6cb0a9a16de5c5aae59f0978cc9c2a2d77234 /lib/libstand/cd9660.c
parentba124c2ef35f4bf14972d64b724ac66e69bbed26 (diff)
downloadFreeBSD-src-f8178723e9bb3e51a017187b2a3694e110ad5202.zip
FreeBSD-src-f8178723e9bb3e51a017187b2a3694e110ad5202.tar.gz
MFC r276079, r276087:
Add a divisor parameter to twiddle() so that callers can request that output only happen on every Nth call. Add a new loader(8) variable, twiddle_divisor, allowing control over the output frequency of the "twiddle" IO progress indicator.
Diffstat (limited to 'lib/libstand/cd9660.c')
-rw-r--r--lib/libstand/cd9660.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libstand/cd9660.c b/lib/libstand/cd9660.c
index 91a091b..09cc7f8 100644
--- a/lib/libstand/cd9660.c
+++ b/lib/libstand/cd9660.c
@@ -286,7 +286,7 @@ cd9660_open(const char *path, struct open_file *f)
buf = malloc(buf_size = ISO_DEFAULT_BLOCK_SIZE);
vd = buf;
for (bno = 16;; bno++) {
- twiddle();
+ twiddle(1);
rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno),
ISO_DEFAULT_BLOCK_SIZE, buf, &read);
if (rc)
@@ -319,7 +319,7 @@ cd9660_open(const char *path, struct open_file *f)
while (off < dsize) {
if ((off % ISO_DEFAULT_BLOCK_SIZE) == 0) {
- twiddle();
+ twiddle(1);
rc = f->f_dev->dv_strategy
(f->f_devdata, F_READ,
cdb2devb(bno + boff),
@@ -379,7 +379,7 @@ cd9660_open(const char *path, struct open_file *f)
/* Check for Rock Ridge since we didn't in the loop above. */
bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length);
- twiddle();
+ twiddle(1);
rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno),
ISO_DEFAULT_BLOCK_SIZE, buf, &read);
if (rc)
@@ -436,7 +436,7 @@ buf_read_file(struct open_file *f, char **buf_p, size_t *size_p)
if (fp->f_buf == (char *)0)
fp->f_buf = malloc(ISO_DEFAULT_BLOCK_SIZE);
- twiddle();
+ twiddle(16);
rc = f->f_dev->dv_strategy(f->f_devdata, F_READ,
cdb2devb(blkno), ISO_DEFAULT_BLOCK_SIZE, fp->f_buf, &read);
if (rc)
OpenPOWER on IntegriCloud