tls: in AES-GCM decoding, avoid memmove
[oweals/busybox.git] / util-linux / mount.c
index 823b7c13b4749121b852a5a06195b01785a8ec67..fa2e7b114ac222ff52790d8dbb2cec6c23f6ea77 100644 (file)
 //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
@@ -99,7 +97,7 @@
 //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>
@@ -2206,10 +2208,14 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
 
        // 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