Re: [PATCH v2 17/87] trace-cmd library: New API to configure compression on an output handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Jul 2021 08:08:49 +0300
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:

> +	}
> +	if (handler->compress && handler->file_version < 7) {
> +		handler->file_version = 7;
> +		if (handler->msg_handle)
> +			tracecmd_msg_handle_cache(handler->msg_handle);
> +	}

I was thinking that in all places that we check '7' for support of
compression, we should instead make that a macro.


/* The version that compression was added */
#define FILE_VERSION_COMPRESSION	7

[..]

	if (handler->compress && handler->file_version < FILE_VERSION_COMPRESSION) {
		handler->file_version = FILE_VERSION_COMPRESSION;
		if (handler->msg_handle)
			tracecmd_msg_handle_cache(handler->msg_handle);
	}

Then we don't need to memorize what version compression was added in.

?

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux