-const char umount_usage[] =
-"Usage: umount filesystem\n"
-" or: umount directory\n"
-" or: umount -a"
-"to unmount all mounted file systems.\n";
+static const char umount_usage[] =
+"Usage: umount [flags] filesystem|directory\n"
+"Optional Flags:\n"
+"\t-a:\tUnmount all file systems"
+#ifdef BB_MTAB
+" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries\n"
+#else
+"\n"
+#endif
+;
+
+
+static int useMtab = TRUE;
+static int umountAll = FALSE;
+extern const char mtab_file[]; /* Defined in utility.c */
+
+#if ! defined BB_MTAB
+#define do_umount( blockDevice, useMtab) umount( blockDevice)
+#else
+static int
+do_umount(const char* name, int useMtab)
+{
+ int status = umount(name);
+
+ if ( status == 0 ) {
+ if ( useMtab==TRUE )
+ erase_mtab(name);
+ return 0;
+ }
+ else
+ return( status);
+}
+#endif