Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 12:13:01 +0300
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 12:13:01 +0300
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /libbb/mtab.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
Major coreutils update.
Diffstat (limited to 'libbb/mtab.c')
-rw-r--r--libbb/mtab.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libbb/mtab.c b/libbb/mtab.c
index c521b1e05..54905c724 100644
--- a/libbb/mtab.c
+++ b/libbb/mtab.c
@@ -27,21 +27,20 @@
#include <mntent.h>
#include "libbb.h"
-extern const char mtab_file[]; /* Defined in utility.c */
static const int MS_RDONLY = 1; /* Mount read-only. */
void erase_mtab(const char *name)
{
struct mntent entries[20];
int count = 0;
- FILE *mountTable = setmntent(mtab_file, "r");
+ FILE *mountTable = setmntent(bb_path_mtab_file, "r");
struct mntent *m;
/* Check if reading the mtab file failed */
if (mountTable == 0
/* Bummer. fall back on trying the /proc filesystem */
&& (mountTable = setmntent("/proc/mounts", "r")) == 0) {
- perror_msg("%s", mtab_file);
+ bb_perror_msg(bb_path_mtab_file);
return;
}
@@ -55,7 +54,7 @@ void erase_mtab(const char *name)
count++;
}
endmntent(mountTable);
- if ((mountTable = setmntent(mtab_file, "w"))) {
+ if ((mountTable = setmntent(bb_path_mtab_file, "w"))) {
int i;
for (i = 0; i < count; i++) {
@@ -69,17 +68,17 @@ void erase_mtab(const char *name)
}
endmntent(mountTable);
} else if (errno != EROFS)
- perror_msg("%s", mtab_file);
+ bb_perror_msg(bb_path_mtab_file);
}
void write_mtab(char *blockDevice, char *directory,
char *filesystemType, long flags, char *string_flags)
{
- FILE *mountTable = setmntent(mtab_file, "a+");
+ FILE *mountTable = setmntent(bb_path_mtab_file, "a+");
struct mntent m;
if (mountTable == 0) {
- perror_msg("%s", mtab_file);
+ bb_perror_msg(bb_path_mtab_file);
return;
}
if (mountTable) {