aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-03-24 16:59:41 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-24 16:59:41 +0000
commit75e6bb91590d496b568351bf80932a51aa58a1fe (patch)
tree442e2a4df285a5ec439a39ab3351b2d86e953f11
parentf0b79edb50584629a4bb33f8b26b0ece760adab9 (diff)
parentdf46ccd5740fb8f74ebb3b363d7c04a30f7cefbc (diff)
downloadandroid_external_toybox-75e6bb91590d496b568351bf80932a51aa58a1fe.tar.gz
android_external_toybox-75e6bb91590d496b568351bf80932a51aa58a1fe.tar.bz2
android_external_toybox-75e6bb91590d496b568351bf80932a51aa58a1fe.zip
Merge remote-tracking branch 'toybox/master' into HEAD am: f6e803dd5c
am: df46ccd574 Change-Id: Ib039f6836210863337377f22d977526e717659ae
-rw-r--r--lib/args.c22
-rwxr-xr-xwww/news.html10
2 files changed, 16 insertions, 16 deletions
diff --git a/lib/args.c b/lib/args.c
index 00932de9..20084f36 100644
--- a/lib/args.c
+++ b/lib/args.c
@@ -136,7 +136,7 @@ static int gotflag(struct getoptflagstate *gof, struct opts *opt)
// Did we recognize this option?
if (!opt) {
if (gof->noerror) return 1;
- help_exit("Unknown option %s", gof->arg);
+ error_exit("Unknown option %s", gof->arg);
}
// Might enabling this switch off something else?
@@ -163,7 +163,7 @@ static int gotflag(struct getoptflagstate *gof, struct opts *opt)
if (opt == bad || !(i & toys.optflags)) continue;
if (toys.optflags & bad->dex[2]) break;
}
- if (bad) help_exit("No '%c' with '%c'", opt->c, bad->c);
+ if (bad) error_exit("No '%c' with '%c'", opt->c, bad->c);
}
// Does this option take an argument?
@@ -187,10 +187,10 @@ static int gotflag(struct getoptflagstate *gof, struct opts *opt)
char *s = "Missing argument to ";
struct longopts *lo;
- if (opt->c != -1) help_exit("%s-%c", s, opt->c);
+ if (opt->c != -1) error_exit("%s-%c", s, opt->c);
for (lo = gof->longopts; lo->opt != opt; lo = lo->next);
- help_exit("%s--%.*s", s, lo->len, lo->str);
+ error_exit("%s--%.*s", s, lo->len, lo->str);
}
if (type == ':') *(opt->arg) = (long)arg;
@@ -204,8 +204,8 @@ static int gotflag(struct getoptflagstate *gof, struct opts *opt)
} else if (type == '#' || type == '-') {
long l = atolx(arg);
if (type == '-' && !ispunct(*arg)) l*=-1;
- if (l < opt->val[0].l) help_exit("-%c < %ld", opt->c, opt->val[0].l);
- if (l > opt->val[1].l) help_exit("-%c > %ld", opt->c, opt->val[1].l);
+ if (l < opt->val[0].l) error_exit("-%c < %ld", opt->c, opt->val[0].l);
+ if (l > opt->val[1].l) error_exit("-%c > %ld", opt->c, opt->val[1].l);
*(opt->arg) = l;
} else if (CFG_TOYBOX_FLOAT && type == '.') {
@@ -213,9 +213,9 @@ static int gotflag(struct getoptflagstate *gof, struct opts *opt)
*f = strtod(arg, &arg);
if (opt->val[0].l != LONG_MIN && *f < opt->val[0].f)
- help_exit("-%c < %lf", opt->c, (double)opt->val[0].f);
+ error_exit("-%c < %lf", opt->c, (double)opt->val[0].f);
if (opt->val[1].l != LONG_MAX && *f > opt->val[1].f)
- help_exit("-%c > %lf", opt->c, (double)opt->val[1].f);
+ error_exit("-%c > %lf", opt->c, (double)opt->val[1].f);
}
if (!gof->nodash_now) gof->arg = "";
@@ -475,10 +475,10 @@ notflag:
// Sanity check
if (toys.optc<gof.minargs)
- help_exit("Need%s %d argument%s", letters[!!(gof.minargs-1)],
+ error_exit("Need%s %d argument%s", letters[!!(gof.minargs-1)],
gof.minargs, letters[!(gof.minargs-1)]);
if (toys.optc>gof.maxargs)
- help_exit("Max %d argument%s", gof.maxargs, letters[!(gof.maxargs-1)]);
+ error_exit("Max %d argument%s", gof.maxargs, letters[!(gof.maxargs-1)]);
if (gof.requires && !(gof.requires & toys.optflags)) {
struct opts *req;
char needs[32], *s = needs;
@@ -487,7 +487,7 @@ notflag:
if (req->flags & 1) *(s++) = req->c;
*s = 0;
- help_exit("Needs %s-%s", s[1] ? "one of " : "", needs);
+ error_exit("Needs %s-%s", s[1] ? "one of " : "", needs);
}
if (CFG_TOYBOX_FREE) {
diff --git a/www/news.html b/www/news.html
index fadd8959..73516b0b 100755
--- a/www/news.html
+++ b/www/news.html
@@ -50,7 +50,7 @@ more than 4 chars left for the "CMD" field on 64 bit systems.</p>
multiply to avoid accumulating rounding errors from repeated fractional
increments. Wang Xiao Jian fixed a bug in sort -k.
Elliott let getprop use the @ character in property names, and
-Dimitry Invaov removed the name length limit for system properties.
+Dimitry Ivanov removed the name length limit for system properties.
Elliott also improved some error reporting and improved top -H's display
of thread names.
@@ -75,10 +75,10 @@ to the function the XVFORK() wrapper macro calls. (It's a nommu thing.)</p>
unnecessary casts in stat.</p>
<p>Continuing attempts to build under Android NDK brought up that posix
-defines the global 'stdout' as a macro, which bionic turns into an array
-member, but a function was using it as an argument name. (How that ever
-worked in the AOSP build, I couldn't tell you, but the argument got
-renamed anyway.)</p>
+defines the global 'stdout' as a macro, which older versions of bionic
+turned into an array member, but a function was using it as an argument
+name. (This worked in the AOSP build because it only builds against current
+bionic, where there's a global 'stdout'.)</p>
<p>Several commits argued with clang's warning generation, eventually
settling on a variant of __attribute__((__shut_up__)).</p>