lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77134dfe-8e5f-5bcc-25b4-dde91cf3492c@gmail.com>
Date:   Wed, 2 Dec 2020 09:42:22 -0700
From:   David Ahern <dsahern@...il.com>
To:     Luca Boccassi <bluca@...ian.org>, netdev@...r.kernel.org
Cc:     stephen@...workplumber.org
Subject: Re: [PATCH iproute2 v2] tc/mqprio: json-ify output

On 11/28/20 11:30 AM, Luca Boccassi wrote:
> @@ -287,9 +293,9 @@ static int mqprio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
>  					return -1;
>  				*(min++) = rta_getattr_u64(r);
>  			}
> -			fprintf(f, "	min_rate:");
> +			open_json_array(PRINT_ANY, is_json_context() ? "min_rate" : "	min_rate:");
>  			for (i = 0; i < qopt->num_tc; i++)
> -				fprintf(f, "%s ", sprint_rate(min_rate64[i], b1));
> +				print_string(PRINT_ANY, NULL, "%s ", sprint_rate(min_rate64[i], b1));

close_json_array?

>  		}
>  
>  		if (tb[TCA_MQPRIO_MAX_RATE64]) {
> @@ -303,9 +309,9 @@ static int mqprio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
>  					return -1;
>  				*(max++) = rta_getattr_u64(r);
>  			}
> -			fprintf(f, "	max_rate:");
> +			open_json_array(PRINT_ANY, is_json_context() ? "max_rate" : "	max_rate:");
>  			for (i = 0; i < qopt->num_tc; i++)
> -				fprintf(f, "%s ", sprint_rate(max_rate64[i], b1));
> +				print_string(PRINT_ANY, NULL, "%s ", sprint_rate(max_rate64[i], b1));
>  		}

close_json_array?

>  	}
>  	return 0;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