Fix: liblttng-ust-fork Makefile flags mismatch
[lttng-ust.git] / liblttng-ust-comm / lttng-ust-comm.c
index 8765ea6eee0a109a1231e51b8147b5047749bd72..db9910ded9c3fcf2a660fa77c5a35851df07fdc8 100644 (file)
@@ -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;
 }
 
 /*
This page took 0.023548 seconds and 4 git commands to generate.