aboutsummaryrefslogtreecommitdiff
path: root/include/usage.h
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-11-29 23:47:10 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-11-29 23:47:10 +0000
commitaf977c6e219aa2e3f45e3f6e73c9cedcf7bcc350 (patch)
tree4a6c23fb08ab9c8fa2e3ad68c9425f65a3fe6a21 /include/usage.h
parent929e65144578d72d3e5f72a1c0bc20edb42f1c3a (diff)
downloadbusybox-w32-af977c6e219aa2e3f45e3f6e73c9cedcf7bcc350.tar.gz
busybox-w32-af977c6e219aa2e3f45e3f6e73c9cedcf7bcc350.tar.bz2
busybox-w32-af977c6e219aa2e3f45e3f6e73c9cedcf7bcc350.zip
Fix losetup so that it A) actually works again, B) has much better error
messages, C) can show the current association (if any) when called with only one argument. Update the documentation a lot too. Remind me to add a test suite for this thing. I think I've figured out how to handle root-only testsuites... git-svn-id: svn://busybox.net/trunk/busybox@12582 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'include/usage.h')
-rw-r--r--include/usage.h84
1 files changed, 17 insertions, 67 deletions
diff --git a/include/usage.h b/include/usage.h
index 912a88f4e..53832b987 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1657,13 +1657,18 @@
1657 "\t-f\t\toutput data as the log grows" 1657 "\t-f\t\toutput data as the log grows"
1658 1658
1659#define losetup_trivial_usage \ 1659#define losetup_trivial_usage \
1660 "[OPTION]... LOOPDEVICE FILE\n" \ 1660 "[-od] LOOPDEVICE [FILE]\n"
1661 "or: losetup [OPTION]... -d LOOPDEVICE"
1662#define losetup_full_usage \ 1661#define losetup_full_usage \
1663 "Associate LOOPDEVICE with FILE.\n\n" \ 1662 "Associate LOOPDEVICE with FILE, or display current association.\n\n" \
1664 "Options:\n" \ 1663 "Options:\n" \
1665 "\t-d\t\tDisassociate LOOPDEVICE\n" \ 1664 "\t-d\t\tDisassociate LOOPDEVICE\n" \
1666 "\t-o OFFSET\tStart OFFSET bytes into FILE" 1665 "\t-o OFFSET\tStart OFFSET bytes into FILE"
1666#define losetup_notes_usage \
1667 "One argument (losetup /dev/loop1) will display the current association\n" \
1668 "(if any), or disassociate it (with -d). The display shows the offset\n" \
1669 "and filename of the file the loop device is currently bound to.\n\n" \
1670 "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \
1671 "with an optional offset (-o 12345). Encryption is not yet supported.\n\n"
1667 1672
1668#ifdef CONFIG_FEATURE_LS_TIMESTAMPS 1673#ifdef CONFIG_FEATURE_LS_TIMESTAMPS
1669# define USAGE_LS_TIMESTAMPS(a) a 1674# define USAGE_LS_TIMESTAMPS(a) a
@@ -1946,74 +1951,18 @@
1946 "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" 1951 "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
1947 1952
1948#define modprobe_trivial_usage \ 1953#define modprobe_trivial_usage \
1949 "[-knqrsv] MODULE [symbol=value ...]" 1954 "[-knqrsv] [MODULE ...]"
1950#define modprobe_full_usage \ 1955#define modprobe_full_usage \
1956 "Used for high level module loading and unloading.\n\n" \
1951 "Options:\n" \ 1957 "Options:\n" \
1952 "\t-k\tMake module autoclean-able\n" \ 1958 "\t-k\tMake module autoclean-able\n" \
1953 "\t-n\tJust show what would be done\n" \ 1959 "\t-n\tJust show what would be done\n" \
1954 "\t-q\tQuiet output\n" \ 1960 "\t-q\tQuiet output\n" \
1955 "\t-r\tRemove module (stacks) or do autoclean\n" \ 1961 "\t-r\tRemove module (stacks) or do autoclean\n" \
1956 "\t-s\tReport via syslog instead of stderr\n" \ 1962 "\t-s\tReport via syslog instead of stderr\n" \
1957 "\t-v\tVerbose output\n\n" 1963 "\t-v\tVerbose output"
1958#define modprobe_notes_usage \
1959"modprobe can (un)load a stack of modules, passing each module options (when\n" \
1960"loading). modprobe uses a configuration file to determine what option(s) to\n" \
1961"pass each module it loads.\n" \
1962"\n" \
1963"The configuration file is searched (in order) amongst:\n" \
1964"\n" \
1965" /etc/modprobe.conf (2.6 only)\n" \
1966" /etc/modules.conf\n" \
1967" /etc/conf.modules (deprecated)\n" \
1968"\n" \
1969"They all have the same syntax (see below). If none is present, it is\n" \
1970"_not_ an error; each loaded module is then expected to load without\n" \
1971"options. Once a file is found, the others are tested for.\n" \
1972"\n" \
1973"/etc/modules.conf entry format:\n" \
1974"\n" \
1975" alias <alias_name> <mod_name>\n" \
1976" Makes it possible to modprobe alias_name, when there is no such module.\n" \
1977" It makes sense if your mod_name is long, or you want a more reprenstative\n" \
1978" name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
1979" This makes it also possible to use a different set of options (below) for\n" \
1980" the module and the alias.\n" \
1981" A module can be aliased more than once.\n" \
1982"\n" \
1983" options <mod_name|alias_name> <symbol=value ...>\n" \
1984" When loading module mod_name (or the module aliased by alias_name), pass\n" \
1985" the \"symbol=value\" pairs as option to that module.\n" \
1986"\n" \
1987"Sample /etc/modules.conf file:\n" \
1988"\n" \
1989" options tulip irq=3\n" \
1990" alias tulip tulip2\n" \
1991" options tulip2 irq=4 io=0x308\n" \
1992"\n" \
1993"Other functionality offered by 'classic' modprobe is not available in\n" \
1994"this implementation.\n" \
1995"\n" \
1996"If module options are present both in the config file, and on the command line,\n" \
1997"then the options from the command line will be passed to the module _after_\n" \
1998"the options from the config file. That way, you can have defaults in the config\n" \
1999"file, and override them for a specific usage from the command line.\n"
2000#define modprobe_example_usage \ 1964#define modprobe_example_usage \
2001 "(with the above /etc/modules.conf):\n\n" \ 1965 "$ modprobe cdrom\n"
2002 "$ modprobe tulip\n" \
2003 " will load the module 'tulip' with default option 'irq=3'\n\n" \
2004 "$ modprobe tulip irq=5\n" \
2005 " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \
2006 "$ modprobe tulip2\n" \
2007 " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \
2008 " which are the default for alias 'tulip2'\n\n" \
2009 "$ modprobe tulip2 irq=8\n" \
2010 " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
2011 " which are the default for alias 'tulip2' overriden by the option 'irq=8'\n\n" \
2012 " from the command line\n\n" \
2013 "$ modprobe tulip2 irq=2 io=0x210\n" \
2014 " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
2015 " which are the default for alias 'tulip2' overriden by the options 'irq=2 io=0x210'\n\n" \
2016 " from the command line\n"
2017 1966
2018#define more_trivial_usage \ 1967#define more_trivial_usage \
2019 "[FILE ...]" 1968 "[FILE ...]"
@@ -2054,12 +2003,13 @@
2054 "\tdev/nodev:\tAllow use of special device files / disallow them\n" \ 2003 "\tdev/nodev:\tAllow use of special device files / disallow them\n" \
2055 "\texec/noexec:\tAllow use of executable files / disallow them\n" \ 2004 "\texec/noexec:\tAllow use of executable files / disallow them\n" \
2056 USAGE_MOUNT_LOOP( \ 2005 USAGE_MOUNT_LOOP( \
2057 "\tloop:\t\tMounts a file via loop device\n" \ 2006 "\tloop:\t\t Ignored (loop devices are autodetected)\n" \
2058 ) \ 2007 ) \
2059 "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them\n" \ 2008 "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them\n" \
2060 "\tremount:\tRe-mount a mounted filesystem, changing its flags\n" \ 2009 "\tremount:\tRe-mount a mounted filesystem, changing its flags\n" \
2061 "\tro/rw:\t\tMount for read-only / read-write\n" \ 2010 "\tro/rw:\t\tMount for read-only / read-write\n" \
2062 "\tbind:\t\tUse the linux 2.4.x \"bind\" feature\n" \ 2011 "\tbind:\t\tBind a directory to an additional location\n" \
2012 "\tmove:\t\tRelocate an existing mount point.\n" \
2063 "\nThere are EVEN MORE flags that are specific to each filesystem\n" \ 2013 "\nThere are EVEN MORE flags that are specific to each filesystem\n" \
2064 "You'll have to see the written documentation for those filesystems" 2014 "You'll have to see the written documentation for those filesystems"
2065#define mount_example_usage \ 2015#define mount_example_usage \
@@ -2068,7 +2018,8 @@
2068 "proc on /proc type proc (rw)\n" \ 2018 "proc on /proc type proc (rw)\n" \
2069 "devpts on /dev/pts type devpts (rw)\n" \ 2019 "devpts on /dev/pts type devpts (rw)\n" \
2070 "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \ 2020 "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
2071 "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" 2021 "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \
2022 "$ mount cd_image.iso mydir\n"
2072 2023
2073#define mountpoint_trivial_usage \ 2024#define mountpoint_trivial_usage \
2074 "[-q] <[-d] DIR | -x DEVICE>" 2025 "[-q] <[-d] DIR | -x DEVICE>"
@@ -3008,7 +2959,6 @@
3008 "Telnetd listens for incoming TELNET connections on PORT.\n" \ 2959 "Telnetd listens for incoming TELNET connections on PORT.\n" \
3009 "Options:\n" \ 2960 "Options:\n" \
3010 "\t-p PORT\tlisten for connections on PORT (default 23)\n" \ 2961 "\t-p PORT\tlisten for connections on PORT (default 23)\n" \
3011 "\t-b ADDR\tlisten for connections on ADDR (default 0.0.0.0)\n"\
3012 "\t-l LOGIN\texec LOGIN on connect (default /bin/sh)\n" \ 2962 "\t-l LOGIN\texec LOGIN on connect (default /bin/sh)\n" \
3013 "\t-f issue_file\tDisplay issue_file instead of /etc/issue" 2963 "\t-f issue_file\tDisplay issue_file instead of /etc/issue"
3014#endif 2964#endif