aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-02-27 19:14:19 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-02-27 19:14:19 +0000
commitc3a6b446c4387c32f9be9d2d6542de9aa498a870 (patch)
treee75b4cbad358a2f6d0a937276168885da80f07cf
parenta5ac8de33f14010b6f5614762712183b1dea3546 (diff)
parent529e624e2df9e9bed2219ecfa42af933647750f2 (diff)
downloadbionic-c3a6b446c4387c32f9be9d2d6542de9aa498a870.tar.gz
Merge "__bionic_get_shell_path(): explanatory comment." into main
-rw-r--r--libc/bionic/__bionic_get_shell_path.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/bionic/__bionic_get_shell_path.cpp b/libc/bionic/__bionic_get_shell_path.cpp
index 5d22e00ad..3ea256deb 100644
--- a/libc/bionic/__bionic_get_shell_path.cpp
+++ b/libc/bionic/__bionic_get_shell_path.cpp
@@ -29,10 +29,14 @@
#include "private/__bionic_get_shell_path.h"
const char* __bionic_get_shell_path() {
+ // For the host Bionic, we use the standard /bin/sh.
+ // Since P there's a /bin -> /system/bin symlink that means this will work
+ // for the device too, but as long as the NDK supports earlier API levels,
+ // we should probably make sure that this works in static binaries run on
+ // those OS versions too.
#if !defined(__ANDROID__)
- // For the host Bionic, use the standard /bin/sh
return "/bin/sh";
#else
return "/system/bin/sh";
-#endif // if !defined(__ANDROID__)
+#endif
}