strncpy(ev->attr.probe.symbol_name, name, LTTNG_SYMBOL_NAME_LEN);
ev->attr.probe.symbol_name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
DBG("probe symbol %s", ev->attr.probe.symbol_name);
- if (strlen(s_hex) == 0) {
+ if (*s_hex == '\0') {
ERR("Invalid probe offset %s", s_hex);
ret = -1;
goto end;
/* Check for address */
ret = sscanf(opt, "%s", s_hex);
if (ret > 0) {
- if (strlen(s_hex) == 0) {
+ if (*s_hex == '\0') {
ERR("Invalid probe address %s", s_hex);
ret = -1;
goto end;
int i = 0;
char str[LTTNG_SYMBOL_NAME_LEN];
- while (inputstr[i] != '\0' && i < LTTNG_SYMBOL_NAME_LEN) {
+ while (i < LTTNG_SYMBOL_NAME_LEN && inputstr[i] != '\0') {
str[i] = toupper(inputstr[i]);
i++;
}
/* Create lttng domain */
if (opt_kernel) {
dom.type = LTTNG_DOMAIN_KERNEL;
+ dom.buf_type = LTTNG_BUFFER_GLOBAL;
} else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
+ /* Default. */
+ dom.buf_type = LTTNG_BUFFER_PER_PID;
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
ret = CMD_ERROR;
if (opt_loglevel) {
MSG("Kernel loglevels are not supported.");
- ret = CMD_UNDEFINED;
+ ret = CMD_UNSUPPORTED;
goto error;
}
case LTTNG_EVENT_SYSCALL:
default:
ERR("Event type not available for user-space tracing");
- ret = CMD_UNDEFINED;
+ ret = CMD_UNSUPPORTED;
goto error;
}