summaryrefslogtreecommitdiffstats
path: root/mount/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'mount/mount.c')
-rw-r--r--mount/mount.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/mount/mount.c b/mount/mount.c
index 60fe4fec9..a28da4860 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -22,13 +22,13 @@
#include <sys/mount.h>
#include <mntent.h>
-#include <paths.h>
#ifdef HAVE_LIBSELINUX
#include <selinux/selinux.h>
#include <selinux/context.h>
#endif
+#include "pathnames.h"
#include "fsprobe.h"
#include "mount_constants.h"
#include "sundries.h"
@@ -38,7 +38,6 @@
#include "lomount.h"
#include "loop.h"
#include "getusername.h"
-#include "mount_paths.h"
#include "env.h"
#include "nls.h"
#include "blkdev.h"
@@ -524,11 +523,11 @@ create_mtab (void) {
lock_mtab();
- mfp = my_setmntent (MOUNTED, "a+");
+ mfp = my_setmntent (_PATH_MOUNTED, "a+");
if (mfp == NULL || mfp->mntent_fp == NULL) {
int errsv = errno;
die (EX_FILEIO, _("mount: can't open %s for writing: %s"),
- MOUNTED, strerror (errsv));
+ _PATH_MOUNTED, strerror (errsv));
}
/* Find the root entry by looking it up in fstab */
@@ -545,7 +544,7 @@ create_mtab (void) {
if (my_addmntent (mfp, &mnt) == 1) {
int errsv = errno;
die (EX_FILEIO, _("mount: error writing %s: %s"),
- MOUNTED, strerror (errsv));
+ _PATH_MOUNTED, strerror (errsv));
}
}
if (fchmod (fileno (mfp->mntent_fp), 0644) < 0)
@@ -553,7 +552,7 @@ create_mtab (void) {
int errsv = errno;
die (EX_FILEIO,
_("mount: error changing mode of %s: %s"),
- MOUNTED, strerror (errsv));
+ _PATH_MOUNTED, strerror (errsv));
}
my_endmntent (mfp);
@@ -693,7 +692,7 @@ guess_fstype_by_devname(const char *devname)
if (!type)
printf (_(" I will try all types mentioned in %s or %s\n"),
- ETC_FILESYSTEMS, PROC_FILESYSTEMS);
+ _PATH_FILESYSTEMS, _PATH_PROC_FILESYSTEMS);
else if (!strcmp(type, "swap"))
printf (_(" and it looks like this is swapspace\n"));
else
@@ -988,16 +987,16 @@ update_mtab_entry(const char *spec, const char *node, const char *type,
mntFILE *mfp;
lock_mtab();
- mfp = my_setmntent(MOUNTED, "a+");
+ mfp = my_setmntent(_PATH_MOUNTED, "a+");
if (mfp == NULL || mfp->mntent_fp == NULL) {
int errsv = errno;
- error(_("mount: can't open %s: %s"), MOUNTED,
+ error(_("mount: can't open %s: %s"), _PATH_MOUNTED,
strerror (errsv));
} else {
if ((my_addmntent (mfp, &mnt)) == 1) {
int errsv = errno;
error(_("mount: error writing %s: %s"),
- MOUNTED, strerror (errsv));
+ _PATH_MOUNTED, strerror (errsv));
}
}
my_endmntent(mfp);
@@ -1959,9 +1958,10 @@ main(int argc, char *argv[]) {
}
if (verbose > 2) {
- printf("mount: fstab path: \"%s\"\n", _PATH_FSTAB);
- printf("mount: lock path: \"%s\"\n", MOUNTED_LOCK);
- printf("mount: temp path: \"%s\"\n", MOUNTED_TEMP);
+ printf("mount: fstab path: \"%s\"\n", _PATH_MNTTAB);
+ printf("mount: mtab path: \"%s\"\n", _PATH_MOUNTED);
+ printf("mount: lock path: \"%s\"\n", _PATH_MOUNTED_LOCK);
+ printf("mount: temp path: \"%s\"\n", _PATH_MOUNTED_TMP);
}
argc -= optind;
@@ -1985,7 +1985,7 @@ main(int argc, char *argv[]) {
if (!nomtab && mtab_does_not_exist()) {
if (verbose > 1)
printf(_("mount: no %s found - creating it..\n"),
- MOUNTED);
+ _PATH_MOUNTED);
create_mtab ();
}
@@ -2018,7 +2018,7 @@ main(int argc, char *argv[]) {
die (EX_USAGE,
_("mount: can't find %s in %s or %s"),
- *argv, _PATH_FSTAB, MOUNTED);
+ *argv, _PATH_MNTTAB, _PATH_MOUNTED);
}
result = mount_one (xstrdup (mc->m.mnt_fsname),