[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7362: dd strangeness
From: |
Pádraig Brady |
Subject: |
bug#7362: dd strangeness |
Date: |
Sat, 05 Mar 2011 01:44:16 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
I'm going to apply the following.
commit decea1c17bcbce3f70bfb50b7de66de5eaba9b91
Author: Pádraig Brady <address@hidden>
Date: Fri Feb 25 12:27:25 2011 +0000
dd: warn when we disable oflag=direct not at EOF
An alternative to this is to auto enable iflag=fullblock
when oflag=direct and bs= is specified.
It was thought better though, to warn about the specific issue,
and give full control of dd's options to the user.
* src/dd.c (iwrite): Warn, when we write after having
disabled O_DIRECT.
See https://bugzilla.redhat.com/show_bug.cgi?id=614605
diff --git a/src/dd.c b/src/dd.c
index daddc1e..fd468a6 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -837,6 +837,12 @@ iwrite (int fd, char const *buf, size_t size)
{
size_t total_written = 0;
+ if ((output_flags & O_DIRECT) && w_partial == 1)
+ {
+ error (0, 0, _("dd: warning: partial read; oflag=direct disabled; "
+ "suggest iflag=fullblock"));
+ }
+
if ((output_flags & O_DIRECT) && size < output_blocksize)
{
int old_flags = fcntl (STDOUT_FILENO, F_GETFL);
- bug#7362: dd strangeness, (continued)
- bug#7362: dd strangeness, Pádraig Brady, 2011/03/01
- bug#7362: dd strangeness, Pádraig Brady, 2011/03/02
- bug#7362: dd strangeness, Jim Meyering, 2011/03/02
- bug#7362: dd strangeness, Paul Eggert, 2011/03/02
- bug#7362: dd strangeness, Pádraig Brady, 2011/03/02
- bug#7362: dd strangeness, Paul Eggert, 2011/03/02
- bug#7362: dd strangeness,
Pádraig Brady <=
- bug#7362: dd strangeness, Paul Eggert, 2011/03/04
- bug#7362: dd strangeness, Paul Eggert, 2011/03/05
- bug#7362: dd strangeness, Pádraig Brady, 2011/03/05
- bug#7362: dd strangeness, Pádraig Brady, 2011/03/02