mount: fix bugs: free(mp->mnt_fsname) of non-malloced ptr;
[oweals/busybox.git] / util-linux / Config.in
index 7fde01971f9c1f9c1de7a7047c4b2da5f7977fc2..2da37db53106afa31e3ce47d865bed93b21d1320 100644 (file)
@@ -17,6 +17,26 @@ config CONFIG_DMESG
          are also logged to the system console.  Enable this option if you
          wish to enable the 'dmesg' utility.
 
+config CONFIG_FEATURE_DMESG_PRETTY
+       bool "pretty dmesg output"
+       default y
+       depends on CONFIG_DMESG
+       help
+         If you wish to scrub the syslog level from the output, say 'Y' here.
+         The syslog level is a string prefixed to every line with the form "<#>".
+
+         With this option you will see:
+           # dmesg
+           Linux version 2.6.17.4 .....
+           BIOS-provided physical RAM map:
+            BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
+
+         Without this option you will see:
+           # dmesg
+           <5>Linux version 2.6.17.4 .....
+           <6>BIOS-provided physical RAM map:
+           <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
+
 config CONFIG_FBSET
        bool "fbset"
        default n
@@ -27,7 +47,7 @@ config CONFIG_FBSET
          if you wish to enable the 'fbset' utility.
 
 config CONFIG_FEATURE_FBSET_FANCY
-       bool "  Turn on extra fbset options"
+       bool "Turn on extra fbset options"
        default n
        depends on CONFIG_FBSET
        help
@@ -37,7 +57,7 @@ config CONFIG_FEATURE_FBSET_FANCY
          options.
 
 config CONFIG_FEATURE_FBSET_READMODE
-       bool "  Turn on fbset readmode support"
+       bool "Turn on fbset readmode support"
        default n
        depends on CONFIG_FBSET
        help
@@ -73,14 +93,14 @@ config CONFIG_FDISK
          'disk slices' that are defined on a hard drive.
 
 config FDISK_SUPPORT_LARGE_DISKS
-       bool "  support over 4GB disks"
+       bool "support over 4GB disks"
        default y
        depends on CONFIG_FDISK
        help
          Enable this option to support large disks > 4GB.
 
 config CONFIG_FEATURE_FDISK_WRITABLE
-       bool "  Write support"
+       bool "Write support"
        default y
        depends on CONFIG_FDISK
        help
@@ -89,7 +109,7 @@ config CONFIG_FEATURE_FDISK_WRITABLE
          disabled, you will only be able to view the partition table.
 
 config CONFIG_FEATURE_AIX_LABEL
-       bool "  Support AIX disklabels"
+       bool "Support AIX disklabels"
        default n
        depends on CONFIG_FDISK && CONFIG_FEATURE_FDISK_WRITABLE
        help
@@ -97,7 +117,7 @@ config CONFIG_FEATURE_AIX_LABEL
          Most people can safely leave this option disabled.
 
 config CONFIG_FEATURE_SGI_LABEL
-       bool "  Support SGI disklabels"
+       bool "Support SGI disklabels"
        default n
        depends on CONFIG_FDISK && CONFIG_FEATURE_FDISK_WRITABLE
        help
@@ -105,7 +125,7 @@ config CONFIG_FEATURE_SGI_LABEL
          Most people can safely leave this option disabled.
 
 config CONFIG_FEATURE_SUN_LABEL
-       bool "  Support SUN disklabels"
+       bool "Support SUN disklabels"
        default n
        depends on CONFIG_FDISK && CONFIG_FEATURE_FDISK_WRITABLE
        help
@@ -113,7 +133,7 @@ config CONFIG_FEATURE_SUN_LABEL
          Most people can safely leave this option disabled.
 
 config CONFIG_FEATURE_OSF_LABEL
-       bool "  Support BSD disklabels"
+       bool "Support BSD disklabels"
        default n
        depends on CONFIG_FDISK && CONFIG_FEATURE_FDISK_WRITABLE
        help
