diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-14 07:03:20 +0200 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-10 18:40:34 +1000 |
commit | 292c51299c94985316049c2b2ad7727e33f8faf1 (patch) | |
tree | 8d4801af40c6de39cf791b39acd935e09ff6d3b9 /win32 | |
parent | 4fc9774cb660ea99f90466c4253413447e23e2d0 (diff) | |
download | busybox-w32-292c51299c94985316049c2b2ad7727e33f8faf1.tar.gz busybox-w32-292c51299c94985316049c2b2ad7727e33f8faf1.tar.bz2 busybox-w32-292c51299c94985316049c2b2ad7727e33f8faf1.zip |
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.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/mingw.c | 9 |
1 files changed, 9 insertions, 0 deletions
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) | |||
372 | /* FIXME: need normalization */ | 372 | /* FIXME: need normalization */ |
373 | return strcpy(resolved_path, path); | 373 | return strcpy(resolved_path, path); |
374 | } | 374 | } |
375 | |||
376 | const char *get_busybox_exec_path(void) | ||
377 | { | ||
378 | static char path[PATH_MAX] = ""; | ||
379 | |||
380 | if (!*path) | ||
381 | GetModuleFileName(NULL, path, PATH_MAX); | ||
382 | return path; | ||
383 | } | ||