diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 11 | ||||
-rw-r--r-- | include/usage.src.h | 30 |
2 files changed, 30 insertions, 11 deletions
diff --git a/include/libbb.h b/include/libbb.h index a7814b75f..3a7a8f33f 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -201,7 +201,7 @@ typedef unsigned long long uoff_t; | |||
201 | /* While sizeof(off_t) == sizeof(int), off_t is typedef'ed to long anyway. | 201 | /* While sizeof(off_t) == sizeof(int), off_t is typedef'ed to long anyway. |
202 | * gcc will throw warnings on printf("%d", off_t). Crap... */ | 202 | * gcc will throw warnings on printf("%d", off_t). Crap... */ |
203 | typedef unsigned long uoff_t; | 203 | typedef unsigned long uoff_t; |
204 | # define XATOOFF(a) xatoi_u(a) | 204 | # define XATOOFF(a) xatoi_positive(a) |
205 | # define BB_STRTOOFF bb_strtou | 205 | # define BB_STRTOOFF bb_strtou |
206 | # define STRTOOFF strtol | 206 | # define STRTOOFF strtol |
207 | # define OFF_FMT "l" | 207 | # define OFF_FMT "l" |
@@ -781,11 +781,16 @@ struct suffix_mult { | |||
781 | }; | 781 | }; |
782 | #include "xatonum.h" | 782 | #include "xatonum.h" |
783 | /* Specialized: */ | 783 | /* Specialized: */ |
784 | |||
784 | /* Using xatoi() instead of naive atoi() is not always convenient - | 785 | /* Using xatoi() instead of naive atoi() is not always convenient - |
785 | * in many places people want *non-negative* values, but store them | 786 | * in many places people want *non-negative* values, but store them |
786 | * in signed int. Therefore we need this one: | 787 | * in signed int. Therefore we need this one: |
787 | * dies if input is not in [0, INT_MAX] range. Also will reject '-0' etc */ | 788 | * dies if input is not in [0, INT_MAX] range. Also will reject '-0' etc. |
788 | int xatoi_u(const char *numstr) FAST_FUNC; | 789 | * It should really be named xatoi_nonnegative (since it allows 0), |
790 | * but that would be too long. | ||
791 | */ | ||
792 | int xatoi_positive(const char *numstr) FAST_FUNC; | ||
793 | |||
789 | /* Useful for reading port numbers */ | 794 | /* Useful for reading port numbers */ |
790 | uint16_t xatou16(const char *numstr) FAST_FUNC; | 795 | uint16_t xatou16(const char *numstr) FAST_FUNC; |
791 | 796 | ||
diff --git a/include/usage.src.h b/include/usage.src.h index 0053a7c4b..0eff1b129 100644 --- a/include/usage.src.h +++ b/include/usage.src.h | |||
@@ -2989,9 +2989,7 @@ INSERT | |||
2989 | "\n -d Verbose" \ | 2989 | "\n -d Verbose" \ |
2990 | "\n -n Do not daemonize" \ | 2990 | "\n -n Do not daemonize" \ |
2991 | "\n -q Quit after clock is set" \ | 2991 | "\n -q Quit after clock is set" \ |
2992 | /* -N exists for mostly compat reasons, thus not essential to inform */ \ | 2992 | "\n -N Run at high priority" \ |
2993 | /* the user that it exists: user may use nice as well */ \ | ||
2994 | /* "\n -N Run at high priority" */ \ | ||
2995 | "\n -w Do not set time (only query peers), implies -n" \ | 2993 | "\n -w Do not set time (only query peers), implies -n" \ |
2996 | "\n -l Run as server on port 123" \ | 2994 | "\n -l Run as server on port 123" \ |
2997 | "\n -S PROG Run PROG after stepping time, stratum change, and every 11 mins" \ | 2995 | "\n -S PROG Run PROG after stepping time, stratum change, and every 11 mins" \ |
@@ -4467,8 +4465,13 @@ INSERT | |||
4467 | #define tune2fs_full_usage "\n\n" \ | 4465 | #define tune2fs_full_usage "\n\n" \ |
4468 | "Adjust filesystem options on ext[23] filesystems" | 4466 | "Adjust filesystem options on ext[23] filesystems" |
4469 | 4467 | ||
4468 | #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1 | ||
4469 | # define IF_UDHCP_VERBOSE(...) __VA_ARGS__ | ||
4470 | #else | ||
4471 | # define IF_UDHCP_VERBOSE(...) | ||
4472 | #endif | ||
4470 | #define udhcpc_trivial_usage \ | 4473 | #define udhcpc_trivial_usage \ |
4471 | "[-fbnqvoCR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]\n" \ | 4474 | "[-fbnq"IF_UDHCP_VERBOSE("v")"oCR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]\n" \ |
4472 | " [-H HOSTNAME] [-c CID] [-V VENDOR] [-O DHCP_OPT]..." IF_FEATURE_UDHCP_PORT(" [-P N]") | 4475 | " [-H HOSTNAME] [-c CID] [-V VENDOR] [-O DHCP_OPT]..." IF_FEATURE_UDHCP_PORT(" [-P N]") |
4473 | #define udhcpc_full_usage "\n" \ | 4476 | #define udhcpc_full_usage "\n" \ |
4474 | IF_LONG_OPTS( \ | 4477 | IF_LONG_OPTS( \ |
@@ -4501,6 +4504,9 @@ INSERT | |||
4501 | "\n -V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION')" \ | 4504 | "\n -V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION')" \ |
4502 | "\n -c,--clientid CLIENTID Client identifier (default own MAC)" \ | 4505 | "\n -c,--clientid CLIENTID Client identifier (default own MAC)" \ |
4503 | "\n -C,--clientid-none Don't send client identifier" \ | 4506 | "\n -C,--clientid-none Don't send client identifier" \ |
4507 | IF_UDHCP_VERBOSE( \ | ||
4508 | "\n -v Verbose" \ | ||
4509 | ) \ | ||
4504 | ) \ | 4510 | ) \ |
4505 | IF_NOT_LONG_OPTS( \ | 4511 | IF_NOT_LONG_OPTS( \ |
4506 | "\n -i IFACE Interface to use (default eth0)" \ | 4512 | "\n -i IFACE Interface to use (default eth0)" \ |
@@ -4532,7 +4538,10 @@ INSERT | |||
4532 | "\n -V VENDOR Vendor identifier (default 'udhcp VERSION')" \ | 4538 | "\n -V VENDOR Vendor identifier (default 'udhcp VERSION')" \ |
4533 | "\n -c CLIENTID Client identifier (default own MAC)" \ | 4539 | "\n -c CLIENTID Client identifier (default own MAC)" \ |
4534 | "\n -C Don't send client identifier" \ | 4540 | "\n -C Don't send client identifier" \ |
4535 | ) | 4541 | IF_UDHCP_VERBOSE( \ |
4542 | "\n -v Verbose" \ | ||
4543 | ) \ | ||
4544 | ) \ | ||
4536 | 4545 | ||
4537 | #define udhcpd_trivial_usage \ | 4546 | #define udhcpd_trivial_usage \ |
4538 | "[-fS]" IF_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \ | 4547 | "[-fS]" IF_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \ |
@@ -4768,10 +4777,12 @@ INSERT | |||
4768 | IF_FEATURE_WGET_LONG_OPTIONS( \ | 4777 | IF_FEATURE_WGET_LONG_OPTIONS( \ |
4769 | "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]\n" \ | 4778 | "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]\n" \ |
4770 | " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \ | 4779 | " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \ |
4771 | " [--no-check-certificate] [-U|--user-agent AGENT] URL" \ | 4780 | " [--no-check-certificate] [-U|--user-agent AGENT]" \ |
4781 | IF_FEATURE_WGET_TIMEOUT("[-T SEC] ") " URL" \ | ||
4772 | ) \ | 4782 | ) \ |
4773 | IF_NOT_FEATURE_WGET_LONG_OPTIONS( \ | 4783 | IF_NOT_FEATURE_WGET_LONG_OPTIONS( \ |
4774 | "[-csq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT] URL" \ | 4784 | "[-csq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT]" \ |
4785 | IF_FEATURE_WGET_TIMEOUT("[-T SEC] ") " URL" \ | ||
4775 | ) | 4786 | ) |
4776 | #define wget_full_usage "\n\n" \ | 4787 | #define wget_full_usage "\n\n" \ |
4777 | "Retrieve files via HTTP or FTP\n" \ | 4788 | "Retrieve files via HTTP or FTP\n" \ |
@@ -4779,7 +4790,10 @@ INSERT | |||
4779 | "\n -s Spider mode - only check file existence" \ | 4790 | "\n -s Spider mode - only check file existence" \ |
4780 | "\n -c Continue retrieval of aborted transfer" \ | 4791 | "\n -c Continue retrieval of aborted transfer" \ |
4781 | "\n -q Quiet" \ | 4792 | "\n -q Quiet" \ |
4782 | "\n -P Set directory prefix to DIR" \ | 4793 | "\n -P DIR Save to DIR (default .)" \ |
4794 | IF_FEATURE_WGET_TIMEOUT( \ | ||
4795 | "\n -T SEC Network read timeout is SEC seconds" \ | ||
4796 | ) \ | ||
4783 | "\n -O FILE Save to FILE ('-' for stdout)" \ | 4797 | "\n -O FILE Save to FILE ('-' for stdout)" \ |
4784 | "\n -U STR Use STR for User-Agent header" \ | 4798 | "\n -U STR Use STR for User-Agent header" \ |
4785 | "\n -Y Use proxy ('on' or 'off')" \ | 4799 | "\n -Y Use proxy ('on' or 'off')" \ |