Merge "use /system/bin/sh for all" into main
diff --git a/libc/bionic/__bionic_get_shell_path.cpp b/libc/bionic/__bionic_get_shell_path.cpp
index b78aede..5d22e00 100644
--- a/libc/bionic/__bionic_get_shell_path.cpp
+++ b/libc/bionic/__bionic_get_shell_path.cpp
@@ -28,29 +28,11 @@
#include "private/__bionic_get_shell_path.h"
-#include <errno.h>
-#include <string.h>
-#include <sys/cdefs.h>
-#include <unistd.h>
-
-#define VENDOR_PREFIX "/vendor/"
-
-static const char* init_sh_path() {
+const char* __bionic_get_shell_path() {
#if !defined(__ANDROID__)
// For the host Bionic, use the standard /bin/sh
return "/bin/sh";
#else
- // Look for /system or /vendor prefix.
- char exe_path[strlen(VENDOR_PREFIX)];
- ssize_t len = readlink("/proc/self/exe", exe_path, sizeof(exe_path));
- if (len != -1 && !strncmp(exe_path, VENDOR_PREFIX, strlen(VENDOR_PREFIX))) {
- return "/vendor/bin/sh";
- }
return "/system/bin/sh";
#endif // if !defined(__ANDROID__)
}
-
-const char* __bionic_get_shell_path() {
- static const char* sh_path = init_sh_path();
- return sh_path;
-}