aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-01-17 14:41:55 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-01-18 19:53:12 +0100
commit767c37c124f83317635cce69bbb176a9795549c0 (patch)
tree9e814dbbcbdd93ae2409ff44040579926252d120
parent285f0d8d4c7e481052101899b253ad397fb3ef7a (diff)
downloadhardware_replicant_libsamsung-ipc-767c37c124f83317635cce69bbb176a9795549c0.tar.gz
hardware_replicant_libsamsung-ipc-767c37c124f83317635cce69bbb176a9795549c0.tar.bz2
hardware_replicant_libsamsung-ipc-767c37c124f83317635cce69bbb176a9795549c0.zip
ipc-test: improve error reporting
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
-rw-r--r--tools/ipc-test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/ipc-test.c b/tools/ipc-test.c
index cc8548f..59f9074 100644
--- a/tools/ipc-test.c
+++ b/tools/ipc-test.c
@@ -64,44 +64,44 @@ int main(__attribute__((unused)) int args,
rc = ipc_client_log_callback_register(client, log_callback, NULL);
if (rc < 0) {
- printf("Registering log callback failed\n");
+ printf("Registering log callback failed: error %d\n", rc);
goto error;
}
rc = ipc_client_data_create(client);
if (rc < 0) {
- printf("Creating data failed\n");
+ printf("Creating data failed: error %d\n", rc);
goto error;
}
rc = ipc_client_boot(client);
if (rc < 0) {
- printf("Booting failed\n");
+ printf("Booting failed: error %d\n", rc);
goto error;
}
rc = ipc_client_power_on(client);
if (rc < 0) {
- printf("Powering on failed\n");
+ printf("Powering on failed: error %d\n", rc);
goto error;
}
rc = ipc_client_open(client);
if (rc < 0) {
- printf("Opening failed\n");
+ printf("ipc_client_open failed: error %d\n", rc);
goto error;
}
for (i = 0; i < 5; i++) {
rc = ipc_client_poll(client, NULL, NULL);
if (rc < 0) {
- printf("Polling failed\n");
+ printf("Polling failed: error %d\n", rc);
break;
}
rc = ipc_client_recv(client, &message);
if (rc < 0) {
- printf("Receiving failed\n");
+ printf("Receiving failed: error %d\n", rc);
break;
}
@@ -113,13 +113,13 @@ int main(__attribute__((unused)) int args,
rc = ipc_client_close(client);
if (rc < 0) {
- printf("Closing failed\n");
+ printf("Closing failed: error %d\n", rc);
goto error;
}
rc = ipc_client_power_off(client);
if (rc < 0) {
- printf("Powering on failed\n");
+ printf("Powering on failed: error %d\n", rc);
goto error;
}