aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-04-25 22:40:53 +0000
committerRob Landley <rob@landley.net>2006-04-25 22:40:53 +0000
commit5fe8d5b9c5930497ecf47817ec3af66bebec52c0 (patch)
treeb9cccd00d8ba8b9e7df50e6aaa76a7ed5145b0c1
parent7818a422bc9a9dee61b1c3d87786d1724fb9b20a (diff)
downloadbusybox-w32-5fe8d5b9c5930497ecf47817ec3af66bebec52c0.tar.gz
busybox-w32-5fe8d5b9c5930497ecf47817ec3af66bebec52c0.tar.bz2
busybox-w32-5fe8d5b9c5930497ecf47817ec3af66bebec52c0.zip
Convert a chunk of usage.h to USE_ and SKIP_ (more to do there), and fix a
DEFALT typo in du while I was there.
-rw-r--r--coreutils/Config.in9
-rw-r--r--coreutils/du.c8
-rw-r--r--include/usage.h179
3 files changed, 62 insertions, 134 deletions
diff --git a/coreutils/Config.in b/coreutils/Config.in
index 5d2965b47..4eb3db052 100644
--- a/coreutils/Config.in
+++ b/coreutils/Config.in
@@ -26,6 +26,13 @@ config CONFIG_CAT
26 cat is used to concatenate files and print them to the standard 26 cat is used to concatenate files and print them to the standard
27 output. Enable this option if you wish to enable the 'cat' utility. 27 output. Enable this option if you wish to enable the 'cat' utility.
28 28
29config CONFIG_FEATURE_CAT_ESCAPE
30 bool "support -vetET"
31 depends on CONFIG_CAT
32 default n
33 help
34 Sheer bloat.
35
29config CONFIG_CHGRP 36config CONFIG_CHGRP
30 bool "chgrp" 37 bool "chgrp"
31 default n 38 default n
@@ -173,7 +180,7 @@ config CONFIG_DU
173 du is used to report the amount of disk space used 180 du is used to report the amount of disk space used
174 for specified files. 181 for specified files.
175 182
176config CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K 183config CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
177 bool "Use a default blocksize of 1024 bytes (1K)" 184 bool "Use a default blocksize of 1024 bytes (1K)"
178 default y 185 default y
179 depends on CONFIG_DU 186 depends on CONFIG_DU
diff --git a/coreutils/du.c b/coreutils/du.c
index 38790f83b..b204a025a 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -31,12 +31,12 @@
31#include "busybox.h" 31#include "busybox.h"
32 32
33#ifdef CONFIG_FEATURE_HUMAN_READABLE 33#ifdef CONFIG_FEATURE_HUMAN_READABLE
34# ifdef CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K 34# ifdef CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
35static unsigned long disp_hr = KILOBYTE; 35static unsigned long disp_hr = KILOBYTE;
36# else 36# else
37static unsigned long disp_hr = 512; 37static unsigned long disp_hr = 512;
38# endif 38# endif
39#elif defined CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K 39#elif defined CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
40static unsigned int disp_k = 1; 40static unsigned int disp_k = 1;
41#else 41#else
42static unsigned int disp_k; /* bss inits to 0 */ 42static unsigned int disp_k; /* bss inits to 0 */
@@ -160,7 +160,7 @@ int du_main(int argc, char **argv)
160 char *smax_print_depth; 160 char *smax_print_depth;
161 unsigned long opt; 161 unsigned long opt;
162 162
163#ifdef CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K 163#ifdef CONFIG_FEATURE_DU_DEFUALT_BLOCKSIZE_1K
164 if (getenv("POSIXLY_CORRECT")) { /* TODO - a new libbb function? */ 164 if (getenv("POSIXLY_CORRECT")) { /* TODO - a new libbb function? */
165#ifdef CONFIG_FEATURE_HUMAN_READABLE 165#ifdef CONFIG_FEATURE_HUMAN_READABLE
166 disp_hr = 512; 166 disp_hr = 512;
@@ -194,7 +194,7 @@ int du_main(int argc, char **argv)
194#else 194#else
195 bb_opt_complementally = "H-L:L-H:s-d:d-s"; 195 bb_opt_complementally = "H-L:L-H:s-d:d-s";
196 opt = bb_getopt_ulflags(argc, argv, "aHkLsx" "d:" "lc", &smax_print_depth); 196 opt = bb_getopt_ulflags(argc, argv, "aHkLsx" "d:" "lc", &smax_print_depth);
197#if !defined CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K 197#if !defined CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
198 if((opt & (1 << 2))) { 198 if((opt & (1 << 2))) {
199 /* -k opt */ 199 /* -k opt */
200 disp_k = 1; 200 disp_k = 1;
diff --git a/include/usage.h b/include/usage.h
index 3edb0f7ca..052f6fcc2 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -324,12 +324,6 @@
324 "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \ 324 "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
325 "world\n" 325 "world\n"
326 326
327#ifdef CONFIG_FEATURE_DATE_ISOFMT
328#define USAGE_DATE_ISOFMT(a) a
329#else
330#define USAGE_DATE_ISOFMT(a)
331#endif
332
333#define date_trivial_usage \ 327#define date_trivial_usage \
334 "[OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]" 328 "[OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]"
335#define date_full_usage \ 329#define date_full_usage \
@@ -337,13 +331,13 @@
337 "\nOptions:\n" \ 331 "\nOptions:\n" \
338 "\t-R\t\tOutputs RFC-822 compliant date string\n" \ 332 "\t-R\t\tOutputs RFC-822 compliant date string\n" \
339 "\t-d STRING\tDisplays time described by STRING, not `now'\n" \ 333 "\t-d STRING\tDisplays time described by STRING, not `now'\n" \
340 USAGE_DATE_ISOFMT( \ 334USE_FEATURE_DATE_ISOFMT( \
341 "\t-I[TIMESPEC]\tOutputs an ISO-8601 compliant date/time string\n" \ 335 "\t-I[TIMESPEC]\tOutputs an ISO-8601 compliant date/time string\n" \
342 "\t\t\tTIMESPEC=`date' (or missing) for date only,\n" \ 336 "\t\t\tTIMESPEC=`date' (or missing) for date only,\n" \
343 "\t\t\t`hours', `minutes', or `seconds' for date and,\n" \ 337 "\t\t\t`hours', `minutes', or `seconds' for date and,\n" \
344 "\t\t\ttime to the indicated precision\n" \ 338 "\t\t\ttime to the indicated precision\n" \
345 "\t-D hint\t\tUse 'hint' as date format, via strptime()\n" \ 339 "\t-D hint\t\tUse 'hint' as date format, via strptime()\n" \
346 ) \ 340) \
347 "\t-s\t\tSets time described by STRING\n" \ 341 "\t-s\t\tSets time described by STRING\n" \
348 "\t-r FILE\t\tDisplays the last modification time of FILE\n" \ 342 "\t-r FILE\t\tDisplays the last modification time of FILE\n" \
349 "\t-u\t\tPrints or sets Coordinated Universal Time" 343 "\t-u\t\tPrints or sets Coordinated Universal Time"
@@ -412,43 +406,31 @@
412#define deluser_full_usage \ 406#define deluser_full_usage \
413 "Deletes user USER from the system" 407 "Deletes user USER from the system"
414 408
415#ifdef CONFIG_DEVFSD_FG_NP
416# define USAGE_DEVFSD_FG_NP(a) a
417#else
418# define USAGE_DEVFSD_FG_NP(a)
419#endif
420
421#define devfsd_trivial_usage \ 409#define devfsd_trivial_usage \
422 "mntpnt [-v]" \ 410 "mntpnt [-v]" \
423 USAGE_DEVFSD_FG_NP("[-fg][-np]" ) 411 USE_DEVFSD_FG_NP("[-fg][-np]" )
424#define devfsd_full_usage \ 412#define devfsd_full_usage \
425 "Optional daemon for managing devfs permissions and old device name symlinks.\n" \ 413 "Optional daemon for managing devfs permissions and old device name symlinks.\n" \
426 "\nOptions:\n" \ 414 "\nOptions:\n" \
427 "\tmntpnt\tThe mount point where devfs is mounted.\n\n" \ 415 "\tmntpnt\tThe mount point where devfs is mounted.\n\n" \
428 "\t-v\tPrint the protocol version numbers for devfsd\n" \ 416 "\t-v\tPrint the protocol version numbers for devfsd\n" \
429 "\t\tand the kernel-side protocol version and exits." \ 417 "\t\tand the kernel-side protocol version and exits." \
430 USAGE_DEVFSD_FG_NP( "\n\n\t-fg\tRun the daemon in the foreground.\n\n" \ 418 USE_DEVFSD_FG_NP( "\n\n\t-fg\tRun the daemon in the foreground.\n\n" \
431 "\t-np\tExit after parsing the configuration file\n" \ 419 "\t-np\tExit after parsing the configuration file\n" \
432 "\t\tand processing synthetic REGISTER events.\n" \ 420 "\t\tand processing synthetic REGISTER events.\n" \
433 "\t\tDo not poll for events.") 421 "\t\tDo not poll for events.")
434 422
435#ifdef CONFIG_FEATURE_HUMAN_READABLE
436# define USAGE_HUMAN_READABLE(a) a
437# define USAGE_NOT_HUMAN_READABLE(a)
438#else
439# define USAGE_HUMAN_READABLE(a)
440# define USAGE_NOT_HUMAN_READABLE(a) a
441#endif
442#define df_trivial_usage \ 423#define df_trivial_usage \
443 "[-" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [FILESYSTEM ...]" 424 "[-" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILESYSTEM ...]"
444#define df_full_usage \ 425#define df_full_usage \
445 "Print the filesystem space used and space available.\n\n" \ 426 "Print the filesystem space used and space available.\n\n" \
446 "Options:\n" \ 427 "Options:\n" \
447 USAGE_HUMAN_READABLE( \ 428 USE_FEATURE_HUMAN_READABLE( \
448 "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ 429 "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
449 "\t-m\tprint sizes in megabytes\n" \ 430 "\t-m\tprint sizes in megabytes\n" \
450 "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \ 431 "\t-k\tprint sizes in kilobytes(default)" \
451 "\n\t-k\tprint sizes in kilobytes(compatibility)") 432 ) \
433 SKIP_FEATURE_HUMAN_READABLE("\n\t-k\tignored")
452#define df_example_usage \ 434#define df_example_usage \
453 "$ df\n" \ 435 "$ df\n" \
454 "Filesystem 1k-blocks Used Available Use% Mounted on\n" \ 436 "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
@@ -545,20 +527,13 @@
545#define dpkg_deb_example_usage \ 527#define dpkg_deb_example_usage \
546 "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n" 528 "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
547 529
548#ifdef CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K
549#define USAGE_DU_DEFALT_BLOCKSIZE_1k(a) a
550#define USAGE_NOT_DU_DEFALT_BLOCKSIZE_1k(a)
551#else
552#define USAGE_DU_DEFALT_BLOCKSIZE_1k(a)
553#define USAGE_NOT_DU_DEFALT_BLOCKSIZE_1k(a) a
554#endif
555
556#define du_trivial_usage \ 530#define du_trivial_usage \
557 "[-aHLdclsx" USAGE_HUMAN_READABLE("hm") "k] [FILE]..." 531 "[-aHLdclsx" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
558#define du_full_usage \ 532#define du_full_usage \
559 "Summarizes disk space used for each FILE and/or directory.\n" \ 533 "Summarizes disk space used for each FILE and/or directory.\n" \
560 "Disk space is printed in units of " \ 534 "Disk space is printed in units of " \
561 USAGE_DU_DEFALT_BLOCKSIZE_1k("1024") USAGE_NOT_DU_DEFALT_BLOCKSIZE_1k("512") \ 535 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
536 SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
562 " bytes.\n\n" \ 537 " bytes.\n\n" \
563 "Options:\n" \ 538 "Options:\n" \
564 "\t-a\tshow sizes of files in addition to directories\n" \ 539 "\t-a\tshow sizes of files in addition to directories\n" \
@@ -569,10 +544,12 @@
569 "\t-l\tcount sizes many times if hard linked\n" \ 544 "\t-l\tcount sizes many times if hard linked\n" \
570 "\t-s\tdisplay only a total for each argument\n" \ 545 "\t-s\tdisplay only a total for each argument\n" \
571 "\t-x\tskip directories on different filesystems\n" \ 546 "\t-x\tskip directories on different filesystems\n" \
572 USAGE_HUMAN_READABLE( \ 547 USE_FEATURE_HUMAN_READABLE( \
573 "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ 548 "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
574 "\t-m\tprint sizes in megabytes\n" ) \ 549 "\t-m\tprint sizes in megabytes\n" \
575 "\t-k\tprint sizes in kilobytes" USAGE_DU_DEFALT_BLOCKSIZE_1k("(default)") 550 ) \
551 "\t-k\tprint sizes in kilobytes" \
552 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("(default)")
576#define du_example_usage \ 553#define du_example_usage \
577 "$ du\n" \ 554 "$ du\n" \
578 "16 ./CVS\n" \ 555 "16 ./CVS\n" \
@@ -622,24 +599,20 @@
622 "\t-l file\tAdd to badblocks list\n" \ 599 "\t-l file\tAdd to badblocks list\n" \
623 "\t-L file\tSet badblocks list" 600 "\t-L file\tSet badblocks list"
624 601
625#ifdef CONFIG_FEATURE_FANCY_ECHO
626# define USAGE_FANCY_ECHO(a) a
627#else
628# define USAGE_FANCY_ECHO(a)
629#endif
630
631#define echo_trivial_usage \ 602#define echo_trivial_usage \
632 USAGE_FANCY_ECHO("[-neE] ") "[ARG ...]" 603 USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG ...]"
633#define echo_full_usage \ 604#define echo_full_usage \
634 "Prints the specified ARGs to stdout\n\n" \ 605 "Prints the specified ARGs to stdout\n\n" \
635 USAGE_FANCY_ECHO("Options:\n" \ 606 USE_FEATURE_FANCY_ECHO( \
636 "\t-n\tsuppress trailing newline\n" \ 607 "Options:\n" \
637 "\t-e\tinterpret backslash-escaped characters (i.e., \\t=tab)\n" \ 608 "\t-n\tsuppress trailing newline\n" \
638 "\t-E\tdisable interpretation of backslash-escaped characters") 609 "\t-e\tinterpret backslash-escaped characters (i.e., \\t=tab)\n" \
610 "\t-E\tdisable interpretation of backslash-escaped characters" \
611 )
639#define echo_example_usage \ 612#define echo_example_usage \
640 "$ echo \"Erik is cool\"\n" \ 613 "$ echo \"Erik is cool\"\n" \
641 "Erik is cool\n" \ 614 "Erik is cool\n" \
642 USAGE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \ 615 USE_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
643 "Erik\n" \ 616 "Erik\n" \
644 "is\n" \ 617 "is\n" \
645 "cool\n" \ 618 "cool\n" \
@@ -763,42 +736,6 @@
763 "\t-S SECTORS Set the number of sectors\n" \ 736 "\t-S SECTORS Set the number of sectors\n" \
764 "\t-v Give fdisk version" 737 "\t-v Give fdisk version"
765 738
766#ifdef CONFIG_FEATURE_FIND_TYPE
767# define USAGE_FIND_TYPE(a) a
768#else
769# define USAGE_FIND_TYPE(a)
770#endif
771#ifdef CONFIG_FEATURE_FIND_PERM
772# define USAGE_FIND_PERM(a) a
773#else
774# define USAGE_FIND_PERM(a)
775#endif
776#ifdef CONFIG_FEATURE_FIND_MTIME
777# define USAGE_FIND_MTIME(a) a
778#else
779# define USAGE_FIND_MTIME(a)
780#endif
781#ifdef CONFIG_FEATURE_FIND_MMIN
782 #define USAGE_FIND_MMIN(a) a
783#else
784 #define USAGE_FIND_MMIN(a)
785#endif
786#ifdef CONFIG_FEATURE_FIND_NEWER
787# define USAGE_FIND_NEWER(a) a
788#else
789# define USAGE_FIND_NEWER(a)
790#endif
791#ifdef CONFIG_FEATURE_FIND_INUM
792# define USAGE_FIND_INUM(a) a
793#else
794# define USAGE_FIND_INUM(a)
795#endif
796#ifdef CONFIG_FEATURE_FIND_EXEC
797# define USAGE_FIND_EXEC(a) a
798#else
799# define USAGE_FIND_EXEC(a)
800#endif
801
802#define find_trivial_usage \ 739#define find_trivial_usage \
803 "[PATH...] [EXPRESSION]" 740 "[PATH...] [EXPRESSION]"
804#define find_full_usage \ 741#define find_full_usage \
@@ -808,19 +745,19 @@
808 "\t-follow\t\tDereference symbolic links\n" \ 745 "\t-follow\t\tDereference symbolic links\n" \
809 "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN\n" \ 746 "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN\n" \
810 "\t-print\t\tPrint (default and assumed)\n" \ 747 "\t-print\t\tPrint (default and assumed)\n" \
811 USAGE_FIND_TYPE( \ 748 USE_FEATURE_FIND_TYPE( \
812 "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \ 749 "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \
813) USAGE_FIND_PERM( \ 750) USE_FEATURE_FIND_PERM( \
814 "\n\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN);\n\t\t\tor exactly (NNN)" \ 751 "\n\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN);\n\t\t\tor exactly (NNN)" \
815) USAGE_FIND_MTIME( \ 752) USE_FEATURE_FIND_MTIME( \
816 "\n\t-mtime DAYS\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) days" \ 753 "\n\t-mtime DAYS\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) days" \
817) USAGE_FIND_MMIN( \ 754) USE_FEATURE_FIND_MMIN( \
818 "\n\t-mmin MINS\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) minutes" \ 755 "\n\t-mmin MINS\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) minutes" \
819) USAGE_FIND_NEWER( \ 756) USE_FEATURE_FIND_NEWER( \
820 "\n\t-newer FILE\tModified time is more recent than FILE's" \ 757 "\n\t-newer FILE\tModified time is more recent than FILE's" \
821) USAGE_FIND_INUM( \ 758) USE_FEATURE_FIND_INUM( \
822 "\n\t-inum N\t\tFile has inode number N" \ 759 "\n\t-inum N\t\tFile has inode number N" \
823) USAGE_FIND_EXEC( \ 760) USE_FEATURE_FIND_EXEC( \
824 "\n\t-exec CMD\tExecute CMD with all instances of {} replaced by the" \ 761 "\n\t-exec CMD\tExecute CMD with all instances of {} replaced by the" \
825 "\n\t\t\tfiles matching EXPRESSION") 762 "\n\t\t\tfiles matching EXPRESSION")
826 763
@@ -966,20 +903,10 @@
966 "\t-I initstring\tSets the init string to send before anything else\n" \ 903 "\t-I initstring\tSets the init string to send before anything else\n" \
967 "\t-H login_host\tLog login_host into the utmp file as the hostname" 904 "\t-H login_host\tLog login_host into the utmp file as the hostname"
968 905
969#if ENABLE_FEATURE_GREP_EGREP_ALIAS
970#define USAGE_GREP_E(a) a
971#else
972#define USAGE_GREP_E(a)
973#endif
974#if ENABLE_FEATURE_GREP_CONTEXT
975#define USAGE_GREP_CTX(a) a
976#else
977#define USAGE_GREP_CTX(a)
978#endif
979#define grep_trivial_usage \ 906#define grep_trivial_usage \
980 "[-ihHnqvs" \ 907 "[-ihHnqvs" \
981 USAGE_GREP_E("E") \ 908 USE_FEATURE_GREP_EGREP_ALIAS("E") \
982 USAGE_GREP_CTX("ABC") \ 909 USE_FEATURE_GREP_CONTEXT("ABC") \
983 "] PATTERN [FILEs...]" 910 "] PATTERN [FILEs...]"
984#define grep_full_usage \ 911#define grep_full_usage \
985 "Search for PATTERN in each FILE or standard input.\n\n" \ 912 "Search for PATTERN in each FILE or standard input.\n\n" \
@@ -997,10 +924,10 @@
997 "\t-f\tread PATTERN from file\n" \ 924 "\t-f\tread PATTERN from file\n" \
998 "\t-e\tPATTERN is a regular expression\n" \ 925 "\t-e\tPATTERN is a regular expression\n" \
999 "\t-F\tPATTERN is a set of newline-separated strings" \ 926 "\t-F\tPATTERN is a set of newline-separated strings" \
1000 USAGE_GREP_E("\n\t-E\tPATTERN is an extended regular expression") \ 927 USE_FEATURE_GREP_EGREP_ALIAS("\n\t-E\tPATTERN is an extended regular expression") \
1001 USAGE_GREP_CTX("\n\t-A\tprint NUM lines of trailing context") \ 928 USE_FEATURE_GREP_CONTEXT("\n\t-A\tprint NUM lines of trailing context") \
1002 USAGE_GREP_CTX("\n\t-B\tprint NUM lines of leading context") \ 929 USE_FEATURE_GREP_CONTEXT("\n\t-B\tprint NUM lines of leading context") \
1003 USAGE_GREP_CTX("\n\t-C\tprint NUM lines of output context") 930 USE_FEATURE_GREP_CONTEXT("\n\t-C\tprint NUM lines of output context")
1004 931
1005#define grep_example_usage \ 932#define grep_example_usage \
1006 "$ grep root /etc/passwd\n" \ 933 "$ grep root /etc/passwd\n" \
@@ -1048,12 +975,6 @@
1048 "\t-n\t\tno call to sync()\n" \ 975 "\t-n\t\tno call to sync()\n" \
1049 "\t-f\t\tforce halt (don't go through init)" 976 "\t-f\t\tforce halt (don't go through init)"
1050 977
1051#ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY
1052#define USAGE_HDPARM_IDENT(a) a
1053#else
1054#define USAGE_HDPARM_IDENT(a)
1055#endif
1056
1057#ifdef CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF 978#ifdef CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF
1058#define USAGE_SCAN_HWIF(a) a 979#define USAGE_SCAN_HWIF(a) a
1059#else 980#else
@@ -1100,8 +1021,8 @@
1100 "\t-g display drive geometry\n" \ 1021 "\t-g display drive geometry\n" \
1101 "\t-h display terse usage information\n" \ 1022 "\t-h display terse usage information\n" \
1102 "\t-i display drive identification\n" \ 1023 "\t-i display drive identification\n" \
1103 USAGE_HDPARM_IDENT("\t-I detailed/current information directly from drive\n") \ 1024 USE_FEATURE_HDPARM_GET_IDENTITY("\t-I detailed/current information directly from drive\n") \
1104 USAGE_HDPARM_IDENT("\t-Istdin similar to -I, but wants /proc/ide/" "*" "/hd?/identify as input\n") \ 1025 USE_FEATURE_HDPARM_GET_IDENTITY("\t-Istdin similar to -I, but wants /proc/ide/" "*" "/hd?/identify as input\n") \
1105 "\t-k get/set keep_settings_over_reset flag (0/1)\n" \ 1026 "\t-k get/set keep_settings_over_reset flag (0/1)\n" \
1106 "\t-K set drive keep_features_over_reset flag (0/1)\n" \ 1027 "\t-K set drive keep_features_over_reset flag (0/1)\n" \
1107 "\t-L set drive doorlock (0/1) (removable harddisks only)\n" \ 1028 "\t-L set drive doorlock (0/1) (removable harddisks only)\n" \
@@ -1780,7 +1701,7 @@
1780#endif 1701#endif
1781 1702
1782#define ls_trivial_usage \ 1703#define ls_trivial_usage \
1783 "[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h") USAGE_NOT_HUMAN_READABLE("") "k" USAGE_SELINUX("K") "] [filenames...]" 1704 "[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" USAGE_SELINUX("K") "] [filenames...]"
1784#define ls_full_usage \ 1705#define ls_full_usage \
1785 "List directory contents\n\n" \ 1706 "List directory contents\n\n" \
1786 "Options:\n" \ 1707 "Options:\n" \
@@ -1809,7 +1730,7 @@
1809 USAGE_AUTOWIDTH("\t-w NUM\tassume the terminal is NUM columns wide\n") \ 1730 USAGE_AUTOWIDTH("\t-w NUM\tassume the terminal is NUM columns wide\n") \
1810 "\t-x\tlist entries by lines instead of by columns\n" \ 1731 "\t-x\tlist entries by lines instead of by columns\n" \
1811 USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \ 1732 USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \
1812 USAGE_HUMAN_READABLE( \ 1733 USE_FEATURE_HUMAN_READABLE( \
1813 "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n") \ 1734 "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n") \
1814 USAGE_SELINUX("\t-k\tprint security context\n") \ 1735 USAGE_SELINUX("\t-k\tprint security context\n") \
1815 USAGE_SELINUX("\t-K\tprint security context in long format\n") 1736 USAGE_SELINUX("\t-K\tprint security context in long format\n")