From 70db3065cb3e35afc9d83b22fb497a87d8357891 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 23 Jan 1999 23:07:53 +0000 Subject: [PATCH] (fdatasync) [! HAVE_FDATASYNC]: New function. --- src/shred.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/shred.c b/src/shred.c index c9d1ebf04c..7dec54d1ca 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 (); -- 2.47.3