aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2026-01-28 01:34:13 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2026-01-28 01:34:13 +0100
commit758c948a63d3c58c134d989c2f2aae0d71b13c04 (patch)
treee3a4ae771d633671ffeb74855c6ae94084b7b027 /shell
parent77d242d7ace21e4d09ec35e790f0a36a33533261 (diff)
downloadbusybox-w32-758c948a63d3c58c134d989c2f2aae0d71b13c04.tar.gz
busybox-w32-758c948a63d3c58c134d989c2f2aae0d71b13c04.tar.bz2
busybox-w32-758c948a63d3c58c134d989c2f2aae0d71b13c04.zip
ash: remove non-standard chdir builtin
function old new delta .rodata 106853 106846 -7 builtintab 352 344 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-15) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f91ca1924..16a2da5ac 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -10757,7 +10757,13 @@ static const struct builtincmd builtintab[] = {
10757#endif 10757#endif
10758 { BUILTIN_SPEC_REG "break" , breakcmd }, 10758 { BUILTIN_SPEC_REG "break" , breakcmd },
10759 { BUILTIN_REGULAR "cd" , cdcmd }, 10759 { BUILTIN_REGULAR "cd" , cdcmd },
10760 { BUILTIN_NOSPEC "chdir" , cdcmd }, 10760#define COMMANDCMD (builtintab + \
10761 /* . : */ 2 + \
10762 /* [ */ 1 * ENABLE_ASH_TEST + \
10763 /* [[ */ 1 * BASH_TEST2 + \
10764 /* alias */ 1 * ENABLE_ASH_ALIAS + \
10765 /* bg */ 1 * JOBS + \
10766 /* break cd */ 2)
10761#if ENABLE_ASH_CMDCMD 10767#if ENABLE_ASH_CMDCMD
10762 { BUILTIN_REGULAR "command" , commandcmd }, 10768 { BUILTIN_REGULAR "command" , commandcmd },
10763#endif 10769#endif
@@ -10765,7 +10771,14 @@ static const struct builtincmd builtintab[] = {
10765#if ENABLE_ASH_ECHO 10771#if ENABLE_ASH_ECHO
10766 { BUILTIN_REGULAR "echo" , echocmd }, 10772 { BUILTIN_REGULAR "echo" , echocmd },
10767#endif 10773#endif
10774#define EVALCMD (COMMANDCMD + \
10775 /* command */ 1 * ENABLE_ASH_CMDCMD + \
10776 /* continue */ 1 + \
10777 /* echo */ 1 * ENABLE_ASH_ECHO + \
10778 0)
10768 { BUILTIN_SPEC_REG "eval" , NULL }, /*evalcmd() has a differing prototype*/ 10779 { BUILTIN_SPEC_REG "eval" , NULL }, /*evalcmd() has a differing prototype*/
10780#define EXECCMD (EVALCMD + \
10781 /* eval */ 1)
10769 { BUILTIN_SPEC_REG "exec" , execcmd }, 10782 { BUILTIN_SPEC_REG "exec" , execcmd },
10770 { BUILTIN_SPEC_REG "exit" , exitcmd }, 10783 { BUILTIN_SPEC_REG "exit" , exitcmd },
10771 { BUILTIN_SPEC_REG_ASSG "export" , exportcmd }, 10784 { BUILTIN_SPEC_REG_ASSG "export" , exportcmd },
@@ -10822,22 +10835,6 @@ static const struct builtincmd builtintab[] = {
10822 { BUILTIN_REGULAR "wait" , waitcmd }, 10835 { BUILTIN_REGULAR "wait" , waitcmd },
10823}; 10836};
10824 10837
10825/* Should match the above table! */
10826#define COMMANDCMD (builtintab + \
10827 /* . : */ 2 + \
10828 /* [ */ 1 * ENABLE_ASH_TEST + \
10829 /* [[ */ 1 * BASH_TEST2 + \
10830 /* alias */ 1 * ENABLE_ASH_ALIAS + \
10831 /* bg */ 1 * ENABLE_ASH_JOB_CONTROL + \
10832 /* break cd cddir */ 3)
10833#define EVALCMD (COMMANDCMD + \
10834 /* command */ 1 * ENABLE_ASH_CMDCMD + \
10835 /* continue */ 1 + \
10836 /* echo */ 1 * ENABLE_ASH_ECHO + \
10837 0)
10838#define EXECCMD (EVALCMD + \
10839 /* eval */ 1)
10840
10841/* 10838/*
10842 * Search the table of builtin commands. 10839 * Search the table of builtin commands.
10843 */ 10840 */