while (1) {
if (update_poll_flag == 1) {
+ /*
+ * Reset number of fd in the poll set. Always 2 since there is the thread
+ * quit pipe and the kernel pipe.
+ */
+ events.nb_fd = 2;
+
ret = update_kernel_poll(&events);
if (ret < 0) {
goto error;
ret = mkdir_recursive(path, S_IRWXU | S_IRWXG, geteuid(), getegid());
if (ret < 0) {
+ PERROR("Cannot create debugfs path");
goto error;
}
ret = mount(type, path, type, 0, NULL);
if (ret < 0) {
- perror("mount debugfs");
+ PERROR("Cannot mount debugfs");
goto error;
}
}
ret = mount_debugfs(debugfs_path);
if (ret < 0) {
+ perror("Cannot mount debugfs");
goto error;
}
}
struct lttng_domain *domain)
{
int ret;
- struct ltt_ust_session *lus;
+ struct ltt_ust_session *lus = NULL;
struct ust_app *app;
switch (domain->type) {
}
break;
default:
+ ret = LTTCOMM_UNKNOWN_DOMAIN;
goto error;
}
perror("write kernel poll pipe");
}
- ret = session_destroy(name);
+ ret = session_destroy(session);
return ret;
}