X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fsnapshot.c;h=00aa5b790448e57d3a26d1b8f838bd51d6acf564;hb=eded6438f3b15eccc391525f653e03293a890d32;hp=c8a7ba0588f4d47fcc5ed5de98101caee937ace5;hpb=779f455d7b2074388346c75ec842112819fec8b8;p=lttng-tools.git diff --git a/src/bin/lttng/commands/snapshot.c b/src/bin/lttng/commands/snapshot.c index c8a7ba058..00aa5b790 100644 --- a/src/bin/lttng/commands/snapshot.c +++ b/src/bin/lttng/commands/snapshot.c @@ -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); @@ -636,7 +636,7 @@ end: free(session_name); } - /* Overwrite ret if an error occured during handle_command */ + /* Overwrite ret if an error occurred during handle_command */ ret = command_ret ? command_ret : ret; poptFreeContext(pc); return ret;