mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-11 05:02:26 -04:00
Remove interleave of non-U-Boot code in hush
There is a nasty interleave of #ifdefs in hush.c where the two code paths have different indents. Remove this ickiness. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
bdf8e34b93
commit
7344f9128d
@ -1642,6 +1642,15 @@ static int run_pipe_real(struct pipe *pi)
|
|||||||
* Is it really safe for inline use? Experimentally,
|
* Is it really safe for inline use? Experimentally,
|
||||||
* things seem to work with glibc. */
|
* things seem to work with glibc. */
|
||||||
setup_redirects(child, squirrel);
|
setup_redirects(child, squirrel);
|
||||||
|
|
||||||
|
child->argv += i; /* XXX horrible hack */
|
||||||
|
rcode = x->function(child);
|
||||||
|
/* XXX restore hack so free() can work right */
|
||||||
|
child->argv -= i;
|
||||||
|
restore_redirects(squirrel);
|
||||||
|
}
|
||||||
|
return rcode;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
/* check ";", because ,example , argv consist from
|
/* check ";", because ,example , argv consist from
|
||||||
* "help;flinfo" must not execute
|
* "help;flinfo" must not execute
|
||||||
@ -1674,22 +1683,11 @@ static int run_pipe_real(struct pipe *pi)
|
|||||||
if ((child->argc - i) > cmdtp->maxargs)
|
if ((child->argc - i) > cmdtp->maxargs)
|
||||||
return cmd_usage(cmdtp);
|
return cmd_usage(cmdtp);
|
||||||
#endif
|
#endif
|
||||||
child->argv+=i; /* XXX horrible hack */
|
|
||||||
#ifndef __U_BOOT__
|
|
||||||
rcode = x->function(child);
|
|
||||||
#else
|
|
||||||
/* OK - call function to do the command */
|
/* OK - call function to do the command */
|
||||||
rcode = cmd_call(cmdtp, flag, child->argc-i,
|
rcode = cmd_call(cmdtp, flag, child->argc,
|
||||||
&child->argv[i]);
|
child->argv);
|
||||||
if (!cmdtp->repeatable)
|
if (!cmdtp->repeatable)
|
||||||
flag_repeat = 0;
|
flag_repeat = 0;
|
||||||
#endif
|
|
||||||
child->argv-=i; /* XXX restore hack so free() can work right */
|
|
||||||
#ifndef __U_BOOT__
|
|
||||||
|
|
||||||
restore_redirects(squirrel);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return rcode;
|
return rcode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user