X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust-comm%2Flttng-ust-comm.c;h=db9910ded9c3fcf2a660fa77c5a35851df07fdc8;hb=refs%2Fheads%2Fstable-2.1;hp=8765ea6eee0a109a1231e51b8147b5047749bd72;hpb=7bc53e94a229963972aa78880b361b1510fdd268;p=lttng-ust.git diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index 8765ea6e..db9910de 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -44,6 +44,10 @@ static const char *ustcomm_readable_code[] = { [ USTCOMM_CODE_OFFSET(LTTNG_UST_OK) ] = "Success", [ USTCOMM_CODE_OFFSET(LTTNG_UST_ERR) ] = "Unknown error", [ USTCOMM_CODE_OFFSET(LTTNG_UST_ERR_NOENT) ] = "No entry", + [ USTCOMM_CODE_OFFSET(LTTNG_UST_ERR_EXIST) ] = "Object already exists", + [ USTCOMM_CODE_OFFSET(LTTNG_UST_ERR_INVAL) ] = "Invalid argument", + [ USTCOMM_CODE_OFFSET(LTTNG_UST_ERR_PERM) ] = "Permission denied", + [ USTCOMM_CODE_OFFSET(LTTNG_UST_ERR_NOSYS) ] = "Not implemented", }; /* @@ -431,7 +435,10 @@ int ustcomm_send_app_cmd(int sock, ret = ustcomm_send_app_msg(sock, lum); if (ret) return ret; - return ustcomm_recv_app_reply(sock, lur, lum->handle, lum->cmd); + ret = ustcomm_recv_app_reply(sock, lur, lum->handle, lum->cmd); + if (ret > 0) + return -EIO; + return ret; } /*