Distinguish UST return codes from transport return codes
[lttng-ust.git] / tests / ust-multi-test / ust-multi-test.c
index f2deefa40158c0f7d78bbac18fe01e30b7605625..3f00f7edfcfd9ae3b5ffff9333c685c03f1178ef 100644 (file)
@@ -42,6 +42,7 @@
 #include <ust-comm.h>
 #include <../../libringbuffer/backend.h>
 #include <../../libringbuffer/frontend.h>
+#include "../../liblttng-ust/compat.h" /* For ENODATA */
 
 #define NR_SESSIONS    4
 #define NR_CHANNELS    1
@@ -91,7 +92,7 @@ int open_streams(int sock, int channel_handle, struct lttng_ust_object_data *str
                        stream_datas[k].handle = lur.ret_val;
                        printf("received stream handle %u\n",
                                stream_datas[k].handle);
-                       if (lur.ret_code == USTCOMM_OK) {
+                       if (lur.ret_code == LTTNG_UST_OK) {
                                ssize_t len;
 
                                stream_datas[k].memory_map_size = lur.u.stream.memory_map_size;
@@ -229,7 +230,7 @@ int consume_stream(struct lttng_ust_shm_handle *handle, int cpu, char *outfile)
        }
 
        /* copy */
-       outfd = open(outfile, O_WRONLY | O_CREAT | O_LARGEFILE | O_TRUNC,
+       outfd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC,
                        S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
        if (outfd < 0) {
                perror("open output");
@@ -366,7 +367,7 @@ int send_app_msgs(int sock)
                        return ret;
                metadata_data[i].handle = lur.ret_val;
                printf("received metadata handle %u\n", metadata_data[i].handle);
-               if (lur.ret_code == USTCOMM_OK) {
+               if (lur.ret_code == LTTNG_UST_OK) {
                        ssize_t len;
 
                        metadata_data[i].memory_map_size = lur.u.channel.memory_map_size;
@@ -408,7 +409,7 @@ int send_app_msgs(int sock)
                                return ret;
                        channel_data[i][j].handle = lur.ret_val;
                        printf("received channel handle %u\n", channel_data[i][j].handle);
-                       if (lur.ret_code == USTCOMM_OK) {
+                       if (lur.ret_code == LTTNG_UST_OK) {
                                ssize_t len;
 
                                channel_data[i][j].memory_map_size = lur.u.channel.memory_map_size;
This page took 0.026991 seconds and 4 git commands to generate.