X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Frmtab.c;h=4cbd28591270a184b68e7ecedddc4828080814bb;hp=da40e486a052e45de082bf8dd654cbefd2e6bcc1;hb=4c337e2131123c339bc4921779b57b69b77be2fd;hpb=70a0e44cc77a7d8fc78c5514889bcd5d4fde3599 diff --git a/support/nfs/rmtab.c b/support/nfs/rmtab.c index da40e48..4cbd285 100644 --- a/support/nfs/rmtab.c +++ b/support/nfs/rmtab.c @@ -6,7 +6,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -114,8 +116,14 @@ endrmtabent(void) void fendrmtabent(FILE *fp) { - if (fp) + if (fp) { + /* If it was written to, we really want + * to flush to disk before returning + */ + fflush(fp); + fdatasync(fileno(fp)); fclose(fp); + } } void