Re: [PATCH 03/11] blktrace: add option to request a specific trace protocol version

Johannes Thumshirn <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.kernel.vger.linux-btrace
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.