//config: tree. The 'mount' utility is used to graft a filesystem onto a
//config: particular part of the tree. A filesystem can either live on a block
//config: device, or it can be accessible over the network, as is the case with
-//config: NFS filesystems. Most people using BusyBox will also want to enable
-//config: the 'mount' utility.
+//config: NFS filesystems.
//config:
//config:config FEATURE_MOUNT_FAKE
-//config: bool "Support option -f"
+//config: bool "Support -f (fake mount)"
//config: default y
//config: depends on MOUNT
//config: help
//config: Enable support for faking a file system mount.
//config:
//config:config FEATURE_MOUNT_VERBOSE
-//config: bool "Support option -v"
+//config: bool "Support -v (verbose)"
//config: default y
//config: depends on MOUNT
//config: help
//config: help
//config: This allows for specifying a device by label or uuid, rather than by
//config: name. This feature utilizes the same functionality as blkid/findfs.
-//config: This also enables label or uuid support for swapon.
//config:
//config:config FEATURE_MOUNT_NFS
//config: bool "Support mounting NFS file systems on Linux < 2.6.23"
//config: default n
//config: depends on MOUNT
-//config: select FEATURE_HAVE_RPC
//config: select FEATURE_SYSLOG
//config: help
//config: Enable mounting of NFS file systems on Linux kernels prior
//config:
//config:config FEATURE_MOUNT_FSTAB
//config: depends on MOUNT
-//config: bool "Support /etc/fstab and -a"
+//config: bool "Support /etc/fstab and -a (mount all)"
//config: default y
//config: help
//config: Support mount all and looking for files in /etc/fstab.
* uclibc faq entry rather than in busybox... */
# if defined(__UCLIBC__) && ! defined(__UCLIBC_HAS_RPC__)
# warning "You probably need to build uClibc with UCLIBC_HAS_RPC for NFS support"
- /* not #error, since user may be using e.g. libtirpc instead */
+ /* not #error, since user may be using e.g. libtirpc instead.
+ * This might work:
+ * CONFIG_EXTRA_CFLAGS="-I/usr/include/tirpc"
+ * CONFIG_EXTRA_LDLIBS="tirpc"
+ */
# endif
# include <rpc/rpc.h>
# include <rpc/pmap_prot.h>
// Parse remaining options
// Max 2 params; -o is a list, -v is a counter
- opt_complementary = "?2" IF_FEATURE_MOUNT_VERBOSE("vv");
- opt = getopt32(argv, OPTION_STR, &lst_o, &fstype, &O_optmatch
- IF_FEATURE_MOUNT_OTHERTAB(, &fstabname)
- IF_FEATURE_MOUNT_VERBOSE(, &verbose));
+ opt = getopt32(argv, "^"
+ OPTION_STR
+ "\0" "?2"IF_FEATURE_MOUNT_VERBOSE("vv"),
+ &lst_o, &fstype, &O_optmatch
+ IF_FEATURE_MOUNT_OTHERTAB(, &fstabname)
+ IF_FEATURE_MOUNT_VERBOSE(, &verbose)
+ );
+
while (lst_o) append_mount_options(&cmdopts, llist_pop(&lst_o)); // -o
if (opt & OPT_r) append_mount_options(&cmdopts, "ro"); // -r
if (opt & OPT_w) append_mount_options(&cmdopts, "rw"); // -w