Page MenuHomeFreeBSD

D17838.diff
No OneTemporary

D17838.diff

Index: head/usr.bin/systat/fetch.c
===================================================================
--- head/usr.bin/systat/fetch.c
+++ head/usr.bin/systat/fetch.c
@@ -68,9 +68,8 @@
strerror(errno));
}
if (nlen != len) {
- error("sysctl(%s...) expected %lu, got %lu", name,
- (unsigned long)len, (unsigned long)nlen);
- }
+ error("sysctl(%s...) expected %zu, got %zu", name, len, nlen);
+ }
}
/*
Index: head/usr.bin/systat/icmp6.c
===================================================================
--- head/usr.bin/systat/icmp6.c
+++ head/usr.bin/systat/icmp6.c
@@ -50,6 +50,7 @@
#include <netinet/in.h>
#include <netinet/icmp6.h>
+#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <paths.h>
@@ -173,7 +174,7 @@
showicmp6(void)
{
struct icmp6stat stats;
- u_long totalin, totalout;
+ uint64_t totalin, totalout;
int i;
memset(&stats, 0, sizeof stats);
@@ -184,11 +185,11 @@
}
totalin += stats.icp6s_badcode + stats.icp6s_badlen +
stats.icp6s_checksum + stats.icp6s_tooshort;
- mvwprintw(wnd, 1, 0, "%9lu", totalin);
- mvwprintw(wnd, 1, 35, "%9lu", totalout);
+ mvwprintw(wnd, 1, 0, "%9"PRIu64, totalin);
+ mvwprintw(wnd, 1, 35, "%9"PRIu64, totalout);
#define DO(stat, row, col) \
- mvwprintw(wnd, row, col, "%9lu", stats.stat)
+ mvwprintw(wnd, row, col, "%9"PRIu64, stats.stat)
DO(icp6s_badcode, 2, 0);
DO(icp6s_badlen, 3, 0);
Index: head/usr.bin/systat/ip.c
===================================================================
--- head/usr.bin/systat/ip.c
+++ head/usr.bin/systat/ip.c
@@ -53,6 +53,7 @@
#include <netinet/udp.h>
#include <netinet/udp_var.h>
+#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <paths.h>
@@ -203,16 +204,16 @@
showip(void)
{
struct stat stats;
- u_long totalout;
+ uint64_t totalout;
domode(&stats);
totalout = stats.i.ips_forward + stats.i.ips_localout;
#define DO(stat, row, col) \
- mvwprintw(wnd, row, col, "%9lu", stats.stat)
+ mvwprintw(wnd, row, col, "%9"PRIu64, stats.stat)
DO(i.ips_total, 1, 0);
- mvwprintw(wnd, 1, 35, "%9lu", totalout);
+ mvwprintw(wnd, 1, 35, "%9"PRIu64, totalout);
DO(i.ips_badsum, 2, 0);
DO(i.ips_localout, 2, 35);
DO(i.ips_tooshort, 3, 0);
Index: head/usr.bin/systat/ip6.c
===================================================================
--- head/usr.bin/systat/ip6.c
+++ head/usr.bin/systat/ip6.c
@@ -52,6 +52,7 @@
#include <netinet/ip.h>
#include <netinet6/ip6_var.h>
+#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <paths.h>
@@ -190,16 +191,16 @@
showip6(void)
{
struct ip6stat stats;
- u_long totalout;
+ uint64_t totalout;
domode(&stats);
totalout = stats.ip6s_forward + stats.ip6s_localout;
#define DO(stat, row, col) \
- mvwprintw(wnd, row, col, "%9lu", stats.stat)
+ mvwprintw(wnd, row, col, "%9"PRIu64, stats.stat)
DO(ip6s_total, 1, 0);
- mvwprintw(wnd, 1, 35, "%9lu", totalout);
+ mvwprintw(wnd, 1, 35, "%9"PRIu64, totalout);
DO(ip6s_tooshort, 2, 0);
DO(ip6s_localout, 2, 35);
DO(ip6s_toosmall, 3, 0);
Index: head/usr.bin/systat/tcp.c
===================================================================
--- head/usr.bin/systat/tcp.c
+++ head/usr.bin/systat/tcp.c
@@ -56,6 +56,7 @@
#include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h>
+#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <paths.h>
@@ -237,7 +238,7 @@
domode(&stats);
#define DO(stat, row, col) \
- mvwprintw(wnd, row, col, "%12lu", stats.stat)
+ mvwprintw(wnd, row, col, "%12"PRIu64, stats.stat)
#define L(row, stat) DO(stat, row, 0)
#define R(row, stat) DO(stat, row, 38)
L(1, tcps_connattempt); R(1, tcps_sndtotal);
Index: head/usr.bin/systat/zarc.c
===================================================================
--- head/usr.bin/systat/zarc.c
+++ head/usr.bin/systat/zarc.c
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <sys/sysctl.h>
+#include <inttypes.h>
#include <string.h>
#include "systat.h"
@@ -139,11 +140,11 @@
#define DO(stat, row, col, fmt) \
mvwprintw(wnd, row, col, fmt, stat)
-#define R(row, stat) DO(rate.hits.stat, row, 31+1, "%3lu")
-#define H(row, stat) DO(delta.hits.stat, row, 31+1+5, "%7lu"); \
- DO(curstat.hits.stat, row, 31+1+5+8+8, "%12lu")
-#define M(row, stat) DO(delta.misses.stat, row, 31+1+5+8, "%7lu"); \
- DO(curstat.misses.stat, row, 31+1+5+8+8+13, "%12lu")
+#define R(row, stat) DO(rate.hits.stat, row, 31+1, "%3"PRIu64)
+#define H(row, stat) DO(delta.hits.stat, row, 31+1+5, "%7"PRIu64); \
+ DO(curstat.hits.stat, row, 31+1+5+8+8, "%12"PRIu64)
+#define M(row, stat) DO(delta.misses.stat, row, 31+1+5+8, "%7"PRIu64); \
+ DO(curstat.misses.stat, row, 31+1+5+8+8+13, "%12"PRIu64)
#define E(row, stat) R(row, stat); H(row, stat); M(row, stat);
E(1, arcstats);
E(2, arcstats_demand_data);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 12:46 AM (21 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14687720
Default Alt Text
D17838.diff (4 KB)

Event Timeline