FreeBSD Bugzilla – Attachment 218533 Details for
Bug 250133
tools/tools/ifinfo/ifinfo.c Fixing build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix build
ifinfo.patch (text/plain), 2.94 KB, created by
Olivier Cochard
on 2020-10-05 09:10:30 UTC
(
hide
)
Description:
patch to fix build
Filename:
MIME Type:
Creator:
Olivier Cochard
Created:
2020-10-05 09:10:30 UTC
Size:
2.94 KB
patch
obsolete
>Index: tools/tools/ifinfo/ifinfo.c >=================================================================== >--- tools/tools/ifinfo/ifinfo.c (revision 366432) >+++ tools/tools/ifinfo/ifinfo.c (working copy) >@@ -49,7 +49,7 @@ > > static void printit(const struct ifmibdata *, const char *); > static const char *iftype(int); >-static const char *ifphys(int, int); >+static const char *ifphys(int); > static int isit(int, char **, const char *); > static printfcn findlink(int); > >@@ -132,15 +132,15 @@ > if (dolink && (pf = findlink(ifmd.ifmd_data.ifi_type))) { > name[5] = IFDATA_LINKSPECIFIC; > if (sysctl(name, 6, 0, &linkmiblen, 0, 0) < 0) >- err(EX_OSERR, >+ err(EX_OSERR, > "sysctl(net.link.ifdata.%d.linkspec) size", > i); > linkmib = malloc(linkmiblen); > if (!linkmib) >- err(EX_OSERR, "malloc(%lu)", >+ err(EX_OSERR, "malloc(%lu)", > (u_long)linkmiblen); > if (sysctl(name, 6, linkmib, &linkmiblen, 0, 0) < 0) >- err(EX_OSERR, >+ err(EX_OSERR, > "sysctl(net.link.ifdata.%d.linkspec)", > i); > pf(linkmib, linkmiblen); >@@ -165,15 +165,14 @@ > printf("\tsend queue max length: %d\n", ifmd->ifmd_snd_maxlen); > printf("\tsend queue drops: %d\n", ifmd->ifmd_snd_drops); > printf("\ttype: %s\n", iftype(ifmd->ifmd_data.ifi_type)); >- printf("\tphysical: %s\n", ifphys(ifmd->ifmd_data.ifi_type, >- ifmd->ifmd_data.ifi_physical)); >+ printf("\tphysical: %s\n", ifphys(ifmd->ifmd_data.ifi_physical)); > printf("\taddress length: %d\n", ifmd->ifmd_data.ifi_addrlen); > printf("\theader length: %d\n", ifmd->ifmd_data.ifi_hdrlen); > printf("\tlink state: %u\n", ifmd->ifmd_data.ifi_link_state); > printf("\tvhid: %u\n", ifmd->ifmd_data.ifi_vhid); > printf("\tdatalen: %u\n", ifmd->ifmd_data.ifi_datalen); >- printf("\tmtu: %lu\n", ifmd->ifmd_data.ifi_mtu); >- printf("\tmetric: %lu\n", ifmd->ifmd_data.ifi_metric); >+ printf("\tmtu: %u\n", ifmd->ifmd_data.ifi_mtu); >+ printf("\tmetric: %u\n", ifmd->ifmd_data.ifi_metric); > printf("\tline rate: %lu bit/s\n", ifmd->ifmd_data.ifi_baudrate); > printf("\tpackets received: %lu\n", ifmd->ifmd_data.ifi_ipackets); > printf("\tinput errors: %lu\n", ifmd->ifmd_data.ifi_ierrors); >@@ -185,7 +184,7 @@ > printf("\tmulticasts received: %lu\n", ifmd->ifmd_data.ifi_imcasts); > printf("\tmulticasts transmitted: %lu\n", ifmd->ifmd_data.ifi_omcasts); > printf("\tinput queue drops: %lu\n", ifmd->ifmd_data.ifi_iqdrops); >- printf("\tpackets for unknown protocol: %lu\n", >+ printf("\tpackets for unknown protocol: %lu\n", > ifmd->ifmd_data.ifi_noproto); > printf("\tHW offload capabilities: 0x%lx\n", > ifmd->ifmd_data.ifi_hwassist); >@@ -258,7 +257,7 @@ > "IPv6-to-IPv4 TCP relay capturing interface", > "6to4 tunnel interface" > }; >-#define NIFTYPES ((sizeof if_types)/(sizeof if_types[0])) >+#define NIFTYPES (int)((sizeof if_types)/(sizeof if_types[0])) > > static const char * > iftype(int type) >@@ -274,7 +273,7 @@ > } > > static const char * >-ifphys(int type, int phys) >+ifphys(int phys) > { > static char buf[256]; >
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
Actions:
View
|
Diff
Attachments on
bug 250133
: 218533