From: Julien Desfossez Date: Fri, 18 Mar 2016 16:43:46 +0000 (-0400) Subject: Fix: metadata regenerate, error if too many args X-Git-Tag: v2.8.0-rc1~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fb288d1e46a63d47d3be2be8322e1b8c48ba36a1;p=lttng-tools.git Fix: metadata regenerate, error if too many args Fixes: #1003 Signed-off-by: Julien Desfossez Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/metadata.c b/src/bin/lttng/commands/metadata.c index a5776ac14..4f248d44c 100644 --- a/src/bin/lttng/commands/metadata.c +++ b/src/bin/lttng/commands/metadata.c @@ -75,10 +75,16 @@ static int metadata_regenerate(int argc, const char **argv) { int ret; + if (argc > 1) { + ret = -LTTNG_ERR_INVALID; + goto end; + } ret = lttng_metadata_regenerate(session_name); if (ret == 0) { MSG("Metadata successfully regenerated for session %s", session_name); } + +end: return ret; }