#include <assert.h>
#include <errno.h>
-#include <lttng/ust-comm.h>
+#include <ust-comm.h>
/*
* Human readable error message.
return -EINVAL;
}
if (lur->ret_code != USTCOMM_OK) {
- fprintf(stderr, "remote operation failed with code %d.\n",
- lur->ret_code);
+ /*
+ * Some errors are normal.. we should put this
+ * in a debug level message...
+ * fprintf(stderr, "remote operation failed with code %d.\n",
+ * lur->ret_code);
+ */
return lur->ret_code;
}
return 0;
goto end;
}
if (ret != sizeof(data_fd)) {
- fprintf(stderr, "Received %d bytes, expected %ld", ret, sizeof(data_fd));
+ fprintf(stderr, "Received %d bytes, expected %zd", ret, sizeof(data_fd));
goto end;
}
cmsg = CMSG_FIRSTHDR(&msg);
for (i = 0; i < sizeof(int); i++)
tmp.vc[i] = CMSG_DATA(cmsg)[i];
ret = tmp.vi;
- fprintf(stderr, "received fd %d\n", ret);
+ /*
+ * Useful for fd leak debug.
+ * fprintf(stderr, "received fd %d\n", ret);
+ */
end:
return ret;
}