No reason to include fstab. It breaks libc5, does nothing for glibc.
[oweals/busybox.git] / mtab.c
diff --git a/mtab.c b/mtab.c
index ab805e9c18d316c71c53dbba05b5c9f90f5587c5..8411fe1fafe0e188b7f7c0a98b69aef4cc0588ba 100644 (file)
--- a/mtab.c
+++ b/mtab.c
@@ -1,13 +1,12 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
 #include <string.h>
 #include <stdio.h>
 #include <mntent.h>
-#include <fstab.h>
 #include <sys/mount.h>
+#include "busybox.h"
 
 extern const char mtab_file[]; /* Defined in utility.c */
 
@@ -21,12 +20,8 @@ void erase_mtab(const char *name)
 
        /* Check if reading the mtab file failed */
        if (mountTable == 0
-#if ! defined BB_FEATURE_USE_PROCFS
-               ) {
-#else
-               /* Bummer.  fall back on trying the /proc filesystem */
-               && (mountTable = setmntent("/proc/mounts", "r")) == 0) {
-#endif
+                       /* Bummer.  fall back on trying the /proc filesystem */
+                       && (mountTable = setmntent("/proc/mounts", "r")) == 0) {
                perror_msg("%s", mtab_file);
                return;
        }
@@ -74,14 +69,12 @@ void write_mtab(char *blockDevice, char *directory,
                if (length > 1 && directory[length - 1] == '/')
                        directory[length - 1] = '\0';
 
-#ifdef BB_FEATURE_USE_PROCFS
                if (filesystemType == 0) {
                        struct mntent *p = find_mount_point(blockDevice, "/proc/mounts");
 
                        if (p && p->mnt_type)
                                filesystemType = p->mnt_type;
                }
-#endif
                m.mnt_fsname = blockDevice;
                m.mnt_dir = directory;
                m.mnt_type = filesystemType ? filesystemType : "default";