@@ -121,7 +141,7 @@ config CONFIG_FEATURE_OSF_LABEL
          and define and edit BSD disk slices.
 
 config CONFIG_FEATURE_FDISK_ADVANCED
-       bool "  Support expert mode"
+       bool "Support expert mode"
        default n
        depends on CONFIG_FDISK && CONFIG_FEATURE_FDISK_WRITABLE
        help
@@ -164,7 +184,7 @@ comment "Minix filesystem support"
     depends on CONFIG_FSCK_MINIX || CONFIG_MKFS_MINIX
 
 config CONFIG_FEATURE_MINIX2
-       bool "  Support Minix fs v2 (fsck_minix/mkfs_minix)"
+       bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
        default y
        depends on CONFIG_FSCK_MINIX || CONFIG_MKFS_MINIX
        help
@@ -199,22 +219,26 @@ config CONFIG_HWCLOCK
          shutdown in the hardware clock, so the hardware will keep the
          correct time when Linux is _not_ running.
 
-config CONFIG_FEATURE_HWCLOCK_LONGOPTIONS
-       bool "  Support long options (--hctosys,...)"
+config CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS
+       bool "Support long options (--hctosys,...)"
        default n
-       depends on CONFIG_HWCLOCK
+       depends on CONFIG_HWCLOCK && CONFIG_GETOPT_LONG
        help
          By default, the hwclock utility only uses short options.  If you
          are overly fond of its long options, such as --hctosys, --utc, etc)
          then enable this option.
 
-config CONFIG_LOSETUP
-       bool "losetup"
-       default n
+config CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS
+       bool "Use FHS /var/lib/hwclock/adjtime"
+       default y
+       depends on CONFIG_HWCLOCK
        help
-         losetup is used to associate or detach a loop device with a regular
-         file or block device, and to query the status of a loop device.  This
-         version does not currently support enabling data encryption.
+         Starting with FHS 2.3, the adjtime state file is supposed to exist
+         at /var/lib/hwclock/adjtime instead of /etc/adjtime.  If you wish
+         to use the FHS behavior, answer Y here, otherwise answer N for the
+         classic /etc/adjtime path.
+
+         http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
 
 config CONFIG_IPCRM
        bool "ipcrm"
@@ -233,6 +257,59 @@ config CONFIG_IPCS
          The ipcs utility is used to provide information on the currently
          allocated System V interprocess (IPC) objects in the system.
 
+config CONFIG_LOSETUP
+       bool "losetup"
+       default n
+       help
+         losetup is used to associate or detach a loop device with a regular
+         file or block device, and to query the status of a loop device.  This
+         version does not currently support enabling data encryption.
+
+config CONFIG_MDEV
+       bool "mdev"
+       default n
+       help
+         mdev is a mini-udev implementation: call it with -s to populate
+         /dev from /sys, then "echo /sbin/mdev > /proc/sys/kernel/hotplug" to
+         have it handle hotplug events afterwards.  Device names are taken
+         from sysfs.
+
+config CONFIG_FEATURE_MDEV_CONF
+       bool "Support /etc/mdev.conf"
+       default n
+       depends on CONFIG_MDEV
+       help
+         The mdev config file contains lines that look like:
+
+           hd[a-z][0-9]* 0:3 660
+
+         That's device name (with regex match), uid:gid, and permissions.
+
+         Config file parsing stops on the first matching line.  If no config
+         entry is matched, devices are created with default 0:0 660.  (Make
+         the last line match .* to override this.)
+
+config CONFIG_FEATURE_MDEV_EXEC
+       bool "Support command execution at device addition/removal"
+       default n
+       depends on CONFIG_FEATURE_MDEV_CONF
+       help
+         This adds support for an optional field to /etc/mdev.conf, consisting
+         of a special character and a command line to run after creating the
+         corresponding device(s) and before removing, ala:
+
+           hdc root:cdrom 660  *ln -s $MDEV cdrom
+
+         The $MDEV environment variable is set to the name of the device.
+
+         The special characters and their meanings are:
+           @ Run after creating the device.
+           $ Run before removing the device.
+           * Run both after creating and before removing the device.
+
+         Commands are executed via system() so you need /bin/sh, meaning you
+         probably want to select a default shell in the Shells menu.
+
 config CONFIG_MKSWAP
        bool "mkswap"
        default n
