aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-08-17 11:38:30 +0100
committerRon Yorston <rmy@pobox.com>2024-08-17 11:57:45 +0100
commitb21899038683bd646446d3db9e84f64ea669d2ed (patch)
tree086a63f81d5b637efaf87792fc0bf1da77e9662e /arch
parent027fb22e28fecc588d9e088a8d7d77fb63c7dc7b (diff)
downloadbusybox-w32-b21899038683bd646446d3db9e84f64ea669d2ed.tar.gz
busybox-w32-b21899038683bd646446d3db9e84f64ea669d2ed.tar.bz2
busybox-w32-b21899038683bd646446d3db9e84f64ea669d2ed.zip
which,ash: code shrink detection of standalone shell
Commit 6d87be4d7 (which,ash: changes to which/command/type) let 'which' detect when it's run from a standalone shell by having the shell pass the undocumented '-s' option. A better solution is to alter argv[0] when 'which' is run from a standalone shell. This is possible because the code path through run_noexec_applet_and_exit() and which_main() doesn't actually use argv[0]. - No special treatment is required in ash when 'which' has no arguments or the '--help' option. - tryexec() no longer needs an extra element before the start of argv. The commit 027fb22e2 can be reverted and the allocation of argv in evalcommand() simplified. - 'which' no longer needs to handle the '-s' option. Saves 96-104 bytes.
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions