Fix: clear error message
[lttng-tools.git] / src / bin / lttng / commands / create.c
index 7a81641774a8161e21e7166cd9e4a28b2a3ff54b..e787ed5552d3f6951a657b3d00903969bf416d49 100644 (file)
@@ -228,6 +228,7 @@ error_create:
 static int validate_command_options(void)
 {
        int ret = CMD_SUCCESS;
+
        if (opt_snapshot && opt_live_timer) {
                ERR("Snapshot and live modes are mutually exclusive.");
                ret = CMD_ERROR;
@@ -235,7 +236,7 @@ static int validate_command_options(void)
        }
 
        if ((!opt_ctrl_url && opt_data_url) || (opt_ctrl_url && !opt_data_url)) {
-               ERR("You need both control and data URL.");
+               ERR("Control and data URLs must both be set.");
                ret = CMD_ERROR;
                goto error;
        }
@@ -538,10 +539,9 @@ static int create_session(void)
                }
        } else {
                /* Generate a name */
-               /* TODO: use asprint */
                ret = asprintf(&base_session_name, DEFAULT_SESSION_NAME "-%s", datetime);
                if (ret < 0) {
-                       PERROR("Asprintf generated session name");
+                       PERROR("Asprintf session name");
                        goto error;
                }
                session_name_date = strdup(base_session_name);
This page took 0.028839 seconds and 5 git commands to generate.