diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-09-07 05:54:42 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-01-24 01:08:26 +0100 |
commit | 5fce35e7e7e25d41398ca6eac28b787397b58a8c (patch) | |
tree | a47cbe83c46fa7354c2d3236e501bc4615bd0b38 | |
parent | a167e38454e79311f788e3b6a4086dfb3c6b2131 (diff) | |
download | hardware_replicant_libsamsung-ipc-history/ipc_transport_client_create-crude-debugging.tar.gz hardware_replicant_libsamsung-ipc-history/ipc_transport_client_create-crude-debugging.tar.bz2 hardware_replicant_libsamsung-ipc-history/ipc_transport_client_create-crude-debugging.zip |
ipc_transport_client_create: Add crude debugginghistory/ipc_transport_client_create-crude-debugging
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | samsung-ipc/ipc.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c index 7df57ec..9ccaa34 100644 --- a/samsung-ipc/ipc.c +++ b/samsung-ipc/ipc.c @@ -170,16 +170,24 @@ static struct ipc_client *ipc_transport_client_create(int type) unsigned int device_index; int rc; - if (type < 0 || type > IPC_CLIENT_TYPE_RFS) + printf("ENTER %s\n", __FUNCTION__); + + if (type < 0 || type > IPC_CLIENT_TYPE_RFS) { + printf("%s: return NULL\n", __FUNCTION__); return NULL; + } rc = ipc_device_detect(); - if (rc < 0) + if (rc < 0) { + printf("%s: ipc_device_detect failed with error %d\n", __FUNCTION__, rc); goto error; + } device_index = (unsigned int) rc; - if (device_index > ipc_devices_count) + if (device_index > ipc_devices_count) { + printf("%s: idevice_index failed with error %d\n", __FUNCTION__, device_index); goto error; + } client = (struct ipc_client *) calloc(1, sizeof(struct ipc_client)); client->type = type; @@ -187,9 +195,11 @@ static struct ipc_client *ipc_transport_client_create(int type) switch (type) { case IPC_CLIENT_TYPE_RFS: client->ops = ipc_devices[device_index].rfs_ops; + printf("%s: IPC_CLIENT_TYPE_RFS\n", __FUNCTION__); break; case IPC_CLIENT_TYPE_FMT: client->ops = ipc_devices[device_index].fmt_ops; + printf("%s: IPC_CLIENT_TYPE_FMT\n", __FUNCTION__); break; default: goto error; @@ -204,6 +214,7 @@ static struct ipc_client *ipc_transport_client_create(int type) if (ipc_devices[device_index].handlers != NULL) memcpy(client->handlers, ipc_devices[device_index].handlers, sizeof(struct ipc_client_handlers)); + printf("%s: complete\n", __FUNCTION__); goto complete; error: @@ -213,6 +224,7 @@ error: } complete: + printf("%s: return client\n", __FUNCTION__); return client; } |