@@ -246,6 +323,16 @@ config CONFIG_MKSWAP
          Once you have created swap space using 'mkswap' you need to enable
          the swap space using the 'swapon' utility.
 
+config CONFIG_FEATURE_MKSWAP_V0
+       bool "version 0 support"
+       default n
+       depends on CONFIG_MKSWAP
+#      depends on CONFIG_MKSWAP && CONFIG_DEPRECATED
+       help
+         Enable support for the old v0 style.
+         If your kernel is older than 2.1.117, then v0 support is the
+         only option.
+
 config CONFIG_MORE
        bool "more"
        default n
@@ -257,7 +344,7 @@ config CONFIG_MORE
          any need to reading text files, you can leave this disabled.
 
 config CONFIG_FEATURE_USE_TERMIOS
-       bool "  Use termios to manipulate the screen"
+       bool "Use termios to manipulate the screen"
        default y
        depends on CONFIG_MORE
        help
@@ -267,6 +354,48 @@ config CONFIG_FEATURE_USE_TERMIOS
          will be unable to determine the current screen size, and will be
          unable to move the cursor.
 
+config CONFIG_MOUNT
+       bool "mount"
+       default n
+       help
+         All files and filesystems in Unix are arranged into one big directory
+         tree.  The 'mount' utility is used to graft a filesystem onto a
+         particular part of the tree.  A filesystem can either live on a block
+         device, or it can be accessible over the network, as is the case with
+         NFS filesystems.  Most people using BusyBox will also want to enable
+         the 'mount' utility.
+
+config CONFIG_FEATURE_MOUNT_NFS
+       bool "Support mounting NFS file systems"
+       default n
+       depends on CONFIG_MOUNT
+       help
+         Enable mounting of NFS file systems.
+
+config CONFIG_FEATURE_MOUNT_CIFS
+       bool "Support mounting CIFS/SMB file systems"
+       default n
+       depends on CONFIG_MOUNT
+       help
+         Enable support for samba mounts.
+
+config CONFIG_FEATURE_MOUNT_FLAGS
+       depends on CONFIG_MOUNT
+       bool "Support lots of -o flags in mount"
+       default y
+       help
+         Without this, mount only supports ro/rw/remount.  With this, it
+         supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
+         noatime, diratime, nodiratime, loud, bind, move, shared, slave,
+         private, unbindable, rshared, rslave, rprivate, and runbindable.
+
+config CONFIG_FEATURE_MOUNT_FSTAB
+       depends on CONFIG_MOUNT
+       bool "Support /etc/fstab and -a"
+       default y
+       help
+         Support mount all and looking for files in /etc/fstab.
+
 config CONFIG_PIVOT_ROOT
        bool "pivot_root"
        default n
@@ -276,6 +405,9 @@ config CONFIG_PIVOT_ROOT
          of wild and crazy things with your Linux system and is far more
          powerful than 'chroot'.
 
+         Note: This is for initrd in linux 2.4.  Under initramfs (introduced
+         in linux 2.6) use switch_root instead.
+
 config CONFIG_RDATE
        bool "rdate"
        default n
@@ -285,6 +417,21 @@ config CONFIG_RDATE
          the RFC868 protocol, which is built into the inetd daemon on most
          systems.
 
