From 548ec7045bc7c80eaf03e92f390d1da2c9e9cd86 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Thu, 28 Mar 2019 12:52:44 +0000 Subject: win32: interpret absolute paths as relative to %SYSTEMDRIVE% BusyBox contains hardcoded references to absolute paths which are unique in the *nix world but on Microsoft Windows are interpreted as being on the current drive. To make these unique again consider them to be relative to %SYSTEMDRIVE%. Support this by adding functions to: - determine the system drive (not using the environment variable); - change a process's current directory to the root of the system drive; - make relative paths absolute before changing directory (if needed). The following applications have been modified: - ash references /etc/profile from the system drive; - dpkg places its data store on and installs files to the system drive; - rpm installs files to the system drive; - man looks for configuration files and man pages on the system drive. See GitHub issue #158. --- include/mingw.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/mingw.h b/include/mingw.h index 7c9423cad..d77a9beb9 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -525,3 +525,6 @@ void hide_console(void); int unc_root_len(const char *dir); int root_len(const char *path); +char *get_system_drive(void); +int chdir_system_drive(void); +char *xabsolute_path(char *path); -- cgit v1.2.3-55-g6feb