diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index e8dad579036e..5097c3a5971a 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -991,8 +991,8 @@ chgproccnt(uip, diff, max) int chgsbsize(uip, hiwat, to, max) struct uidinfo *uip; - u_long *hiwat; - u_long to; + u_int *hiwat; + u_int to; rlim_t max; { rlim_t new; diff --git a/sys/sys/param.h b/sys/sys/param.h index 9f9d1f75ee41..e45a6ea3a55b 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -55,7 +55,7 @@ * doc/en_US.ISO8859-1/books/porters-handbook/book.sgml */ #undef __FreeBSD_version -#define __FreeBSD_version 500037 /* Master, propagated to newvers */ +#define __FreeBSD_version 500038 /* Master, propagated to newvers */ #ifndef NULL #define NULL 0 diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h index 8344c912f18c..e9dff022d9bb 100644 --- a/sys/sys/resourcevar.h +++ b/sys/sys/resourcevar.h @@ -111,7 +111,7 @@ void addupc_task(struct kse *ke, uintptr_t pc, u_int ticks); void calcru(struct proc *p, struct timeval *up, struct timeval *sp, struct timeval *ip); int chgproccnt(struct uidinfo *uip, int diff, int max); -int chgsbsize(struct uidinfo *uip, u_long *hiwat, u_long to, +int chgsbsize(struct uidinfo *uip, u_int *hiwat, u_int to, rlim_t max); int fuswintr(void *base); struct plimit diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 357077c3ba34..7ef2dd3521f4 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -98,15 +98,15 @@ struct socket { * Variables for socket buffering. */ struct sockbuf { - u_long sb_cc; /* actual chars in buffer */ - u_long sb_hiwat; /* max actual char count */ - u_long sb_mbcnt; /* chars of mbufs used */ - u_long sb_mbmax; /* max chars of mbufs to use */ - long sb_lowat; /* low water mark */ - struct mbuf *sb_mb; /* the mbuf chain */ struct selinfo sb_sel; /* process selecting read/write */ + struct mbuf *sb_mb; /* the mbuf chain */ + u_int sb_cc; /* actual chars in buffer */ + u_int sb_hiwat; /* max actual char count */ + u_int sb_mbcnt; /* chars of mbufs used */ + u_int sb_mbmax; /* max chars of mbufs to use */ + int sb_lowat; /* low water mark */ + int sb_timeo; /* timeout for read/write */ short sb_flags; /* flags, see below */ - short sb_timeo; /* timeout for read/write */ } so_rcv, so_snd; #define SB_MAX (256*1024) /* default for max chars in sockbuf */ #define SB_LOCK 0x01 /* lock on data queue */ @@ -172,13 +172,13 @@ struct xsocket { pid_t so_pgid; u_long so_oobmark; struct xsockbuf { - u_long sb_cc; - u_long sb_hiwat; - u_long sb_mbcnt; - u_long sb_mbmax; - long sb_lowat; + u_int sb_cc; + u_int sb_hiwat; + u_int sb_mbcnt; + u_int sb_mbmax; + int sb_lowat; + int sb_timeo; short sb_flags; - short sb_timeo; } so_rcv, so_snd; uid_t so_uid; /* XXX */ }; diff --git a/usr.bin/netstat/atalk.c b/usr.bin/netstat/atalk.c index 45e465c571a1..0d9cc171488a 100644 --- a/usr.bin/netstat/atalk.c +++ b/usr.bin/netstat/atalk.c @@ -246,7 +246,7 @@ atalkprotopr(u_long off __unused, char *name, int af __unused) } if (Aflag) printf("%8lx ", (u_long) this); - printf("%-5.5s %6lu %6lu ", name, sockb.so_rcv.sb_cc, + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); printf(Aflag?" %-18.18s":" %-22.22s", atalk_print( (struct sockaddr *)&ddpcb.ddp_lsat,7)); diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index f72fa9893ee2..39b77c1c4e68 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -250,7 +250,7 @@ protopr(u_long proto, /* for sysctl version we pass proto # */ so->so_incqlen, so->so_qlimit); printf("%-14.14s ", buf); } else { - printf("%6ld %6ld ", + printf("%6u %6u ", so->so_rcv.sb_cc, so->so_snd.sb_cc); } diff --git a/usr.bin/netstat/ipx.c b/usr.bin/netstat/ipx.c index e7a015579f82..f3342571ff88 100644 --- a/usr.bin/netstat/ipx.c +++ b/usr.bin/netstat/ipx.c @@ -134,7 +134,7 @@ ipxprotopr(u_long off, char *name, int af __unused) } if (Aflag) printf("%8lx ", ppcb); - printf("%-5.5s %6ld %6ld ", name, sockb.so_rcv.sb_cc, + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); printf(Aflag?" %-18.18s":" %-22.22s", ipx_prpr(&ipxpcb.ipxp_laddr)); printf(Aflag?" %-18.18s":" %-22.22s", ipx_prpr(&ipxpcb.ipxp_faddr)); diff --git a/usr.bin/netstat/iso.c b/usr.bin/netstat/iso.c index 387c6331eacc..682aadc46f34 100644 --- a/usr.bin/netstat/iso.c +++ b/usr.bin/netstat/iso.c @@ -263,7 +263,7 @@ iso_protopr1(u_long kern_addr, int istp) if (Aflag) printf("%8x ", (sockb.so_pcb ? (void *)sockb.so_pcb : (void *)kern_addr)); - printf("%-5.5s %6d %6d ", "tp", sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); + printf("%-5.5s %6u %6u ", "tp", sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); if (istp && tpcb.tp_lsuffixlen) { hexprint(tpcb.tp_lsuffixlen, tpcb.tp_lsuffix, "()"); printf("\t"); @@ -345,7 +345,7 @@ tp_inproto(u_long pcb) return; if (Aflag) printf("%8x ", pcb); - printf("%-5.5s %6d %6d ", "tpip", + printf("%-5.5s %6u %6u ", "tpip", sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); inetprint(&inpcb.inp_laddr, inpcb.inp_lport, "tp"); inetprint(&inpcb.inp_faddr, inpcb.inp_fport, "tp"); @@ -494,7 +494,7 @@ x25_protopr(u_long off, char *name, int af __unused) "Local Address", "Foreign Address", "(state)"); first = 0; } - printf("%-5.5s %6d %6d ", name, sockb.so_rcv.sb_cc, + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); isonetprint(&xpcb.x_laddr.siso_addr, &xpcb.x_lport, sizeof(xpcb.x_lport), 1); diff --git a/usr.bin/netstat/netgraph.c b/usr.bin/netstat/netgraph.c index fb032e817e4e..e5360633a109 100644 --- a/usr.bin/netstat/netgraph.c +++ b/usr.bin/netstat/netgraph.c @@ -159,7 +159,7 @@ netgraphprotopr(u_long off, char *name, int af __unused) /* Show socket */ if (Aflag) printf("%8lx ", (u_long) this); - printf("%-5.5s %6lu %6lu ", + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); /* Get ngsock structure */ diff --git a/usr.bin/netstat/ns.c b/usr.bin/netstat/ns.c index 1b924be30609..4a9944ac0ba9 100644 --- a/usr.bin/netstat/ns.c +++ b/usr.bin/netstat/ns.c @@ -136,7 +136,7 @@ nsprotopr(u_long off, char *name, int af __unused) } if (Aflag) printf("%8x ", ppcb); - printf("%-5.5s %6d %6d ", name, sockb.so_rcv.sb_cc, + printf("%-5.5s %6u %6u ", name, sockb.so_rcv.sb_cc, sockb.so_snd.sb_cc); printf(" %-22.22s", ns_prpr(&nspcb.nsp_laddr)); printf(" %-22.22s", ns_prpr(&nspcb.nsp_faddr)); diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c index abc2a5d1476b..5698edef3135 100644 --- a/usr.bin/netstat/unix.c +++ b/usr.bin/netstat/unix.c @@ -146,7 +146,7 @@ unixdomainpr(struct xunpcb *xunp, struct xsocket *so) "Inode", "Conn", "Refs", "Nextref"); first = 0; } - printf("%8lx %-6.6s %6ld %6ld %8lx %8lx %8lx %8lx", + printf("%8lx %-6.6s %6u %6u %8lx %8lx %8lx %8lx", (long)so->so_pcb, socktype[so->so_type], so->so_rcv.sb_cc, so->so_snd.sb_cc, (long)unp->unp_vnode, (long)unp->unp_conn, diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c index 2c552ca89490..c3b4a3b8a4e7 100644 --- a/usr.bin/systat/netstat.c +++ b/usr.bin/systat/netstat.c @@ -110,8 +110,8 @@ struct netinfo { long ni_lport; /* local port */ struct in_addr ni_faddr; /* foreign address */ long ni_fport; /* foreign port */ - long ni_rcvcc; /* rcv buffer character count */ - long ni_sndcc; /* snd buffer character count */ + u_int ni_rcvcc; /* rcv buffer character count */ + u_int ni_sndcc; /* snd buffer character count */ }; TAILQ_HEAD(netinfohead, netinfo) netcb = TAILQ_HEAD_INITIALIZER(netcb); @@ -450,8 +450,8 @@ shownetstat() p->ni_flags &= ~NIF_FACHG; } mvwaddstr(wnd, p->ni_line, PROTO, p->ni_proto); - mvwprintw(wnd, p->ni_line, RCVCC, "%6d", p->ni_rcvcc); - mvwprintw(wnd, p->ni_line, SNDCC, "%6d", p->ni_sndcc); + mvwprintw(wnd, p->ni_line, RCVCC, "%6u", p->ni_rcvcc); + mvwprintw(wnd, p->ni_line, SNDCC, "%6u", p->ni_sndcc); if (streq(p->ni_proto, "tcp")) { if (p->ni_state < 0 || p->ni_state >= TCP_NSTATES) mvwprintw(wnd, p->ni_line, STATE, "%d",