aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-04-03 12:06:42 +0100
committerRon Yorston <rmy@pobox.com>2012-04-03 12:06:42 +0100
commitd0b801b9459f48a6dd5446fb77070639b8c1462b (patch)
treef81f89438b2cc3adaa462715a58e107d1251f77f
parentb542b6651ac0cb2332693596382080925d924a53 (diff)
downloadbusybox-w32-d0b801b9459f48a6dd5446fb77070639b8c1462b.tar.gz
busybox-w32-d0b801b9459f48a6dd5446fb77070639b8c1462b.tar.bz2
busybox-w32-d0b801b9459f48a6dd5446fb77070639b8c1462b.zip
which: report applets if PREFER_APPLETS is set
-rw-r--r--debianutils/which.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/debianutils/which.c b/debianutils/which.c
index 72d18332b..2b5804e00 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -66,7 +66,7 @@ int which_main(int argc UNUSED_PARAM, char **argv)
66 } 66 }
67 67
68 do { 68 do {
69#if ENABLE_FEATURE_SH_STANDALONE 69#if ENABLE_FEATURE_PREFER_APPLETS
70 if ( find_applet_by_name(*argv) >= 0 ) { 70 if ( find_applet_by_name(*argv) >= 0 ) {
71 puts(*argv); 71 puts(*argv);
72 IF_DESKTOP(if ( !opt )) 72 IF_DESKTOP(if ( !opt ))
@@ -81,12 +81,13 @@ int which_main(int argc UNUSED_PARAM, char **argv)
81 puts(*argv); 81 puts(*argv);
82 continue; 82 continue;
83 } 83 }
84 else if (ENABLE_PLATFORM_MINGW32 && 84#if ENABLE_PLATFORM_MINGW32
85 (p=win32_execable_file(*argv)) != NULL) { 85 else if ((p=win32_execable_file(*argv)) != NULL) {
86 puts(p); 86 puts(p);
87 free(p); 87 free(p);
88 continue; 88 continue;
89 } 89 }
90#endif
90 status = EXIT_FAILURE; 91 status = EXIT_FAILURE;
91 } else { 92 } else {
92 char *path2 = xstrdup(path); 93 char *path2 = xstrdup(path);
@@ -117,12 +118,13 @@ int which_main(int argc UNUSED_PARAM, char **argv)
117 puts(*argv); 118 puts(*argv);
118 continue; 119 continue;
119 } 120 }
120 else if (ENABLE_PLATFORM_MINGW32 && 121#if ENABLE_PLATFORM_MINGW32
121 (p=win32_execable_file(*argv)) != NULL) { 122 else if ((p=win32_execable_file(*argv)) != NULL) {
122 puts(p); 123 puts(p);
123 free(p); 124 free(p);
124 continue; 125 continue;
125 } 126 }
127#endif
126 } else { 128 } else {
127 char *path2 = xstrdup(path); 129 char *path2 = xstrdup(path);
128 char *tmp = path2; 130 char *tmp = path2;