Clean-up snapshot command error reporting
[lttng-tools.git] / src / bin / lttng / commands / snapshot.c
index d948226ae9770591c32dc3599151b8f6e1b6b81f..11cc2496a2b61e649661df782a8da66fc375b30b 100644 (file)
@@ -350,7 +350,7 @@ static int cmd_del_output(int argc, const char **argv)
 
        errno = 0;
        id = strtol(argv[1], &name, 10);
-       if (id == 0 && errno == 0) {
+       if (id == 0 && (errno == 0 || errno == EINVAL)) {
                ret = del_output(UINT32_MAX, name);
        } else if (errno == 0 && *name == '\0') {
                ret = del_output(id, NULL);
@@ -579,9 +579,6 @@ int cmd_snapshot(int argc, const char **argv)
        command_ret = handle_command(poptGetArgs(pc));
        if (command_ret) {
                switch (-command_ret) {
-               case LTTNG_ERR_EPERM:
-                       ERR("The session needs to be set in no output mode (--no-output)");
-                       break;
                case LTTNG_ERR_SNAPSHOT_NODATA:
                        WARN("%s", lttng_strerror(command_ret));
 
This page took 0.038217 seconds and 5 git commands to generate.