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: <087c2fe7fd6d09fbafc8907940a0dfa829001958.camel@debian.org>
Date:   Wed, 02 Dec 2020 17:09:11 +0000
From:   Luca Boccassi <bluca@...ian.org>
To:     David Ahern <dsahern@...il.com>, netdev@...r.kernel.org
Cc:     stephen@...workplumber.org
Subject: Re: [PATCH iproute2 v2] tc/mqprio: json-ify output

On Wed, 2020-12-02 at 09:42 -0700, David Ahern wrote:
> 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;
> > 

Whops, fixed in v3, thanks.

-- 
Kind regards,
Luca Boccassi

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