Re: [PATCH 03/11] blktrace: add option to request a specific trace protocol version
Johannes Thumshirn <[email protected]> Fri, 17 Jul 2026 08:04:37 +0200
| Newsgroups | org.kernel.vger.linux-btrace,org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
On 16.07.26 13:54, Damien Le Moal wrote:
>> +static int v1;
> bool ?
>
> Or maybe less confusing/more scalable:
>
> static int trace_ver = 2;
>
> to match the default and the --trace-version option changes that to the
> specified value? That simplifies the code below too.
>> static void clear_events(struct pollfd *pfd)
>> {
>> @@ -2244,6 +2257,19 @@ static int handle_args(int argc, char *argv[])
>> case 's':
>> net_use_sendfile = 0;
>> break;
>> + case OPT_TRACE_VERSION: {
> case OPT_TRACE_VERSION:
> trace_ver = atoi(optarg);
> if (trace_ver != 1 && trace_ver != 2) {
> show_usage(argv[0]);
> exit(1);
> }
> break;
Sure