On 11/18/19 1:35 AM, Leon Romanovsky wrote: > From: Ido Kalir <idok@xxxxxxxxxxxx> > > Instead of doing open-coded solution to generate JSON and prints, let's > reuse existing infrastructure and APIs to do the same as ip/*. > > Before this change: > if (rd->json_output) > jsonw_uint_field(rd->jw, "sm_lid", sm_lid); > else > pr_out("sm_lid %u ", sm_lid); > > After this change: > print_uint(PRINT_ANY, "sm_lid", "sm_lid %u ", sm_lid); > > All the print functions are converted to support color but for now the > type of color is COLOR_NONE. This is done as a preparation to addition > of color enable option. Such change will require rewrite of command line > arguments parser which is out-of-scope for this patch. > > Signed-off-by: Ido Kalir <idok@xxxxxxxxxxxx> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> Applied to iproute2-next. Thank you for doing this! Now we just devlink to be converted.