+config CONFIG_READPROFILE
+       bool "readprofile"
+       default n
+       help
+         This allows you to parse /proc/profile for basic profiling.
+
+config CONFIG_SETARCH
+       bool "setarch"
+       default n
+       help
+         The linux32 utility is used to create a 32bit environment for the
+         specified program (usually a shell).  It only makes sense to have
+         this util on a system that supports both 64bit and 32bit userland
+         (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
+
 config CONFIG_SWAPONOFF
        bool "swaponoff"
        default n
@@ -296,23 +443,24 @@ config CONFIG_SWAPONOFF
          space.  If you are not using any swap space, you can leave this
          option disabled.
 
-config CONFIG_MOUNT
-       bool "mount"
+config CONFIG_SWITCH_ROOT
+       bool "switch_root"
        default n
        help
-         All files and filesystems in Unix are arranged into one big directory
-         tree.  The 'mount' utility is used to graft a filesystem onto a
-         particular part of the tree.  A filesystem can either live on a block
-         device, or it can be accessible over the network, as is the case with
-         NFS filesystems.  Most people using BusyBox will also want to enable
-         the 'mount' utility.
+         The switch_root utility is used from initramfs to select a new
+         root device.  Under initramfs, you have to use this instead of
+         pivot_root.  (Stop reading here if you don't care why.)
 
-config CONFIG_NFSMOUNT
-       bool "  Support mounting NFS file systems"
-       default n
-       depends on CONFIG_MOUNT
-       help
-        Enable mounting of NFS file systems.
+         Booting with initramfs extracts a gzipped cpio archive into rootfs
+         (which is a variant of ramfs/tmpfs).  Because rootfs can't be moved
+         or unmounted*, pivot_root will not work from initramfs.  Instead,
+         switch_root deletes everything out of rootfs (including itself),
+         does a mount --move that overmounts rootfs with the new root, and
+         then execs the specified init program.
+
+         * Because the Linux kernel uses rootfs internally as the starting
+         and ending point for searching through the kernel's doubly linked
+         list of active mount points.  That's why.
 
 config CONFIG_UMOUNT
        bool "umount"
@@ -323,11 +471,18 @@ config CONFIG_UMOUNT
          the tool to use.  If you enabled the 'mount' utility, you almost certainly
          also want to enable 'umount'.
 
+config CONFIG_FEATURE_UMOUNT_ALL
+       bool "umount -a option"
+       default n
+       depends on CONFIG_UMOUNT
+       help
+         Support -a option to unmount all currently mounted filesystems.
+
 comment "Common options for mount/umount"
        depends on CONFIG_MOUNT || CONFIG_UMOUNT
 
 config CONFIG_FEATURE_MOUNT_LOOP
-       bool "  Support loopback mounts"
+       bool "Support loopback mounts"
        default n
        depends on CONFIG_MOUNT || CONFIG_UMOUNT
        help
@@ -336,14 +491,14 @@ config CONFIG_FEATURE_MOUNT_LOOP
          command will detect you are trying to mount a file instead of a block
          device, and transparently associate the file with a loopback device.
          The umount command will also free that loopback device.
-         
+
          You can still use the 'losetup' utility (to manually associate files
           with loop devices) if you need to do something advanced, such as
          specify an offset or cryptographic options to the loopback device.
          (If you don't want umount to free the loop device, use "umount -D".)
 
 config CONFIG_FEATURE_MTAB_SUPPORT
-       bool "  Support for the old /etc/mtab file"
+       bool "Support for the old /etc/mtab file"
        default n
        depends on CONFIG_MOUNT || CONFIG_UMOUNT
        help
@@ -359,13 +514,11 @@ config CONFIG_FEATURE_MTAB_SUPPORT
          example a mount under chroot won't update it), can't handle modern
          features like separate per-process filesystem namespaces, requires
          that your /etc directory be writeable, tends to get easily confused
-         by --bind or --move mounts, and so on.  (In brief: avoid.)
+         by --bind or --move mounts, won't update if you rename a directory
+         that contains a mount point, and so on.  (In brief: avoid.)
 
-config CONFIG_READPROFILE
-       bool "readprofile"
-       default n
-       help
-         This allows you to parse /proc/profile for basic profiling.
+         About the only reason to use this is if you've removed /proc from
+         your kernel.
 
 endmenu