FreeBSD Bugzilla – Attachment 185787 Details for
Bug 221676
libxo fails to format certain fixed values correctly (eg: arp: invalid json output from libxo when bridge is present)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds the quote directive to xo fields to make sure that strings are quoted in json output
arp.patch (text/plain), 2.08 KB, created by
Duncan Paterson
on 2017-08-26 16:55:33 UTC
(
hide
)
Description:
Adds the quote directive to xo fields to make sure that strings are quoted in json output
Filename:
MIME Type:
Creator:
Duncan Paterson
Created:
2017-08-26 16:55:33 UTC
Size:
2.08 KB
patch
obsolete
>diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c >index fb909142e..93d18c08b 100644 >--- a/usr.sbin/arp/arp.c >+++ b/usr.sbin/arp/arp.c >@@ -612,7 +612,7 @@ print_entry(struct sockaddr_dl *sdl, > if (h_errno == TRY_AGAIN) > nflag = 1; > } >- xo_emit("{:hostname/%s} ({:ip-address/%s}) at ", host, >+ xo_emit("{q:hostname/%s} ({q:ip-address/%s}) at ", host, > inet_ntoa(addr->sin_addr)); > if (sdl->sdl_alen) { > if ((sdl->sdl_type == IFT_ETHER || >@@ -624,7 +624,7 @@ print_entry(struct sockaddr_dl *sdl, > else { > int n = sdl->sdl_nlen > 0 ? sdl->sdl_nlen + 1 : 0; > >- xo_emit("{:mac-address/%s}", link_ntoa(sdl) + n); >+ xo_emit("{q:mac-address/%s}", link_ntoa(sdl) + n); > } > } else > xo_emit("{d:/(incomplete)}{en:incomplete/true}"); >@@ -632,7 +632,7 @@ print_entry(struct sockaddr_dl *sdl, > for (p = ifnameindex; p && ifnameindex->if_index && > ifnameindex->if_name; p++) { > if (p->if_index == sdl->sdl_index) { >- xo_emit(" on {:interface/%s}", p->if_name); >+ xo_emit(" on {q:interface/%s}", p->if_name); > break; > } > } >@@ -655,10 +655,10 @@ print_entry(struct sockaddr_dl *sdl, > > switch(sdl->sdl_type) { > case IFT_ETHER: >- xo_emit(" [{:type/ethernet}]"); >+ xo_emit(" [{q:type/ethernet}]"); > break; > case IFT_ISO88025: >- xo_emit(" [{:type/token-ring}]"); >+ xo_emit(" [{q:type/token-ring}]"); > trld = SDL_ISO88025(sdl); > if (trld->trld_rcf != 0) { > xo_emit(" rt=%x", ntohs(trld->trld_rcf)); >@@ -669,22 +669,22 @@ print_entry(struct sockaddr_dl *sdl, > } > break; > case IFT_FDDI: >- xo_emit(" [{:type/fddi}]"); >+ xo_emit(" [{q:type/fddi}]"); > break; > case IFT_ATM: >- xo_emit(" [{:type/atm}]"); >+ xo_emit(" [{q:type/atm}]"); > break; > case IFT_L2VLAN: >- xo_emit(" [{:type/vlan}]"); >+ xo_emit(" [{q:type/vlan}]"); > break; > case IFT_IEEE1394: >- xo_emit(" [{:type/firewire}]"); >+ xo_emit(" [{q:type/firewire}]"); > break; > case IFT_BRIDGE: >- xo_emit(" [{:type/bridge}]"); >+ xo_emit(" [{q:type/bridge}]"); > break; > case IFT_INFINIBAND: >- xo_emit(" [{:type/infiniband}]"); >+ xo_emit(" [{q:type/infiniband}]"); > break; > default: > break;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
koobs
:
maintainer-approval-
Actions:
View
|
Diff
Attachments on
bug 221676
: 185787