Rename adb_command to adb_executable

Semantically, a "command" refers to the whole command line argv (adb and
its arguments).
This commit is contained in:
Romain Vimont 2022-02-05 09:21:53 +01:00
parent 028e7afe32
commit ba30ca5c1e

View file

@ -11,16 +11,16 @@
#include "util/process_intr.h" #include "util/process_intr.h"
#include "util/str.h" #include "util/str.h"
static const char *adb_command; static const char *adb_executable;
static inline const char * static inline const char *
get_adb_command(void) { get_adb_executable(void) {
if (!adb_command) { if (!adb_executable) {
adb_command = getenv("ADB"); adb_executable = getenv("ADB");
if (!adb_command) if (!adb_executable)
adb_command = "adb"; adb_executable = "adb";
} }
return adb_command; return adb_executable;
} }
// serialize argv to string "[arg1], [arg2], [arg3]" // serialize argv to string "[arg1], [arg2], [arg3]"
@ -163,7 +163,7 @@ sc_adb_create_argv(const char *serial, const char *const adb_cmd[],
return NULL; return NULL;
} }
argv[0] = get_adb_command(); argv[0] = get_adb_executable();
int i; int i;
if (serial) { if (serial) {
argv[1] = "-s"; argv[1] = "-s";