Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

device-generic-goldfish: Commit

device/generic/goldfish


Commit MetaInfo

Revision7165d3b5faf3d7a18bcb48bcb6a1afb863474ad3 (tree)
Time2017-02-25 15:28:14
Authorbohu <bohu@goog...>
Commiterbohu

Log Message

Emulator: make qemu_pipe_open usage consistent with definition

The qemu_pipe_open(const char* purpose) inside the goldfish/include/qemu_pipe.h
adds 'pipe:' prefix to the purpose string, and the caller should not add that
'pipe:' prefix to avoid double prefixes of 'pipe:'

Note: This definition of qemu_pipe_open is the legacy definition; and it is different
from the new definition in system/core/include/qemu_pipe.h, where the caller should
add the 'pipe:' prefix. AFAIK, this new definition is used in adbd and rild.

goldfish project sticks with legacy definition for ease of cherry picking of fixes
accross different api levels.

Change-Id: I7b61bc1c58d64dcec5129582bd0981a4d534d084

Change Summary

Incremental Difference

--- a/camera/QemuClient.cpp
+++ b/camera/QemuClient.cpp
@@ -228,7 +228,7 @@ status_t QemuClient::connectClient(const char* param)
228228 if (param == NULL || *param == '\0') {
229229 /* No parameters: connect to the factory service. */
230230 char pipe_name[512];
231- snprintf(pipe_name, sizeof(pipe_name), "pipe:qemud:%s",
231+ snprintf(pipe_name, sizeof(pipe_name), "qemud:%s",
232232 mCameraServiceName);
233233 mPipeFD = qemu_pipe_open(pipe_name);
234234 } else {
@@ -236,7 +236,7 @@ status_t QemuClient::connectClient(const char* param)
236236 * characters for 'pipe:qemud:'. This is required by pipe protocol. */
237237 char* connection_str = new char[strlen(mCameraServiceName) +
238238 strlen(param) + 8];
239- sprintf(connection_str, "pipe:qemud:%s:%s", mCameraServiceName, param);
239+ sprintf(connection_str, "qemud:%s:%s", mCameraServiceName, param);
240240
241241 mPipeFD = qemu_pipe_open(connection_str);
242242 delete[] connection_str;
--- a/gps/gps_qemu.c
+++ b/gps/gps_qemu.c
@@ -37,7 +37,7 @@
3737 #include "qemu_pipe.h"
3838
3939 /* the name of the qemu-controlled pipe */
40-#define QEMU_CHANNEL_NAME "pipe:qemud:gps"
40+#define QEMU_CHANNEL_NAME "qemud:gps"
4141
4242 #define GPS_DEBUG 0
4343
--- a/vibrator/qemu.c
+++ b/vibrator/qemu.c
@@ -36,7 +36,7 @@
3636 # define D(...) ((void)0)
3737 #endif
3838
39-#include <system/qemu_pipe.h>
39+#include "qemu_pipe.h"
4040
4141 int
4242 qemu_check(void)
Show on old repository browser