From 292c51299c94985316049c2b2ad7727e33f8faf1 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Wed, 14 Apr 2010 07:03:20 +0200 Subject: win32: add get_busybox_exec_path(), which is bb_busybox_exec_path This function will become bb_busybox_exec_path because there is no fixed installation location on Windows. --- win32/mingw.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'win32') diff --git a/win32/mingw.c b/win32/mingw.c index b879bfbae..57573bf60 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -372,3 +372,12 @@ char *realpath(const char *path, char *resolved_path) /* FIXME: need normalization */ 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; +} -- cgit v1.2.3-55-g6feb