X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_channels.c;h=49e16abf43f5184c35ad0274e9641096c3853192;hb=d16dee89723b8d5826d75073314378162f0f0e3f;hp=caada7deb038efd75a6e953ab730dd1826e47566;hpb=afeab1758cb2d7c7d672bddcaed6ab41fec93b92;p=lttng-tools.git diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index caada7deb..49e16abf4 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -220,6 +220,13 @@ static int enable_channel(char *session_name) set_default_attr(&dom); + if (chan.attr.tracefile_size == 0 && chan.attr.tracefile_count) { + ERR("Missing option --tracefile-size. " + "A file count without a size won't do anything."); + ret = CMD_ERROR; + goto error; + } + if ((chan.attr.tracefile_size > 0) && (chan.attr.tracefile_size < chan.attr.subbuf_size)) { WARN("Tracefile size rounded up from (%" PRIu64 ") to subbuffer size (%" PRIu64 ")",