OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff2bc85
)
Move toys.toycount initialization _after_ zeroing toys, so help -a works again.
author
Rob Landley
<rob@landley.net>
Thu, 12 Jun 2014 03:13:28 +0000
(22:13 -0500)
committer
Rob Landley
<rob@landley.net>
Thu, 12 Jun 2014 03:13:28 +0000
(22:13 -0500)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
f0969df
..
fdb4749
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-81,6
+81,7
@@
static void toy_singleinit(struct toy_list *which, char *argv[])
toys.old_umask = umask(0);
if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask);
toys.signalfd--;
+ toys.toycount = ARRAY_LEN(toy_list);
}
// Setup toybox global state for this command.
@@
-167,8
+168,6
@@
int main(int argc, char *argv[])
{
if (CFG_TOYBOX_I18N) setlocale(LC_ALL, "");
- toys.toycount = ARRAY_LEN(toy_list);
-
if (CFG_TOYBOX) {
// Trim path off of command name
*argv = basename(*argv);