making note of my changes.
[oweals/busybox.git] / mount.c
diff --git a/mount.c b/mount.c
index a9463afbac2ef119c25195b42e82438c73b6a7d1..ee6fe15e63495b78672a5ae3d6d41909a931ffe9 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -115,6 +115,18 @@ do_mount(char* specialfile, char* dir, char* filesystemtype,
 #endif
 
 
+#if defined BB_MTAB
+#define whine_if_fstab_is_missing() {} 
+#else
+extern void whine_if_fstab_is_missing()
+{
+    struct stat statBuf;
+    if (stat("/etc/fstab", &statBuf) < 0) 
+       fprintf(stderr, "/etc/fstab file missing -- install one to name /dev/root.\n\n");
+}
+#endif
+
+
 /* Seperate standard mount options from the nonstandard string options */
 static void
 parse_mount_options ( char *options, unsigned long *flags, char *strflags)
@@ -163,6 +175,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
 
     char buf[255];
 
+#if defined BB_FEATURE_USE_PROCFS
     if (strcmp(filesystemType, "auto") == 0) {
        FILE *f = fopen ("/proc/filesystems", "r");
 
@@ -189,7 +202,9 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
            }
        }
        fclose (f);
-    } else {
+    } else
+#endif
+    {
        status = do_mount (blockDevice, directory, filesystemType,
                        flags | MS_MGC_VAL, string_flags, useMtab, 
                        fakeIt, mtab_opts);