__bionic_get_shell_path(): explanatory comment.

Change-Id: If7cb9ff4a3c13b80bb27da119bfb4c38137798a7
This commit is contained in:
Elliott Hughes 2024-02-26 23:08:06 +00:00
parent a5ac8de33f
commit 529e624e2d

View file

@ -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
}