mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 16:24:28 +08:00
test-runner: Fix -l/--emulator
This fixes -l/--emulator not able to start depending on what parameters are given as it was not setting the directory properly.
This commit is contained in:
parent
8e1892cc92
commit
55888bfd62
@ -609,13 +609,18 @@ static const char *btvirt_table[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static pid_t start_btvirt(void)
|
||||
static pid_t start_btvirt(const char *home)
|
||||
{
|
||||
const char *btvirt = NULL;
|
||||
char *argv[3], *envp[2];
|
||||
pid_t pid;
|
||||
int i;
|
||||
|
||||
if (chdir(home + 5) < 0) {
|
||||
perror("Failed to change home directory for daemon");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; btvirt_table[i]; i++) {
|
||||
struct stat st;
|
||||
|
||||
@ -690,7 +695,7 @@ static void run_command(char *cmdname, char *home)
|
||||
monitor_pid = -1;
|
||||
|
||||
if (start_emulator)
|
||||
emulator_pid = start_btvirt();
|
||||
emulator_pid = start_btvirt(home);
|
||||
else
|
||||
emulator_pid = -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user