projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup list command printout for loglevel
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
calibrate.c
diff --git
a/src/bin/lttng/commands/calibrate.c
b/src/bin/lttng/commands/calibrate.c
index 2c1adb16c747d46ba2f7d2c27db1051ea94656b3..dc95d246956739371fec8bf0f7853f8409c5a43a 100644
(file)
--- a/
src/bin/lttng/commands/calibrate.c
+++ b/
src/bin/lttng/commands/calibrate.c
@@
-134,7
+134,7
@@
static int calibrate_lttng(void)
dom.type = LTTNG_DOMAIN_UST;
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
dom.type = LTTNG_DOMAIN_UST;
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
- ret = CMD_
UNDEFINED
;
+ ret = CMD_
ERROR
;
goto error;
}
goto error;
}
@@
-156,7
+156,6
@@
static int calibrate_lttng(void)
calibrate.type = LTTNG_CALIBRATE_FUNCTION;
ret = lttng_calibrate(handle, &calibrate);
if (ret < 0) {
calibrate.type = LTTNG_CALIBRATE_FUNCTION;
ret = lttng_calibrate(handle, &calibrate);
if (ret < 0) {
- ret = CMD_ERROR;
goto error;
}
MSG("%s calibration done", opt_kernel ? "Kernel" : "UST");
goto error;
}
MSG("%s calibration done", opt_kernel ? "Kernel" : "UST");
@@
-182,10
+181,12
@@
error:
/*
* Calibrate LTTng tracer.
/*
* Calibrate LTTng tracer.
+ *
+ * Returns a CMD_* error.
*/
int cmd_calibrate(int argc, const char **argv)
{
*/
int cmd_calibrate(int argc, const char **argv)
{
- int opt, ret;
+ int opt, ret
= CMD_SUCCESS
;
static poptContext pc;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
static poptContext pc;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
@@
-198,7
+199,6
@@
int cmd_calibrate(int argc, const char **argv)
switch (opt) {
case OPT_HELP:
usage(stdout);
switch (opt) {
case OPT_HELP:
usage(stdout);
- ret = CMD_SUCCESS;
goto end;
case OPT_TRACEPOINT:
ret = CMD_UNDEFINED;
goto end;
case OPT_TRACEPOINT:
ret = CMD_UNDEFINED;
@@
-223,7
+223,6
@@
int cmd_calibrate(int argc, const char **argv)
break;
case OPT_LIST_OPTIONS:
list_cmd_options(stdout, long_options);
break;
case OPT_LIST_OPTIONS:
list_cmd_options(stdout, long_options);
- ret = CMD_SUCCESS;
goto end;
default:
usage(stderr);
goto end;
default:
usage(stderr);
@@
-235,5
+234,6
@@
int cmd_calibrate(int argc, const char **argv)
ret = calibrate_lttng();
end:
ret = calibrate_lttng();
end:
+ poptFreeContext(pc);
return ret;
}
return ret;
}
This page took
0.024648 seconds
and
4
git commands to generate.