Re: [PATCH iproute2-next] rdma: Rewrite custom JSON and prints logic to use common API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux