Message ID | 20220405113650.188bf8bf@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | 49b0447e197840b1352d4284c7646c6750099985 |
Headers | show |
Series | trace-cmd library: When the compression algorithm is none do no compression | expand |
diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c index 425c6077d88e..90bfa0f32984 100644 --- a/lib/trace-cmd/trace-input.c +++ b/lib/trace-cmd/trace-input.c @@ -4278,7 +4278,10 @@ struct tracecmd_input *tracecmd_alloc_fd(int fd, int flags) if (!zver) goto failed_read; - if (strcmp(zname, "none")) { + if (strcmp(zname, "none") == 0) { + handle->read_zpage = false; + handle->flags &= ~TRACECMD_FL_COMPRESSION; + } else { handle->compress = tracecmd_compress_alloc(zname, zver, handle->fd, handle->pevent, NULL);