This function will become bb_busybox_exec_path because there is no
fixed installation location on Windows.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
---
 win32/mingw.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/win32/mingw.c b/win32/mingw.c
index 981968a..98a45e2 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -371,3 +371,12 @@ char *realpath(const char *path, char *resolved_path)
 {
 	return strcpy(resolved_path, path);
 }
+
+const char *get_busybox_exec_path(void)
+{
+	static char path[PATH_MAX] = "";
+
+	if (!*path)
+		GetModuleFileName(NULL, path, PATH_MAX);
+	return path;
+}
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to