summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-23 23:07:53 +0000
committerJim Meyering <jim@meyering.net>1999-01-23 23:07:53 +0000
commit70db3065cb3e35afc9d83b22fb497a87d8357891 (patch)
tree6fb63eaa151ae52e6933e419dc748400037aa87a /src
parentd91597a2e874209be080636e94a13151e3fd43ad (diff)
downloadcoreutils-70db3065cb3e35afc9d83b22fb497a87d8357891.tar.xz
(fdatasync) [! HAVE_FDATASYNC]: New function.
Diffstat (limited to 'src')
-rw-r--r--src/shred.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/shred.c b/src/shred.c
index c9d1ebf04..7dec54d1c 100644
--- a/src/shred.c
+++ b/src/shred.c
@@ -142,6 +142,14 @@ FIXME maybe add more discussion here?\n\
exit (status);
}
+#if ! HAVE_FDATASYNC
+static int
+fdatasync (int fd)
+{
+ return fsync (fd);
+}
+#endif
+
/*
* --------------------------------------------------------------------
* Bob Jenkins' cryptographic random number generator, ISAAC.
@@ -1200,6 +1208,10 @@ wipename (char *oldname, struct Options const *flags)
sync (); /* Force directory out */
if (origname)
{
+ /* The use of origname (rather than oldname) here is
+ deliberate. It makes the -v output more intelligible
+ at the expense of making the `renamed to ...' messages
+ use the logical (original) file name. */
pfstatus (_("%s: renamed to `%s'"), origname, newname);
if (flags->verbose > 1)
flushstatus ();