diff options
author | Ron Yorston <rmy@pobox.com> | 2023-06-03 07:27:04 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-06-03 07:27:04 +0100 |
commit | e013876e1dc0ce8e3a36abea9390d35a7053bd84 (patch) | |
tree | b0b2b0fabc93fb338a7aaab0d2db8695e016acf2 | |
parent | 0a5ca0348b05f827032a57fac5d7732e464a0e46 (diff) | |
download | busybox-w32-e013876e1dc0ce8e3a36abea9390d35a7053bd84.tar.gz busybox-w32-e013876e1dc0ce8e3a36abea9390d35a7053bd84.tar.bz2 busybox-w32-e013876e1dc0ce8e3a36abea9390d35a7053bd84.zip |
win32: fix BB_OVERRIDE_APPLETS
Now that BB_OVERRIDE_APPLETS can affect how the shell searches
PATH it may be necessary to invalidate the command table when it
changes. It's probably not worth being clever about this: just
invalidate the cache on every change.
Adds 40-80 bytes
(GitHub issue #329)
-rw-r--r-- | shell/ash.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index fda4541b4..07319dbdf 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -2350,6 +2350,13 @@ change_terminal_mode(const char *newval UNUSED_PARAM) | |||
2350 | terminal_mode(TRUE); | 2350 | terminal_mode(TRUE); |
2351 | } | 2351 | } |
2352 | 2352 | ||
2353 | static void clearcmdentry(void); | ||
2354 | static void FAST_FUNC | ||
2355 | change_override_applets(const char *newval UNUSED_PARAM) | ||
2356 | { | ||
2357 | clearcmdentry(); | ||
2358 | } | ||
2359 | |||
2353 | # define LINENO_INDEX (5 + 2 * ENABLE_ASH_MAIL + ENABLE_ASH_GETOPTS) | 2360 | # define LINENO_INDEX (5 + 2 * ENABLE_ASH_MAIL + ENABLE_ASH_GETOPTS) |
2354 | # define FUNCNAME_INDEX (LINENO_INDEX + 1) | 2361 | # define FUNCNAME_INDEX (LINENO_INDEX + 1) |
2355 | #endif | 2362 | #endif |
@@ -2394,6 +2401,7 @@ static const struct { | |||
2394 | #if ENABLE_PLATFORM_MINGW32 | 2401 | #if ENABLE_PLATFORM_MINGW32 |
2395 | { VSTRFIXED|VTEXTFIXED|VUNSET, BB_SKIP_ANSI_EMULATION, change_terminal_mode }, | 2402 | { VSTRFIXED|VTEXTFIXED|VUNSET, BB_SKIP_ANSI_EMULATION, change_terminal_mode }, |
2396 | { VSTRFIXED|VTEXTFIXED|VUNSET, BB_TERMINAL_MODE, change_terminal_mode }, | 2403 | { VSTRFIXED|VTEXTFIXED|VUNSET, BB_TERMINAL_MODE, change_terminal_mode }, |
2404 | { VSTRFIXED|VTEXTFIXED|VUNSET, BB_OVERRIDE_APPLETS, change_override_applets }, | ||
2397 | #endif | 2405 | #endif |
2398 | }; | 2406 | }; |
2399 | 2407 | ||