[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] status=noinfo option for dd
From: |
Pozsar Balazs |
Subject: |
[PATCH] status=noinfo option for dd |
Date: |
Wed, 17 Feb 2010 23:52:03 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi all,
Suppressing all dd status info can be useful sometimes, so please
consider merging this patch. Thanks.
diff -Naurd a/man/dd.1 b/man/dd.1
--- a/man/dd.1 2010-01-12 11:56:07.000000000 +0100
+++ b/man/dd.1 2010-02-17 23:40:32.555209552 +0100
@@ -51,6 +51,9 @@
.TP
status=noxfer
suppress transfer statistics
+.TP
+status=noinfo
+suppress all transfer info
.PP
BLOCKS and BYTES may be followed by the following multiplicative suffixes:
c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M
diff -Naurd a/src/dd.c b/src/dd.c
--- a/src/dd.c 2010-01-03 18:06:20.000000000 +0100
+++ b/src/dd.c 2010-02-17 23:40:08.774188153 +0100
@@ -132,7 +132,8 @@
/* Status bit masks. */
enum
{
- STATUS_NOXFER = 01
+ STATUS_NOXFER = 01,
+ STATUS_NOINFO
};
/* The name of the input file, or NULL for the standard input. */
@@ -320,6 +321,7 @@
static struct symbol_value const statuses[] =
{
{"noxfer", STATUS_NOXFER},
+ {"noinfo", STATUS_NOINFO},
{"", 0}
};
@@ -488,6 +490,7 @@
seek=BLOCKS skip BLOCKS obs-sized blocks at start of output\n\
skip=BLOCKS skip BLOCKS ibs-sized blocks at start of input\n\
status=noxfer suppress transfer statistics\n\
+ status=noinfo suppress all transfer info\n\
"), stdout);
fputs (_("\
\n\
@@ -611,6 +614,9 @@
double delta_s;
char const *bytes_per_second;
+ if (status_flags & STATUS_NOINFO)
+ return;
+
fprintf (stderr,
_("%"PRIuMAX"+%"PRIuMAX" records in\n"
"%"PRIuMAX"+%"PRIuMAX" records out\n"),
--
pozsy
- [PATCH] status=noinfo option for dd,
Pozsar Balazs <=