#define streq(s, t) (strcmp ((s), (t)) == 0)
#define PROC_MOUNTS "/proc/mounts"
+extern char *progname;
extern int verbose;
/* Information about mtab. ------------------------------------*/
return;
}
if (verbose)
- printf (_("mount: could not open %s - "
- "using %s instead\n"),
- MOUNTED, PROC_MOUNTS);
+ printf(_("%s: could not open %s; using %s instead\n"),
+ progname, MOUNTED, PROC_MOUNTS);
}
read_mntentchn(mfp, fnam, mc);
}
if (fcntl (lockfile_fd, F_SETLK, &flock) == -1) {
if (verbose) {
int errsv = errno;
- printf(_("Can't lock lock file %s: %s\n"),
- MOUNTED_LOCK, strerror (errsv));
+ nfs_error(_("%s: Can't lock lock file "
+ "%s: %s"), progname,
+ MOUNTED_LOCK,
+ strerror (errsv));
}
/* proceed anyway */
}
if (fchmod (fileno (mftmp->mntent_fp),
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) < 0) {
int errsv = errno;
- fprintf(stderr, _("error changing mode of %s: %s\n"),
- MOUNTED_TEMP, strerror (errsv));
+ nfs_error(_("%s: error changing mode of %s: %s"),
+ progname, MOUNTED_TEMP, strerror (errsv));
}
nfs_endmntent (mftmp);
/* rename mtemp to mtab */
if (rename (MOUNTED_TEMP, MOUNTED) < 0) {
int errsv = errno;
- fprintf(stderr, _("can't rename %s to %s: %s\n"),
- MOUNTED_TEMP, MOUNTED, strerror(errsv));
+ nfs_error(_("%s: can't rename %s to %s: %s\n"),
+ progname, MOUNTED_TEMP, MOUNTED,
+ strerror(errsv));
}
leave: