- if (!strncmp(name, DEFAULT_SESSION_NAME, strlen(DEFAULT_SESSION_NAME))) {
- ret = snprintf(lsm.session.name, sizeof(lsm.session.name), "%s-%s",
- name, datetime);
- if (ret < 0) {
- PERROR("snprintf session name datetime");
- return -LTTNG_ERR_FATAL;
- }
- } else {
- copy_string(lsm.session.name, name, sizeof(lsm.session.name));
- }