Thread (33 messages) 33 messages, 4 authors, 2017-09-20

Re: [PATCH iproute2 json v2 05/27] ip: ipaddress.c: add support for json output

flat view

From: Sabrina Dubroca <sd@queasysnail.net>
Date: 2017-09-20 13:34:03

Hi Julien,

2017-08-17, 10:35:52 -0700, Julien Fortin wrote:
From: Julien Fortin <redacted>

This patch converts all output (mostly fprintfs) to the new ip_print api
which handle both regular and json output.
Initialize a json_writer and open an array object if -json was specified.
Note that the JSON attribute naming follows the NETLINK_ATTRIBUTE naming.
[snip]

This patch (commit d0e720111aad) changed the output of "ip addr":

Before:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever

After:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128scope host 
       valid_lft forever preferred_lft forever

The space following the mask is missing.

Could you have a look?
Thanks.

-- 
Sabrina
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help