Fix: report to client when snapshot will be empty
[lttng-tools.git] / src / bin / lttng / commands / snapshot.c
index a357730d008444d1d1b1db4ffc36dc40637bd19e..db5a62551b5e3ba7b7812cee630c3fa6db6b4353 100644 (file)
@@ -480,10 +480,17 @@ int cmd_snapshot(int argc, const char **argv)
 
        ret = handle_command(poptGetArgs(pc));
        if (ret < 0) {
-               if (ret == -LTTNG_ERR_EPERM) {
+               switch (-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(ret));
+                       break;
+               default:
+                       ERR("%s", lttng_strerror(ret));
+                       break;
                }
-               ERR("%s", lttng_strerror(ret));
                goto end;
        }
 
This page took 0.023932 seconds and 4 git commands to generate.