Fix: metadata regenerate, error if too many args
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 18 Mar 2016 16:43:46 +0000 (12:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Mar 2016 20:35:04 +0000 (16:35 -0400)
Fixes: #1003

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/metadata.c

index a5776ac141ad96b859e7b950c23b71e0ed195d8b..4f248d44c0e3a948da256e09977b4772ca0b4d0d 100644 (file)
@@ -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;
 }
 
This page took 0.032495 seconds and 4 git commands to generate.