Page MenuHomeFreeBSD

D16960.diff
No OneTemporary

D16960.diff

Index: head/bin/dd/misc.c
===================================================================
--- head/bin/dd/misc.c
+++ head/bin/dd/misc.c
@@ -111,7 +111,7 @@
{
static int outlen;
char si[4 + 1 + 2 + 1]; /* 123 <space> <suffix> NUL */
- char iec[4 + 1 + 2 + 1]; /* 123 <space> <suffix> NUL */
+ char iec[4 + 1 + 3 + 1]; /* 123 <space> <suffix> NUL */
char persec[4 + 1 + 2 + 1]; /* 123 <space> <suffix> NUL */
char *buf;
double secs;
@@ -121,11 +121,11 @@
HN_DECIMAL | HN_DIVISOR_1000);
humanize_number(iec, sizeof(iec), (int64_t)st.bytes, "B", HN_AUTOSCALE,
HN_DECIMAL | HN_IEC_PREFIXES);
- humanize_number(persec, sizeof(iec), (int64_t)(st.bytes / secs), "B",
+ humanize_number(persec, sizeof(persec), (int64_t)(st.bytes / secs), "B",
HN_AUTOSCALE, HN_DECIMAL | HN_DIVISOR_1000);
asprintf(&buf, " %'ju bytes (%s, %s) transferred %.3fs, %s/s",
(uintmax_t)st.bytes, si, iec, secs, persec);
- outlen = fprintf(stderr, "%-*s\r", outlen, buf);
+ outlen = fprintf(stderr, "%-*s\r", outlen, buf) - 1;
fflush(stderr);
free(buf);
need_progress = 0;

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 1:08 AM (19 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15571107
Default Alt Text
D16960.diff (1 KB)

Event Timeline