diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2007-02-22 19:09:35 +0100 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-02-22 19:09:35 +0100 |
commit | 4e73fea3e3b6fb721b91bb81e5357fb805eb590d (patch) | |
tree | 9bd24b61c9e42d7f2053e34711373e29309b866a /src | |
parent | c450b625b4351aa5ab87a4334f95b6a24f3a0022 (diff) | |
download | coreutils-4e73fea3e3b6fb721b91bb81e5357fb805eb590d.tar.xz |
Honor dd's noatime flag if possible, even if not supported on build fs
* doc/coreutils.texi (dd invocation): Warn that noatime might not be
reliable.
* src/dd.c (flags, usage): Look at O_NOATIME, not
HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
flag, so that dd attempts O_NOATIME even if the build file system
does not support it. Problem reported by Jim Meyering today in
bug-coreutils.
* tests/dd/misc: Generate a warning, not a failure, if noatime
exists but fails.
Diffstat (limited to 'src')
-rw-r--r-- | src/dd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -265,7 +265,7 @@ static struct symbol_value const flags[] = {"direct", O_DIRECT}, {"directory", O_DIRECTORY}, {"dsync", O_DSYNC}, - {"noatime", HAVE_WORKING_O_NOATIME ? O_NOATIME : 0}, + {"noatime", O_NOATIME}, {"noctty", O_NOCTTY}, {"nofollow", HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0}, {"nolinks", O_NOLINKS}, @@ -472,7 +472,7 @@ Each FLAG symbol may be:\n\ fputs (_(" sync likewise, but also for metadata\n"), stdout); if (O_NONBLOCK) fputs (_(" nonblock use non-blocking I/O\n"), stdout); - if (HAVE_WORKING_O_NOATIME) + if (O_NOATIME) fputs (_(" noatime do not update access time\n"), stdout); if (O_NOCTTY) fputs (_(" noctty do not assign controlling terminal from file\n"), |