The new 'date' option --resolution outputs the timestamp resolution.
+ With conv=fdatasync or conv=fsync, dd status=progress now reports
+ any extra final progress just before synchronizing output data,
+ since synchronizing can take a long time.
+
sort --debug now diagnoses issues with --field-separator characters
that conflict with characters possibly used in numbers.
/* Number of bytes written. */
static intmax_t w_bytes = 0;
+/* Last-reported number of bytes written, or negative if never reported. */
+static intmax_t reported_w_bytes = -1;
+
/* Time that dd started. */
static xtime_t start_time;
}
else
fputc ('\n', stderr);
+
+ reported_w_bytes = w_bytes;
}
static void
}
}
+ /* fdatasync/fsync can take a long time, so issue a final progress
+ indication now if progress has been made since the previous indication. */
+ if (conversions_mask & (C_FDATASYNC | C_FSYNC)
+ && status_level == STATUS_PROGRESS
+ && 0 <= reported_w_bytes && reported_w_bytes < w_bytes)
+ print_xfer_stats (0);
+
if ((conversions_mask & C_FDATASYNC) && ifdatasync (STDOUT_FILENO) != 0)
{
if (errno != ENOSYS && errno != EINVAL)