From: Jim Meyering Date: Sat, 23 Jan 1999 23:07:53 +0000 (+0000) Subject: (fdatasync) [! HAVE_FDATASYNC]: New function. X-Git-Tag: TEXTUTILS-1_22h~122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70db3065cb3e35afc9d83b22fb497a87d8357891;p=platform%2Fupstream%2Fcoreutils.git (fdatasync) [! HAVE_FDATASYNC]: New function. --- diff --git a/src/shred.c b/src/shred.c index c9d1ebf..7dec54d 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 ();