Make server port option work on windows
The server port command line option do not work
on windows, need pass -P option to child process.
Change-Id: Ibb3f0a926fae8e17c75fccbd4bb3a33318fffe9e
diff --git a/adb.c b/adb.c
index ec74b49..b7359d4 100644
--- a/adb.c
+++ b/adb.c
@@ -1077,10 +1077,11 @@
/* get path of current program */
GetModuleFileName( NULL, program_path, sizeof(program_path) );
-
+ char args[64];
+ snprintf(args, sizeof(args), "adb -P %d fork-server server", server_port);
ret = CreateProcess(
program_path, /* program path */
- "adb fork-server server",
+ args,
/* the fork-server argument will set the
debug = 2 in the child */
NULL, /* process handle is not inheritable */