diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-14 11:02:12 +1000 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-14 11:06:24 +1000 |
commit | ba3cea41689d211093d914212de048cc06d976ce (patch) | |
tree | 260f680a782332c7e4507c170ae3a923bc1742f5 /debianutils | |
parent | b3129dcb497732f827c56666617b0744bcab1315 (diff) | |
download | busybox-w32-ba3cea41689d211093d914212de048cc06d976ce.tar.gz busybox-w32-ba3cea41689d211093d914212de048cc06d976ce.tar.bz2 busybox-w32-ba3cea41689d211093d914212de048cc06d976ce.zip |
win32: which: support .com executables
Diffstat (limited to 'debianutils')
-rw-r--r-- | debianutils/which.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/debianutils/which.c b/debianutils/which.c index 10ddb008c..59dedf58d 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
@@ -50,6 +50,11 @@ int which_main(int argc UNUSED_PARAM, char **argv) | |||
50 | puts(path); | 50 | puts(path); |
51 | continue; | 51 | continue; |
52 | } | 52 | } |
53 | memcpy(path+len, ".com", 5); | ||
54 | if (execable_file(path)) { | ||
55 | puts(path); | ||
56 | continue; | ||
57 | } | ||
53 | } | 58 | } |
54 | status = EXIT_FAILURE; | 59 | status = EXIT_FAILURE; |
55 | } else { | 60 | } else { |
@@ -90,6 +95,11 @@ int which_main(int argc UNUSED_PARAM, char **argv) | |||
90 | puts(path); | 95 | puts(path); |
91 | continue; | 96 | continue; |
92 | } | 97 | } |
98 | memcpy(path+len, ".com", 5); | ||
99 | if (execable_file(path)) { | ||
100 | puts(path); | ||
101 | continue; | ||
102 | } | ||
93 | } | 103 | } |
94 | } else { | 104 | } else { |
95 | char *path2 = xstrdup(path); | 105 | char *path2 = xstrdup(path); |