Signed-off-by: Sami Kerola <kerolasa@iki.fi>
#include "nls.h"
#include "blkdev.h"
#include "strutils.h"
+#include "closestream.h"
#define DO_PS_FIDDLING
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
progname = argv[0];
if ((p = strrchr(progname, '/')) != NULL)
#include "sundries.h" /* for xmalloc */
#include "nls.h"
#include "mangle.h"
+#include "closestream.h"
static int
is_space_or_tab (char c) {
}
void
-my_endmntent (mntFILE *mfp) {
+my_endmntent(mntFILE * mfp) {
if (mfp) {
if (mfp->mntent_fp)
- fclose(mfp->mntent_fp);
+ if (close_stream(mfp->mntent_fp))
+ fprintf(stderr, _("write error"));
free(mfp->mntent_file);
free(mfp);
}
#include "env.h"
#include "nls.h"
#include "strutils.h"
+#include "closestream.h"
#if defined(MNT_FORCE)
/* Interesting ... it seems libc knows about MNT_FORCE and presumably
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
progname = argv[0];
if ((p = strrchr(progname, '/')) != NULL)