diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-07-02 13:11:37 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-07-02 13:11:37 +0100 |
| commit | 882815f8740fe0c42ff53bc7df8f9bfb750d6944 (patch) | |
| tree | 10cd652d2185a95e96bfa8755f8db3fa4a643599 /win32 | |
| parent | 20495b16aaf9bc888a6fc1d10b3746c506420b04 (diff) | |
| download | busybox-w32-master.tar.gz busybox-w32-master.tar.bz2 busybox-w32-master.zip | |
Update the 'rpm' applet so it also respects the BB_SYSTEMROOT
environment variable.
Replace chdir_system_drive() with xchdir_system_drive(), which
exits on failure to change directory.
Saves 32-36 bytes.
(GitHub PR #603)
Signed-off-by: Ron Yorston <rmy@pobox.com>
Diffstat (limited to 'win32')
| -rw-r--r-- | win32/mingw.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/win32/mingw.c b/win32/mingw.c index 28ee81e4e..6e6b20e80 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
| @@ -2461,14 +2461,11 @@ const char * FAST_FUNC get_system_drive(void) | |||
| 2461 | return getenv(BB_SYSTEMROOT) ?: drive; | 2461 | return getenv(BB_SYSTEMROOT) ?: drive; |
| 2462 | } | 2462 | } |
| 2463 | 2463 | ||
| 2464 | int chdir_system_drive(void) | 2464 | void xchdir_system_drive(void) |
| 2465 | { | 2465 | { |
| 2466 | const char *sd = get_system_drive(); | 2466 | char *path = concat_path_file(get_system_drive(), ""); |
| 2467 | int ret = -1; | 2467 | xchdir(path); |
| 2468 | 2468 | free(path); | |
| 2469 | if (*sd) | ||
| 2470 | ret = chdir(auto_string(concat_path_file(sd, ""))); | ||
| 2471 | return ret; | ||
| 2472 | } | 2469 | } |
| 2473 | 2470 | ||
| 2474 | /* | 2471 | /* |
