Add errno.h
[oweals/busybox.git] / mtab.c
diff --git a/mtab.c b/mtab.c
index 8984d88227078d7170fa2164036013ec595db385..ab805e9c18d316c71c53dbba05b5c9f90f5587c5 100644 (file)
--- a/mtab.c
+++ b/mtab.c
@@ -27,7 +27,7 @@ void erase_mtab(const char *name)
                /* Bummer.  fall back on trying the /proc filesystem */
                && (mountTable = setmntent("/proc/mounts", "r")) == 0) {
 #endif
-               perror(mtab_file);
+               perror_msg("%s", mtab_file);
                return;
        }
 
@@ -55,7 +55,7 @@ void erase_mtab(const char *name)
                }
                endmntent(mountTable);
        } else if (errno != EROFS)
-               perror(mtab_file);
+               perror_msg("%s", mtab_file);
 }
 
 void write_mtab(char *blockDevice, char *directory,
@@ -65,7 +65,7 @@ void write_mtab(char *blockDevice, char *directory,
        struct mntent m;
 
        if (mountTable == 0) {
-               perror(mtab_file);
+               perror_msg("%s", mtab_file);
                return;
        }
        if (mountTable) {
@@ -76,7 +76,7 @@ void write_mtab(char *blockDevice, char *directory,
 
 #ifdef BB_FEATURE_USE_PROCFS
                if (filesystemType == 0) {
-                       struct mntent *p = findMountPoint(blockDevice, "/proc/mounts");
+                       struct mntent *p = find_mount_point(blockDevice, "/proc/mounts");
 
                        if (p && p->mnt_type)
                                filesystemType = p->mnt_type;