#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <time.h>
+#include <common/compat/time.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>
static int opt_snapshot;
static unsigned int opt_live_timer;
+#ifdef LTTNG_EMBED_HELP
+static const char help_msg[] =
+#include <lttng-create.1.h>
+;
+#endif
+
enum {
OPT_HELP = 1,
OPT_LIST_OPTIONS,
{
int ret;
struct lttng_handle *handle;
- struct lttng_domain dom;
assert(session_name);
/*
- * Set handle with the session name and the domain set to 0. This means to
- * the session daemon that the next action applies on the tracing session
- * rather then the domain specific session.
+ * Set handle with the session_name, but no domain. This implies that
+ * the actions taken with this handle apply on the tracing session
+ * rather then the domain-specific session.
*/
- memset(&dom, 0, sizeof(dom));
-
- handle = lttng_create_handle(session_name, &dom);
+ handle = lttng_create_handle(session_name, NULL);
if (handle == NULL) {
ret = CMD_FATAL;
goto error;
/* Use default live URL if NO url is/are found. */
if ((opt_live_timer && !opt_url) && (opt_live_timer && !opt_data_url)) {
+ /* Override the url */
+ free(url);
+ url = NULL;
+
ret = asprintf(&alloc_url, "net://127.0.0.1");
if (ret < 0) {
PERROR("asprintf default live URL");
MSG("Default snapshot output set to: %s", print_str_url);
}
MSG("Snapshot mode set. Every channel enabled for that session will "
- "be set in overwrite mode and mmap output.");
+ "be set to mmap output, and default to overwrite mode.");
}
if (opt_shm_path) {
MSG("Session %s set to shm_path: %s.", session_name,