-#include <fstab.h>
-
-const char mount_usage[] = "Usage:\tmount [flags]\n"
- "\tmount [flags] device directory [-o options,more-options]\n"
- "\n"
- "Flags:\n"
- "\t-a:\tMount all file systems in fstab.\n"
- "\t-o option:\tOne of many filesystem options, listed below.\n"
- "\t-r:\tMount the filesystem read-only.\n"
- "\t-t filesystem-type:\tSpecify the filesystem type.\n"
- "\t-w:\tMount for reading and writing (default).\n"
- "\n"
- "Options for use with the \"-o\" flag:\n"
- "\tasync / sync:\tWrites are asynchronous / synchronous.\n"
- "\tdev / nodev:\tAllow use of special device files / disallow them.\n"
- "\texec / noexec:\tAllow use of executable files / disallow them.\n"
- "\tsuid / nosuid:\tAllow set-user-id-root programs / disallow them.\n"
- "\tremount: Re-mount a currently-mounted filesystem, changing its flags.\n"
- "\tro / rw: Mount for read-only / read-write.\n"
- "\t"
- "There are EVEN MORE flags that are specific to each filesystem.\n"
- "You'll have to see the written documentation for those.\n";
+#if defined BB_FEATURE_USE_DEVPS_PATCH
+#include <linux/devmtab.h>
+#endif
+
+
+#define MS_MGC_VAL 0xc0ed0000 /* Magic number indicatng "new" flags */
+#define MS_RDONLY 1 /* Mount read-only */
+#define MS_NOSUID 2 /* Ignore suid and sgid bits */
+#define MS_NODEV 4 /* Disallow access to device special files */
+#define MS_NOEXEC 8 /* Disallow program execution */
+#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
+#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
+#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
+#define S_QUOTA 128 /* Quota initialized for file/directory/symlink */
+#define S_APPEND 256 /* Append-only file */
+#define S_IMMUTABLE 512 /* Immutable file */
+#define MS_NOATIME 1024 /* Do not update access times. */
+#define MS_NODIRATIME 2048 /* Do not update directory access times */
+
+
+
+#if defined BB_FEATURE_MOUNT_LOOP
+#include <fcntl.h>
+#include <sys/ioctl.h>
+static int use_loop = FALSE;
+#endif
+
+extern int mount (__const char *__special_file, __const char *__dir,
+ __const char *__fstype, unsigned long int __rwflag,
+ __const void *__data);
+extern int umount (__const char *__special_file);
+extern int umount2 (__const char *__special_file, int __flags);
+
+
+extern const char mtab_file[]; /* Defined in utility.c */
+
+static const char mount_usage[] =
+ "mount [flags] device directory [-o options,more-options]\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+ "\nMount a filesystem\n\n"
+ "Flags:\n"
+ "\t-a:\t\tMount all filesystems in fstab.\n"
+#ifdef BB_MTAB
+ "\t-f:\t\t\"Fake\" mount. Add entry to mount table but don't mount it.\n"
+ "\t-n:\t\tDon't write a mount table entry.\n"
+#endif
+ "\t-o option:\tOne of many filesystem options, listed below.\n"
+ "\t-r:\t\tMount the filesystem read-only.\n"
+ "\t-t fs-type:\tSpecify the filesystem type.\n"
+ "\t-w:\t\tMount for reading and writing (default).\n"
+ "\n"
+ "Options for use with the \"-o\" flag:\n"
+ "\tasync/sync:\tWrites are asynchronous / synchronous.\n"
+ "\tatime/noatime:\tEnable / disable updates to inode access times.\n"
+ "\tdev/nodev:\tAllow use of special device files / disallow them.\n"
+ "\texec/noexec:\tAllow use of executable files / disallow them.\n"
+#if defined BB_FEATURE_MOUNT_LOOP
+ "\tloop:\t\tMounts a file via loop device.\n"
+#endif
+ "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n"
+ "\tremount:\tRe-mount a currently-mounted filesystem, changing its flags.\n"
+ "\tro/rw:\t\tMount for read-only / read-write.\n"
+ "\nThere are EVEN MORE flags that are specific to each filesystem.\n"
+ "You'll have to see the written documentation for those.\n"
+#endif
+ ;
+