From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 01:07:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76B8A106564A; Sun, 12 Feb 2012 01:07:15 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EF428FC0C; Sun, 12 Feb 2012 01:07:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C17FE0058335; Sun, 12 Feb 2012 01:07:15 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C17FJq058329; Sun, 12 Feb 2012 01:07:15 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201202120107.q1C17FJq058329@svn.freebsd.org> From: Craig Rodrigues Date: Sun, 12 Feb 2012 01:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231541 - stable/7/libexec/tftpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 01:07:15 -0000 Author: rodrigc Date: Sun Feb 12 01:07:15 2012 New Revision: 231541 URL: http://svn.freebsd.org/changeset/base/231541 Log: MFC 183243-231540. This records mergeinfo for already merged changesets, but brings in the following changes: MFC 222326 - Fix tftp_log() usage MFC 223137 - Man page updates MFC 223487 - Bring back syncnet() implementation from older tftp implementation. MFC 229780 - Spelling fixes for libexec/ MFC 229904 - Fix warning when compiling with gcc46: error: variable 'bp' set but not used Modified: stable/7/libexec/tftpd/tftp-file.c stable/7/libexec/tftpd/tftp-io.c stable/7/libexec/tftpd/tftp-utils.c stable/7/libexec/tftpd/tftp-utils.h stable/7/libexec/tftpd/tftpd.8 Directory Properties: stable/7/libexec/tftpd/ (props changed) Modified: stable/7/libexec/tftpd/tftp-file.c ============================================================================== --- stable/7/libexec/tftpd/tftp-file.c Sat Feb 11 23:58:07 2012 (r231540) +++ stable/7/libexec/tftpd/tftp-file.c Sun Feb 12 01:07:15 2012 (r231541) @@ -27,6 +27,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include @@ -249,9 +251,34 @@ read_close(void) } +/* When an error has occurred, it is possible that the two sides + * are out of synch. Ie: that what I think is the other side's + * response to packet N is really their response to packet N-1. + * + * So, to try to prevent that, we flush all the input queued up + * for us on the network connection on our host. + * + * We return the number of packets we flushed (mostly for reporting + * when trace is active). + */ + int -synchnet(int peer __unused) +synchnet(int peer) /* socket to flush */ { - - return 0; + int i, j = 0; + char rbuf[MAXPKTSIZE]; + struct sockaddr_storage from; + socklen_t fromlen; + + while (1) { + (void) ioctl(peer, FIONREAD, &i); + if (i) { + j++; + fromlen = sizeof from; + (void) recvfrom(peer, rbuf, sizeof (rbuf), 0, + (struct sockaddr *)&from, &fromlen); + } else { + return(j); + } + } } Modified: stable/7/libexec/tftpd/tftp-io.c ============================================================================== --- stable/7/libexec/tftpd/tftp-io.c Sat Feb 11 23:58:07 2012 (r231540) +++ stable/7/libexec/tftpd/tftp-io.c Sun Feb 12 01:07:15 2012 (r231541) @@ -72,13 +72,13 @@ struct errmsg { #define DROPPACKET(s) \ if (packetdroppercentage != 0 && \ random()%100 < packetdroppercentage) { \ - tftp_log(LOG_DEBUG, "Artifical packet drop in %s", s); \ + tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \ return; \ } #define DROPPACKETn(s,n) \ if (packetdroppercentage != 0 && \ random()%100 < packetdroppercentage) { \ - tftp_log(LOG_DEBUG, "Artifical packet drop in %s", s); \ + tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \ return (n); \ } @@ -262,7 +262,7 @@ send_rrq(int peer, char *filename, char n = sendto(peer, buf, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len); if (n != size) { - tftp_log(LOG_ERR, "send_rrq: %s", n, strerror(errno)); + tftp_log(LOG_ERR, "send_rrq: %d %s", n, strerror(errno)); return (1); } return (0); @@ -323,7 +323,6 @@ send_ack(int fp, uint16_t block) { struct tftphdr *tp; int size; - char *bp; char buf[MAXPKTSIZE]; if (debug&DEBUG_PACKETS) @@ -332,7 +331,6 @@ send_ack(int fp, uint16_t block) DROPPACKETn("send_ack", 0); tp = (struct tftphdr *)buf; - bp = buf + 2; size = sizeof(buf) - 2; tp->th_opcode = htons((u_short)ACK); tp->th_block = htons((u_short)block); Modified: stable/7/libexec/tftpd/tftp-utils.c ============================================================================== --- stable/7/libexec/tftpd/tftp-utils.c Sat Feb 11 23:58:07 2012 (r231540) +++ stable/7/libexec/tftpd/tftp-utils.c Sun Feb 12 01:07:15 2012 (r231541) @@ -100,7 +100,7 @@ unmappedaddr(struct sockaddr_in6 *sin6) sin4->sin_len = sizeof(struct sockaddr_in); } -/* Get a field from a \0 seperated string */ +/* Get a field from a \0 separated string */ ssize_t get_field(int peer, char *buffer, ssize_t size) { Modified: stable/7/libexec/tftpd/tftp-utils.h ============================================================================== --- stable/7/libexec/tftpd/tftp-utils.h Sat Feb 11 23:58:07 2012 (r231540) +++ stable/7/libexec/tftpd/tftp-utils.h Sun Feb 12 01:07:15 2012 (r231541) @@ -36,11 +36,11 @@ __FBSDID("$FreeBSD$"); #define MAXPKTSIZE (MAXSEGSIZE + 4) /* Maximum size of the packet */ /* For the blksize option */ -#define BLKSIZE_MIN 8 /* Minumum size of the data segment */ +#define BLKSIZE_MIN 8 /* Minimum size of the data segment */ #define BLKSIZE_MAX MAXSEGSIZE /* Maximum size of the data segment */ /* For the timeout option */ -#define TIMEOUT_MIN 0 /* Minumum timeout value */ +#define TIMEOUT_MIN 0 /* Minimum timeout value */ #define TIMEOUT_MAX 255 /* Maximum timeout value */ #define MIN_TIMEOUTS 3 Modified: stable/7/libexec/tftpd/tftpd.8 ============================================================================== --- stable/7/libexec/tftpd/tftpd.8 Sat Feb 11 23:58:07 2012 (r231540) +++ stable/7/libexec/tftpd/tftpd.8 Sun Feb 12 01:07:15 2012 (r231541) @@ -32,7 +32,7 @@ .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 14, 2000 +.Dd June 22, 2011 .Dt TFTPD 8 .Os .Sh NAME @@ -150,9 +150,27 @@ compatible format string for the creatio .Fl W is specified. By default the string "%Y%m%d" is used. -.It Fl d +.It Fl d, d Ar [value] Enables debug output. -If specified twice, it will log DATA and ACK packets too. +If +.Ar value +is not specified, then the debug level is increased by one +for each instance of +.Fl d +which is specified. +.Pp +If +.Ar value +is specified, then the debug level is set to +.Ar value . +The debug level is a bitmask implemented in +.Pa src/libexec/tftpd/tftp-utils.h . +Valid values are 0 (DEBUG_NONE), 1 (DEBUG_PACKETS), 2, (DEBUG_SIMPLE), +4 (DEBUG_OPTIONS), and 8 (DEBUG_ACCESS). Multiple debug values can be combined +in the bitmask by logically OR'ing the values. For example, specifying +.Fl d +.Ar 15 +will enable all the debug values. .It Fl l Log all requests using .Xr syslog 3 @@ -217,12 +235,34 @@ option. .Xr services 5 , .Xr syslog.conf 5 , .Xr inetd 8 +.Pp +The following RFC's are supported: .Rs -.%A K. R. Sollins +RFC 1350 .%T The TFTP Protocol (Revision 2) -.%D July 1992 -.%O RFC 1350, STD 33 .Re +.Rs +RFC 2347 +.%T TFTP Option Extension +.Re +.Rs +RFC 2348 +.%T TFTP Blocksize Option +.Re +.Rs +RFC 2349 +.%T TFTP Timeout Interval and Transfer Size Options +.Re +.Pp +The non-standard +.Cm rollover +and +.Cm blksize2 +TFTP options are mentioned here: +.Rs +.%T Extending TFTP +.%U http://www.compuphase.com/tftp.htm +.Re .Sh HISTORY The .Nm @@ -253,8 +293,22 @@ was introduced in support for the TFTP Blocksize Option (RFC2348) and the blksize2 option was introduced in .Fx 7.4 . -.Sh BUGS -Files larger than 33488896 octets (65535 blocks) cannot be transferred -without client and server supporting blocksize negotiation (RFC2348). .Pp -Many tftp clients will not transfer files over 16744448 octets (32767 blocks). +Edwin Groothuis performed a major rewrite of the +.Nm +and +.Xr tftp 1 +code to support RFC2348. +.Sh NOTES +Files larger than 33,553,919 octets (65535 blocks, last one <512 +octets) cannot be correctly transferred without client and server +supporting blocksize negotiation (RFCs 2347 and 2348), +or the non-standard TFTP rollover option. +As a kludge, +.Nm +accepts a sequence of block number which wrap to zero after 65535, +even if the rollover option is not specified. +.Pp +Many tftp clients will not transfer files over 16,776,703 octets +(32767 blocks), as they incorrectly count the block number using +a signed rather than unsigned 16-bit integer. From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 05:01:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2864A106564A; Sun, 12 Feb 2012 05:01:50 +0000 (UTC) (envelope-from mckay@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D6768FC0A; Sun, 12 Feb 2012 05:01:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C51nw8065895; Sun, 12 Feb 2012 05:01:49 GMT (envelope-from mckay@svn.freebsd.org) Received: (from mckay@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C51noc065893; Sun, 12 Feb 2012 05:01:49 GMT (envelope-from mckay@svn.freebsd.org) Message-Id: <201202120501.q1C51noc065893@svn.freebsd.org> From: Stephen McKay Date: Sun, 12 Feb 2012 05:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231542 - stable/8/usr.bin/xargs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 05:01:50 -0000 Author: mckay Date: Sun Feb 12 05:01:49 2012 New Revision: 231542 URL: http://svn.freebsd.org/changeset/base/231542 Log: MFC r215615, r215642: Fix several misbehaviours by making xargs keep track of its child processes. Modified: stable/8/usr.bin/xargs/xargs.c Directory Properties: stable/8/usr.bin/xargs/ (props changed) Modified: stable/8/usr.bin/xargs/xargs.c ============================================================================== --- stable/8/usr.bin/xargs/xargs.c Sun Feb 12 01:07:15 2012 (r231541) +++ stable/8/usr.bin/xargs/xargs.c Sun Feb 12 05:01:49 2012 (r231542) @@ -73,7 +73,16 @@ static int prompt(void); static void run(char **); static void usage(void); void strnsubst(char **, const char *, const char *, size_t); +static pid_t xwait(int block, int *status); static void waitchildren(const char *, int); +static void pids_init(void); +static int pids_empty(void); +static int pids_full(void); +static void pids_add(pid_t pid); +static int pids_remove(pid_t pid); +static int findslot(pid_t pid); +static int findfreeslot(void); +static void clearslot(int slot); static char echo[] = _PATH_ECHO; static char **av, **bxp, **ep, **endxp, **xp; @@ -82,6 +91,7 @@ static const char *eofstr; static int count, insingle, indouble, oflag, pflag, tflag, Rflag, rval, zflag; static int cnt, Iflag, jfound, Lflag, Sflag, wasquoted, xflag; static int curprocs, maxprocs; +static pid_t *childpids; static volatile int childerr; @@ -205,6 +215,8 @@ main(int argc, char *argv[]) if (replstr != NULL && *replstr == '\0') errx(1, "replstr may not be empty"); + pids_init(); + /* * Allocate pointers for the utility name, the utility arguments, * the maximum arguments to be read from stdin and the trailing @@ -556,19 +568,41 @@ exec: childerr = errno; _exit(1); } - curprocs++; + pids_add(pid); waitchildren(*argv, 0); } +/* + * Wait for a tracked child to exit and return its pid and exit status. + * + * Ignores (discards) all untracked child processes. + * Returns -1 and sets errno to ECHILD if no tracked children exist. + * If block is set, waits indefinitely for a child process to exit. + * If block is not set and no children have exited, returns 0 immediately. + */ +static pid_t +xwait(int block, int *status) { + pid_t pid; + + if (pids_empty()) { + errno = ECHILD; + return (-1); + } + + while ((pid = waitpid(-1, status, block ? 0 : WNOHANG)) > 0) + if (pids_remove(pid)) + break; + + return (pid); +} + static void waitchildren(const char *name, int waitall) { pid_t pid; int status; - while ((pid = waitpid(-1, &status, !waitall && curprocs < maxprocs ? - WNOHANG : 0)) > 0) { - curprocs--; + while ((pid = xwait(waitall || pids_full(), &status)) > 0) { /* If we couldn't invoke the utility, exit. */ if (childerr != 0) { errno = childerr; @@ -583,8 +617,87 @@ waitchildren(const char *name, int waita if (WEXITSTATUS(status)) rval = 1; } + if (pid == -1 && errno != ECHILD) - err(1, "wait3"); + err(1, "waitpid"); +} + +#define NOPID (0) + +static void +pids_init(void) +{ + int i; + + if ((childpids = malloc(maxprocs * sizeof(*childpids))) == NULL) + errx(1, "malloc failed"); + + for (i = 0; i < maxprocs; i++) + clearslot(i); +} + +static int +pids_empty(void) +{ + return (curprocs == 0); +} + +static int +pids_full(void) +{ + return (curprocs >= maxprocs); +} + +static void +pids_add(pid_t pid) +{ + int slot; + + slot = findfreeslot(); + childpids[slot] = pid; + curprocs++; +} + +static int +pids_remove(pid_t pid) +{ + int slot; + + if ((slot = findslot(pid)) < 0) + return (0); + + clearslot(slot); + curprocs--; + return (1); +} + +static int +findfreeslot(void) +{ + int slot; + + if ((slot = findslot(NOPID)) < 0) + errx(1, "internal error: no free pid slot"); + + return (slot); +} + +static int +findslot(pid_t pid) +{ + int slot; + + for (slot = 0; slot < maxprocs; slot++) + if (childpids[slot] == pid) + return (slot); + + return (-1); +} + +static void +clearslot(int slot) +{ + childpids[slot] = NOPID; } /* From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 05:14:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3528C1065670; Sun, 12 Feb 2012 05:14:13 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19DDE8FC13; Sun, 12 Feb 2012 05:14:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C5ECot066302; Sun, 12 Feb 2012 05:14:12 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C5ECwC066298; Sun, 12 Feb 2012 05:14:12 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201202120514.q1C5ECwC066298@svn.freebsd.org> From: Max Khon Date: Sun, 12 Feb 2012 05:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231543 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 05:14:13 -0000 Author: fjoe Date: Sun Feb 12 05:14:12 2012 New Revision: 231543 URL: http://svn.freebsd.org/changeset/base/231543 Log: - Use fixed-width integer types. - Prefer to use C99 stdint types. This fixes ng_cisco on 64-bit architectures. MFC after: 1 week Modified: head/sys/netgraph/ng_cisco.c head/sys/netgraph/ng_cisco.h Modified: head/sys/netgraph/ng_cisco.c ============================================================================== --- head/sys/netgraph/ng_cisco.c Sun Feb 12 05:01:49 2012 (r231542) +++ head/sys/netgraph/ng_cisco.c Sun Feb 12 05:14:12 2012 (r231543) @@ -75,33 +75,33 @@ #define KEEPALIVE_SECS 10 struct cisco_header { - u_char address; - u_char control; - u_short protocol; -}; + uint8_t address; + uint8_t control; + uint16_t protocol; +} __packed; #define CISCO_HEADER_LEN sizeof (struct cisco_header) struct cisco_packet { - u_long type; - u_long par1; - u_long par2; - u_short rel; - u_short time0; - u_short time1; -}; + uint32_t type; + uint32_t par1; + uint32_t par2; + uint16_t rel; + uint16_t time0; + uint16_t time1; +} __packed; #define CISCO_PACKET_LEN (sizeof(struct cisco_packet)) struct protoent { hook_p hook; /* the hook for this proto */ - u_short af; /* address family, -1 = downstream */ + uint16_t af; /* address family, -1 = downstream */ }; struct cisco_priv { - u_long local_seq; - u_long remote_seq; - u_long seqRetries; /* how many times we've been here throwing out + uint32_t local_seq; + uint32_t remote_seq; + uint32_t seqRetries; /* how many times we've been here throwing out * the same sequence number without ack */ node_p node; struct callout handle; @@ -271,7 +271,7 @@ cisco_rcvmsg(node_p node, item_p item, h pos = sprintf(arg, "keepalive period: %d sec; ", KEEPALIVE_SECS); pos += sprintf(arg + pos, - "unacknowledged keepalives: %ld", sc->seqRetries); + "unacknowledged keepalives: %d", sc->seqRetries); resp->header.arglen = pos + 1; break; } @@ -603,7 +603,7 @@ cisco_send(sc_p sc, int type, long par1, struct cisco_packet *ch; struct mbuf *m; struct timeval time; - u_long t; + uint32_t t; int error = 0; getmicrouptime(&time); @@ -626,8 +626,8 @@ cisco_send(sc_p sc, int type, long par1, ch->par1 = htonl(par1); ch->par2 = htonl(par2); ch->rel = -1; - ch->time0 = htons((u_short) (t >> 16)); - ch->time1 = htons((u_short) t); + ch->time0 = htons((uint16_t) (t >> 16)); + ch->time1 = htons((uint16_t) t); NG_SEND_DATA_ONLY(error, sc->downstream.hook, m); return (error); Modified: head/sys/netgraph/ng_cisco.h ============================================================================== --- head/sys/netgraph/ng_cisco.h Sun Feb 12 05:01:49 2012 (r231542) +++ head/sys/netgraph/ng_cisco.h Sun Feb 12 05:14:12 2012 (r231543) @@ -76,8 +76,8 @@ struct ng_cisco_ipaddr { } struct ng_cisco_stats { - u_int32_t seqRetries; /* # unack'd retries */ - u_int32_t keepAlivePeriod; /* in seconds */ + uint32_t seqRetries; /* # unack'd retries */ + uint32_t keepAlivePeriod; /* in seconds */ }; /* Keep this in sync with the above structure definition */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 05:34:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F863106566B; Sun, 12 Feb 2012 05:34:02 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6B18FC0C; Sun, 12 Feb 2012 05:34:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C5Y22c066954; Sun, 12 Feb 2012 05:34:02 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C5Y2S1066951; Sun, 12 Feb 2012 05:34:02 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201202120534.q1C5Y2S1066951@svn.freebsd.org> From: Max Khon Date: Sun, 12 Feb 2012 05:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231544 - in head: tools/regression/usr.bin/make/execution/joberr usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 05:34:02 -0000 Author: fjoe Date: Sun Feb 12 05:34:01 2012 New Revision: 231544 URL: http://svn.freebsd.org/changeset/base/231544 Log: Include target names in diagnostic output. Submitted by: Garrett Cooper Modified: head/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1 head/usr.bin/make/job.c Modified: head/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1 ============================================================================== --- head/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1 Sun Feb 12 05:14:12 2012 (r231543) +++ head/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1 Sun Feb 12 05:34:01 2012 (r231544) @@ -1,90 +1,90 @@ Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 +*** [do-check-joberr] Error code 1 Error: build failed -*** Error code 1 -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) -*** Error code 2 (ignored) +*** [do-check-joberr] Error code 1 +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) +*** [check-joberr] Error code 2 (ignored) Modified: head/usr.bin/make/job.c ============================================================================== --- head/usr.bin/make/job.c Sun Feb 12 05:14:12 2012 (r231543) +++ head/usr.bin/make/job.c Sun Feb 12 05:34:01 2012 (r231544) @@ -954,17 +954,19 @@ JobFinish(Job *job, int *status) lastNode = job->node; } fprintf(out, - "*** Completed successfully\n"); + "*** [%s] Completed successfully\n", + job->node->name); } } else { if (usePipes && job->node != lastNode) { MESSAGE(out, job->node); lastNode = job->node; } - fprintf(out, "*** Error code %d%s\n", + fprintf(out, "*** [%s] Error code %d%s\n", + job->node->name, WEXITSTATUS(*status), (job->flags & JOB_IGNERR) ? - "(ignored)" : ""); + " (ignored)" : ""); if (job->flags & JOB_IGNERR) { *status = 0; @@ -1005,7 +1007,8 @@ JobFinish(Job *job, int *status) MESSAGE(out, job->node); lastNode = job->node; } - fprintf(out, "*** Continued\n"); + fprintf(out, "*** [%s] Continued\n", + job->node->name); } if (!(job->flags & JOB_CONTINUING)) { DEBUGF(JOB, ("Warning: process %jd was not " @@ -1029,7 +1032,8 @@ JobFinish(Job *job, int *status) lastNode = job->node; } fprintf(out, - "*** Signal %d\n", WTERMSIG(*status)); + "*** [%s] Signal %d\n", job->node->name, + WTERMSIG(*status)); fflush(out); } } @@ -1056,7 +1060,8 @@ JobFinish(Job *job, int *status) MESSAGE(out, job->node); lastNode = job->node; } - fprintf(out, "*** Stopped -- signal %d\n", WSTOPSIG(*status)); + fprintf(out, "*** [%s] Stopped -- signal %d\n", + job->node->name, WSTOPSIG(*status)); job->flags |= JOB_RESUME; TAILQ_INSERT_TAIL(&stoppedJobs, job, link); fflush(out); @@ -3034,13 +3039,15 @@ Compat_RunCommand(LstNode *cmdNode, GNod if (status == 0) { return (0); } else { - printf("*** Error code %d", status); + printf("*** [%s] Error code %d", + gn->name, status); } } else if (WIFSTOPPED(reason)) { status = WSTOPSIG(reason); } else { status = WTERMSIG(reason); - printf("*** Signal %d", status); + printf("*** [%s] Signal %d", + gn->name, status); } if (ps.errCheck) { From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 06:01:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64B3F106564A; Sun, 12 Feb 2012 06:01:50 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3834D8FC08; Sun, 12 Feb 2012 06:01:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C61oMC067818; Sun, 12 Feb 2012 06:01:50 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C61ohW067816; Sun, 12 Feb 2012 06:01:50 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201202120601.q1C61ohW067816@svn.freebsd.org> From: Rick Macklem Date: Sun, 12 Feb 2012 06:01:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231545 - stable/9/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 06:01:50 -0000 Author: rmacklem Date: Sun Feb 12 06:01:49 2012 New Revision: 231545 URL: http://svn.freebsd.org/changeset/base/231545 Log: MFC: r231133 r228827 fixed a problem where copying of NFSv4 open credentials into a credential structure would corrupt it. This happened when the p argument was != NULL. However, I now realize that the copying of open credentials should only happen for p == NULL, since that indicates that it is a read-ahead or write-behind. This patch fixes this. After this commit, r228827 could be reverted, but I think the code is clearer and safer with the patch, so I am going to leave it in. Without this patch, it was possible that a NFSv4 VOP_SETATTR() could have changed the credentials of the caller. This would have happened if the process doing the VOP_SETATTR() did not have the file open, but some other process running as a different uid had the file open for writing at the same time. Modified: stable/9/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clstate.c Sun Feb 12 05:34:01 2012 (r231544) +++ stable/9/sys/fs/nfsclient/nfs_clstate.c Sun Feb 12 06:01:49 2012 (r231545) @@ -559,8 +559,12 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n NFSUNLOCKCLSTATE(); return (ENOENT); } - /* for read aheads or write behinds, use the open cred */ - newnfs_copycred(&op->nfso_cred, cred); + /* + * For read aheads or write behinds, use the open cred. + * A read ahead or write behind is indicated by p == NULL. + */ + if (p == NULL) + newnfs_copycred(&op->nfso_cred, cred); } /* From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 06:41:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7459B106566B; Sun, 12 Feb 2012 06:41:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47FD78FC13; Sun, 12 Feb 2012 06:41:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C6fU5l069106; Sun, 12 Feb 2012 06:41:30 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C6fUIN069104; Sun, 12 Feb 2012 06:41:30 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201202120641.q1C6fUIN069104@svn.freebsd.org> From: Rick Macklem Date: Sun, 12 Feb 2012 06:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231547 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 06:41:30 -0000 Author: rmacklem Date: Sun Feb 12 06:41:29 2012 New Revision: 231547 URL: http://svn.freebsd.org/changeset/base/231547 Log: MFC: r231133 r228827 fixed a problem where copying of NFSv4 open credentials into a credential structure would corrupt it. This happened when the p argument was != NULL. However, I now realize that the copying of open credentials should only happen for p == NULL, since that indicates that it is a read-ahead or write-behind. This patch fixes this. After this commit, r228827 could be reverted, but I think the code is clearer and safer with the patch, so I am going to leave it in. Without this patch, it was possible that a NFSv4 VOP_SETATTR() could have changed the credentials of the caller. This would have happened if the process doing the VOP_SETATTR() did not have the file open, but some other process running as a different uid had the file open for writing at the same time. Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clstate.c Sun Feb 12 06:27:59 2012 (r231546) +++ stable/8/sys/fs/nfsclient/nfs_clstate.c Sun Feb 12 06:41:29 2012 (r231547) @@ -559,8 +559,12 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n NFSUNLOCKCLSTATE(); return (ENOENT); } - /* for read aheads or write behinds, use the open cred */ - newnfs_copycred(&op->nfso_cred, cred); + /* + * For read aheads or write behinds, use the open cred. + * A read ahead or write behind is indicated by p == NULL. + */ + if (p == NULL) + newnfs_copycred(&op->nfso_cred, cred); } /* From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:45:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 922CA106566B; Sun, 12 Feb 2012 07:45:49 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8150B8FC0A; Sun, 12 Feb 2012 07:45:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C7jnZ8071157; Sun, 12 Feb 2012 07:45:49 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7jnaa071154; Sun, 12 Feb 2012 07:45:49 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201202120745.q1C7jnaa071154@svn.freebsd.org> From: Ed Schouten Date: Sun, 12 Feb 2012 07:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231549 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 07:45:49 -0000 Author: ed Date: Sun Feb 12 07:45:48 2012 New Revision: 231549 URL: http://svn.freebsd.org/changeset/base/231549 Log: Avoid using BEFORE in the utx rc script. Requested by: dougb Modified: head/etc/rc.d/LOGIN head/etc/rc.d/utx Modified: head/etc/rc.d/LOGIN ============================================================================== --- head/etc/rc.d/LOGIN Sun Feb 12 07:06:45 2012 (r231548) +++ head/etc/rc.d/LOGIN Sun Feb 12 07:45:48 2012 (r231549) @@ -4,7 +4,7 @@ # # PROVIDE: LOGIN -# REQUIRE: DAEMON +# REQUIRE: DAEMON utx # This is a dummy dependency to ensure user services such as xdm, # inetd, cron and kerberos are started after everything else, in case Modified: head/etc/rc.d/utx ============================================================================== --- head/etc/rc.d/utx Sun Feb 12 07:06:45 2012 (r231548) +++ head/etc/rc.d/utx Sun Feb 12 07:45:48 2012 (r231549) @@ -5,7 +5,6 @@ # PROVIDE: utx # REQUIRE: DAEMON cleanvar -# BEFORE: LOGIN # KEYWORD: shutdown . /etc/rc.subr From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:52:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0014D106566B; Sun, 12 Feb 2012 07:52:14 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E222D8FC12; Sun, 12 Feb 2012 07:52:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C7qEui071378; Sun, 12 Feb 2012 07:52:14 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7qEtj071376; Sun, 12 Feb 2012 07:52:14 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202120752.q1C7qEtj071376@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 12 Feb 2012 07:52:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231550 - stable/9/lib/libkvm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 07:52:15 -0000 Author: trociny Date: Sun Feb 12 07:52:14 2012 New Revision: 231550 URL: http://svn.freebsd.org/changeset/base/231550 Log: MFC r230873: Try to avoid ambiguity when sysctl returns ENOMEM additionally checking the returned oldlen: when ENOMEM is due to the supplied buffer being too short the return oldlen is equal to buffer size. Without this additional check kvm_getprocs() gets stuck in loop if the returned ENOMEM was due the exceeded memorylocked limit. This is easily can be observed running `limits -l 1k top'. Submitted by: Andrey Zonov Modified: stable/9/lib/libkvm/kvm_proc.c Directory Properties: stable/9/lib/libkvm/ (props changed) Modified: stable/9/lib/libkvm/kvm_proc.c ============================================================================== --- stable/9/lib/libkvm/kvm_proc.c Sun Feb 12 07:45:48 2012 (r231549) +++ stable/9/lib/libkvm/kvm_proc.c Sun Feb 12 07:52:14 2012 (r231550) @@ -474,7 +474,7 @@ struct kinfo_proc * kvm_getprocs(kvm_t *kd, int op, int arg, int *cnt) { int mib[4], st, nprocs; - size_t size; + size_t size, osize; int temp_op; if (kd->procbase != 0) { @@ -524,10 +524,11 @@ kvm_getprocs(kvm_t *kd, int op, int arg, _kvm_realloc(kd, kd->procbase, size); if (kd->procbase == 0) return (0); + osize = size; st = sysctl(mib, temp_op == KERN_PROC_ALL || temp_op == KERN_PROC_PROC ? 3 : 4, kd->procbase, &size, NULL, 0); - } while (st == -1 && errno == ENOMEM); + } while (st == -1 && errno == ENOMEM && size == osize); if (st == -1) { _kvm_syserr(kd, kd->program, "kvm_getprocs"); return (0); From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:53:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B27A106564A; Sun, 12 Feb 2012 07:53:03 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 595138FC15; Sun, 12 Feb 2012 07:53:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C7r3Fs071432; Sun, 12 Feb 2012 07:53:03 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7r3JZ071430; Sun, 12 Feb 2012 07:53:03 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202120753.q1C7r3JZ071430@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 12 Feb 2012 07:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231551 - stable/8/lib/libkvm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 07:53:03 -0000 Author: trociny Date: Sun Feb 12 07:53:02 2012 New Revision: 231551 URL: http://svn.freebsd.org/changeset/base/231551 Log: MFC r230873: Try to avoid ambiguity when sysctl returns ENOMEM additionally checking the returned oldlen: when ENOMEM is due to the supplied buffer being too short the return oldlen is equal to buffer size. Without this additional check kvm_getprocs() gets stuck in loop if the returned ENOMEM was due the exceeded memorylocked limit. This is easily can be observed running `limits -l 1k top'. Submitted by: Andrey Zonov Modified: stable/8/lib/libkvm/kvm_proc.c Directory Properties: stable/8/lib/libkvm/ (props changed) Modified: stable/8/lib/libkvm/kvm_proc.c ============================================================================== --- stable/8/lib/libkvm/kvm_proc.c Sun Feb 12 07:52:14 2012 (r231550) +++ stable/8/lib/libkvm/kvm_proc.c Sun Feb 12 07:53:02 2012 (r231551) @@ -471,7 +471,7 @@ kvm_getprocs(kd, op, arg, cnt) int *cnt; { int mib[4], st, nprocs; - size_t size; + size_t size, osize; int temp_op; if (kd->procbase != 0) { @@ -521,10 +521,11 @@ kvm_getprocs(kd, op, arg, cnt) _kvm_realloc(kd, kd->procbase, size); if (kd->procbase == 0) return (0); + osize = size; st = sysctl(mib, temp_op == KERN_PROC_ALL || temp_op == KERN_PROC_PROC ? 3 : 4, kd->procbase, &size, NULL, 0); - } while (st == -1 && errno == ENOMEM); + } while (st == -1 && errno == ENOMEM && size == osize); if (st == -1) { _kvm_syserr(kd, kd->program, "kvm_getprocs"); return (0); From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:53:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 560EC106566C; Sun, 12 Feb 2012 07:53:38 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 442EC8FC1B; Sun, 12 Feb 2012 07:53:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C7rc2q071481; Sun, 12 Feb 2012 07:53:38 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7rcfd071479; Sun, 12 Feb 2012 07:53:38 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202120753.q1C7rcfd071479@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 12 Feb 2012 07:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231552 - stable/7/lib/libkvm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 07:53:38 -0000 Author: trociny Date: Sun Feb 12 07:53:37 2012 New Revision: 231552 URL: http://svn.freebsd.org/changeset/base/231552 Log: MFC r230873: Try to avoid ambiguity when sysctl returns ENOMEM additionally checking the returned oldlen: when ENOMEM is due to the supplied buffer being too short the return oldlen is equal to buffer size. Without this additional check kvm_getprocs() gets stuck in loop if the returned ENOMEM was due the exceeded memorylocked limit. This is easily can be observed running `limits -l 1k top'. Submitted by: Andrey Zonov Modified: stable/7/lib/libkvm/kvm_proc.c Directory Properties: stable/7/lib/libkvm/ (props changed) Modified: stable/7/lib/libkvm/kvm_proc.c ============================================================================== --- stable/7/lib/libkvm/kvm_proc.c Sun Feb 12 07:53:02 2012 (r231551) +++ stable/7/lib/libkvm/kvm_proc.c Sun Feb 12 07:53:37 2012 (r231552) @@ -464,7 +464,7 @@ kvm_getprocs(kd, op, arg, cnt) int *cnt; { int mib[4], st, nprocs; - size_t size; + size_t size, osize; int temp_op; if (kd->procbase != 0) { @@ -514,10 +514,11 @@ kvm_getprocs(kd, op, arg, cnt) _kvm_realloc(kd, kd->procbase, size); if (kd->procbase == 0) return (0); + osize = size; st = sysctl(mib, temp_op == KERN_PROC_ALL || temp_op == KERN_PROC_PROC ? 3 : 4, kd->procbase, &size, NULL, 0); - } while (st == -1 && errno == ENOMEM); + } while (st == -1 && errno == ENOMEM && size == osize); if (st == -1) { _kvm_syserr(kd, kd->program, "kvm_getprocs"); return (0); From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:55:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 498AE106566C; Sun, 12 Feb 2012 07:55:34 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3774C8FC0A; Sun, 12 Feb 2012 07:55:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C7tYoZ071588; Sun, 12 Feb 2012 07:55:34 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7tYb3071586; Sun, 12 Feb 2012 07:55:34 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202120755.q1C7tYb3071586@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 12 Feb 2012 07:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231553 - stable/9/usr.bin/sockstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 07:55:34 -0000 Author: trociny Date: Sun Feb 12 07:55:33 2012 New Revision: 231553 URL: http://svn.freebsd.org/changeset/base/231553 Log: MFC r230874: Try to avoid ambiguity when sysctl returns ENOMEM additionally checking the returned oldlen: when ENOMEM is due to the supplied buffer being too short the return oldlen is equal to buffer size. Without this additional check sockstat gets stuck in loop leaking the memory if the returned ENOMEM was due the exceeded memorylocked limit. This is easily can be observed running `limits -l 1k sockstat'. Submitted by: Andrey Zonov Modified: stable/9/usr.bin/sockstat/sockstat.c Directory Properties: stable/9/usr.bin/sockstat/ (props changed) Modified: stable/9/usr.bin/sockstat/sockstat.c ============================================================================== --- stable/9/usr.bin/sockstat/sockstat.c Sun Feb 12 07:53:37 2012 (r231552) +++ stable/9/usr.bin/sockstat/sockstat.c Sun Feb 12 07:55:33 2012 (r231553) @@ -295,7 +295,7 @@ gather_inet(int proto) break; if (errno == ENOENT) goto out; - if (errno != ENOMEM) + if (errno != ENOMEM || len != bufsize) err(1, "sysctlbyname()"); bufsize *= 2; } @@ -423,7 +423,7 @@ gather_unix(int proto) len = bufsize; if (sysctlbyname(varname, buf, &len, NULL, 0) == 0) break; - if (errno != ENOMEM) + if (errno != ENOMEM || len != bufsize) err(1, "sysctlbyname()"); bufsize *= 2; } @@ -475,14 +475,15 @@ out: static void getfiles(void) { - size_t len; + size_t len, olen; - if ((xfiles = malloc(len = sizeof *xfiles)) == NULL) + olen = len = sizeof *xfiles; + if ((xfiles = malloc(len)) == NULL) err(1, "malloc()"); while (sysctlbyname("kern.file", xfiles, &len, 0, 0) == -1) { - if (errno != ENOMEM) + if (errno != ENOMEM || len != olen) err(1, "sysctlbyname()"); - len *= 2; + olen = len *= 2; if ((xfiles = realloc(xfiles, len)) == NULL) err(1, "realloc()"); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:56:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F8C810656D3; Sun, 12 Feb 2012 07:56:08 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7508FC0C; Sun, 12 Feb 2012 07:56:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C7u8iX071643; Sun, 12 Feb 2012 07:56:08 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7u8sv071641; Sun, 12 Feb 2012 07:56:08 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202120756.q1C7u8sv071641@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 12 Feb 2012 07:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231554 - stable/8/usr.bin/sockstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 07:56:08 -0000 Author: trociny Date: Sun Feb 12 07:56:07 2012 New Revision: 231554 URL: http://svn.freebsd.org/changeset/base/231554 Log: MFC r230874: Try to avoid ambiguity when sysctl returns ENOMEM additionally checking the returned oldlen: when ENOMEM is due to the supplied buffer being too short the return oldlen is equal to buffer size. Without this additional check sockstat gets stuck in loop leaking the memory if the returned ENOMEM was due the exceeded memorylocked limit. This is easily can be observed running `limits -l 1k sockstat'. Submitted by: Andrey Zonov Modified: stable/8/usr.bin/sockstat/sockstat.c Directory Properties: stable/8/usr.bin/sockstat/ (props changed) Modified: stable/8/usr.bin/sockstat/sockstat.c ============================================================================== --- stable/8/usr.bin/sockstat/sockstat.c Sun Feb 12 07:55:33 2012 (r231553) +++ stable/8/usr.bin/sockstat/sockstat.c Sun Feb 12 07:56:07 2012 (r231554) @@ -295,7 +295,7 @@ gather_inet(int proto) break; if (errno == ENOENT) goto out; - if (errno != ENOMEM) + if (errno != ENOMEM || len != bufsize) err(1, "sysctlbyname()"); bufsize *= 2; } @@ -423,7 +423,7 @@ gather_unix(int proto) len = bufsize; if (sysctlbyname(varname, buf, &len, NULL, 0) == 0) break; - if (errno != ENOMEM) + if (errno != ENOMEM || len != bufsize) err(1, "sysctlbyname()"); bufsize *= 2; } @@ -475,14 +475,15 @@ out: static void getfiles(void) { - size_t len; + size_t len, olen; - if ((xfiles = malloc(len = sizeof *xfiles)) == NULL) + olen = len = sizeof *xfiles; + if ((xfiles = malloc(len)) == NULL) err(1, "malloc()"); while (sysctlbyname("kern.file", xfiles, &len, 0, 0) == -1) { - if (errno != ENOMEM) + if (errno != ENOMEM || len != olen) err(1, "sysctlbyname()"); - len *= 2; + olen = len *= 2; if ((xfiles = realloc(xfiles, len)) == NULL) err(1, "realloc()"); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:56:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E51F106567A; Sun, 12 Feb 2012 07:56:47 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 492F98FC1B; Sun, 12 Feb 2012 07:56:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C7ulWU071694; Sun, 12 Feb 2012 07:56:47 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7ulJY071692; Sun, 12 Feb 2012 07:56:47 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202120756.q1C7ulJY071692@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 12 Feb 2012 07:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231555 - stable/7/usr.bin/sockstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 07:56:47 -0000 Author: trociny Date: Sun Feb 12 07:56:46 2012 New Revision: 231555 URL: http://svn.freebsd.org/changeset/base/231555 Log: MFC r230874: Try to avoid ambiguity when sysctl returns ENOMEM additionally checking the returned oldlen: when ENOMEM is due to the supplied buffer being too short the return oldlen is equal to buffer size. Without this additional check sockstat gets stuck in loop leaking the memory if the returned ENOMEM was due the exceeded memorylocked limit. This is easily can be observed running `limits -l 1k sockstat'. Submitted by: Andrey Zonov Modified: stable/7/usr.bin/sockstat/sockstat.c Directory Properties: stable/7/usr.bin/sockstat/ (props changed) Modified: stable/7/usr.bin/sockstat/sockstat.c ============================================================================== --- stable/7/usr.bin/sockstat/sockstat.c Sun Feb 12 07:56:07 2012 (r231554) +++ stable/7/usr.bin/sockstat/sockstat.c Sun Feb 12 07:56:46 2012 (r231555) @@ -294,7 +294,7 @@ gather_inet(int proto) break; if (errno == ENOENT) goto out; - if (errno != ENOMEM) + if (errno != ENOMEM || len != bufsize) err(1, "sysctlbyname()"); bufsize *= 2; } @@ -411,7 +411,7 @@ gather_unix(int proto) len = bufsize; if (sysctlbyname(varname, buf, &len, NULL, 0) == 0) break; - if (errno != ENOMEM) + if (errno != ENOMEM || len != bufsize) err(1, "sysctlbyname()"); bufsize *= 2; } @@ -463,14 +463,15 @@ out: static void getfiles(void) { - size_t len; + size_t len, olen; - if ((xfiles = malloc(len = sizeof *xfiles)) == NULL) + olen = len = sizeof *xfiles; + if ((xfiles = malloc(len)) == NULL) err(1, "malloc()"); while (sysctlbyname("kern.file", xfiles, &len, 0, 0) == -1) { - if (errno != ENOMEM) + if (errno != ENOMEM || len != olen) err(1, "sysctlbyname()"); - len *= 2; + olen = len *= 2; if ((xfiles = realloc(xfiles, len)) == NULL) err(1, "realloc()"); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:57:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE524106564A; Sun, 12 Feb 2012 07:57:58 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC5D08FC12; Sun, 12 Feb 2012 07:57:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C7vwen071763; Sun, 12 Feb 2012 07:57:58 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7vwwL071761; Sun, 12 Feb 2012 07:57:58 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202120757.q1C7vwwL071761@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 12 Feb 2012 07:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231556 - stable/9/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 07:57:59 -0000 Author: trociny Date: Sun Feb 12 07:57:58 2012 New Revision: 231556 URL: http://svn.freebsd.org/changeset/base/231556 Log: MFC r231015, r231016: r231015: Fix the regression introduced in r226859: if the local component is out of date BIO_READ requests got lost instead of being sent to the remote component. Reviewed by: pjd r231016: If a local write request is from the synchronization thread, when it is synchronizing data that is out of date on the local component, we should not send G_GATE_CMD_DONE acknowledge to the kernel. This fixes the issue, observed in async mode, when on synchronization from the remote component the worker terminated with "G_GATE_CMD_DONE failed" error. Reported by: Artem Kajalainen Reviewed by: pjd Modified: stable/9/sbin/hastd/primary.c Directory Properties: stable/9/sbin/hastd/ (props changed) Modified: stable/9/sbin/hastd/primary.c ============================================================================== --- stable/9/sbin/hastd/primary.c Sun Feb 12 07:56:46 2012 (r231555) +++ stable/9/sbin/hastd/primary.c Sun Feb 12 07:57:58 2012 (r231556) @@ -1255,7 +1255,7 @@ ggate_recv_thread(void *arg) pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); refcount_init(&hio->hio_countdown, ncomps); - for (ii = ncomp; ii < ncomps; ii++) + for (ii = ncomp; ii < ncomp + ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } /* NOTREACHED */ @@ -1326,7 +1326,8 @@ local_send_thread(void *arg) } else { hio->hio_errors[ncomp] = 0; if (hio->hio_replication == - HAST_REPLICATION_ASYNC) { + HAST_REPLICATION_ASYNC && + !ISSYNCREQ(hio)) { ggio->gctl_error = 0; write_complete(res, hio); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:59:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 828901065672; Sun, 12 Feb 2012 07:59:25 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 709838FC14; Sun, 12 Feb 2012 07:59:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1C7xPl3071843; Sun, 12 Feb 2012 07:59:25 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7xPhH071841; Sun, 12 Feb 2012 07:59:25 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202120759.q1C7xPhH071841@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 12 Feb 2012 07:59:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231557 - stable/8/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 07:59:25 -0000 Author: trociny Date: Sun Feb 12 07:59:25 2012 New Revision: 231557 URL: http://svn.freebsd.org/changeset/base/231557 Log: MFC r231015, r231016: r231015: Fix the regression introduced in r226859: if the local component is out of date BIO_READ requests got lost instead of being sent to the remote component. Reviewed by: pjd r231016: If a local write request is from the synchronization thread, when it is synchronizing data that is out of date on the local component, we should not send G_GATE_CMD_DONE acknowledge to the kernel. This fixes the issue, observed in async mode, when on synchronization from the remote component the worker terminated with "G_GATE_CMD_DONE failed" error. Reported by: Artem Kajalainen Reviewed by: pjd Modified: stable/8/sbin/hastd/primary.c Directory Properties: stable/8/sbin/hastd/ (props changed) Modified: stable/8/sbin/hastd/primary.c ============================================================================== --- stable/8/sbin/hastd/primary.c Sun Feb 12 07:57:58 2012 (r231556) +++ stable/8/sbin/hastd/primary.c Sun Feb 12 07:59:25 2012 (r231557) @@ -1255,7 +1255,7 @@ ggate_recv_thread(void *arg) pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); refcount_init(&hio->hio_countdown, ncomps); - for (ii = ncomp; ii < ncomps; ii++) + for (ii = ncomp; ii < ncomp + ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } /* NOTREACHED */ @@ -1326,7 +1326,8 @@ local_send_thread(void *arg) } else { hio->hio_errors[ncomp] = 0; if (hio->hio_replication == - HAST_REPLICATION_ASYNC) { + HAST_REPLICATION_ASYNC && + !ISSYNCREQ(hio)) { ggio->gctl_error = 0; write_complete(res, hio); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 09:19:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF18B106564A; Sun, 12 Feb 2012 09:19:28 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id AA1A88FC0C; Sun, 12 Feb 2012 09:19:28 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id q1C9JQM4077575 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 12 Feb 2012 01:19:27 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4F378475.9050405@freebsd.org> Date: Sun, 12 Feb 2012 01:20:53 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.26) Gecko/20120129 Thunderbird/3.1.18 MIME-Version: 1.0 To: Max Khon References: <201202120514.q1C5ECwC066298@svn.freebsd.org> In-Reply-To: <201202120514.q1C5ECwC066298@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231543 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 09:19:29 -0000 On 2/11/12 9:14 PM, Max Khon wrote: > Author: fjoe > Date: Sun Feb 12 05:14:12 2012 > New Revision: 231543 > URL: http://svn.freebsd.org/changeset/base/231543 > > Log: > - Use fixed-width integer types. > - Prefer to use C99 stdint types. nice.. pitty it was written in 96 :-) good work > > This fixes ng_cisco on 64-bit architectures. > > MFC after: 1 week > > Modified: > head/sys/netgraph/ng_cisco.c > head/sys/netgraph/ng_cisco.h > > Modified: head/sys/netgraph/ng_cisco.c > ============================================================================== > --- head/sys/netgraph/ng_cisco.c Sun Feb 12 05:01:49 2012 (r231542) > +++ head/sys/netgraph/ng_cisco.c Sun Feb 12 05:14:12 2012 (r231543) > @@ -75,33 +75,33 @@ > #define KEEPALIVE_SECS 10 > > struct cisco_header { > - u_char address; > - u_char control; > - u_short protocol; > -}; > + uint8_t address; > + uint8_t control; > + uint16_t protocol; > +} __packed; > > #define CISCO_HEADER_LEN sizeof (struct cisco_header) > > struct cisco_packet { > - u_long type; > - u_long par1; > - u_long par2; > - u_short rel; > - u_short time0; > - u_short time1; > -}; > + uint32_t type; > + uint32_t par1; > + uint32_t par2; > + uint16_t rel; > + uint16_t time0; > + uint16_t time1; > +} __packed; > > #define CISCO_PACKET_LEN (sizeof(struct cisco_packet)) > > struct protoent { > hook_p hook; /* the hook for this proto */ > - u_short af; /* address family, -1 = downstream */ > + uint16_t af; /* address family, -1 = downstream */ > }; > > struct cisco_priv { > - u_long local_seq; > - u_long remote_seq; > - u_long seqRetries; /* how many times we've been here throwing out > + uint32_t local_seq; > + uint32_t remote_seq; > + uint32_t seqRetries; /* how many times we've been here throwing out > * the same sequence number without ack */ > node_p node; > struct callout handle; > @@ -271,7 +271,7 @@ cisco_rcvmsg(node_p node, item_p item, h > pos = sprintf(arg, > "keepalive period: %d sec; ", KEEPALIVE_SECS); > pos += sprintf(arg + pos, > - "unacknowledged keepalives: %ld", sc->seqRetries); > + "unacknowledged keepalives: %d", sc->seqRetries); > resp->header.arglen = pos + 1; > break; > } > @@ -603,7 +603,7 @@ cisco_send(sc_p sc, int type, long par1, > struct cisco_packet *ch; > struct mbuf *m; > struct timeval time; > - u_long t; > + uint32_t t; > int error = 0; > > getmicrouptime(&time); > @@ -626,8 +626,8 @@ cisco_send(sc_p sc, int type, long par1, > ch->par1 = htonl(par1); > ch->par2 = htonl(par2); > ch->rel = -1; > - ch->time0 = htons((u_short) (t>> 16)); > - ch->time1 = htons((u_short) t); > + ch->time0 = htons((uint16_t) (t>> 16)); > + ch->time1 = htons((uint16_t) t); > > NG_SEND_DATA_ONLY(error, sc->downstream.hook, m); > return (error); > > Modified: head/sys/netgraph/ng_cisco.h > ============================================================================== > --- head/sys/netgraph/ng_cisco.h Sun Feb 12 05:01:49 2012 (r231542) > +++ head/sys/netgraph/ng_cisco.h Sun Feb 12 05:14:12 2012 (r231543) > @@ -76,8 +76,8 @@ struct ng_cisco_ipaddr { > } > > struct ng_cisco_stats { > - u_int32_t seqRetries; /* # unack'd retries */ > - u_int32_t keepAlivePeriod; /* in seconds */ > + uint32_t seqRetries; /* # unack'd retries */ > + uint32_t keepAlivePeriod; /* in seconds */ > }; > > /* Keep this in sync with the above structure definition */ > > From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 14:54:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6EA8106564A; Sun, 12 Feb 2012 14:54:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D606E8FC08; Sun, 12 Feb 2012 14:54:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CEsJf6088956; Sun, 12 Feb 2012 14:54:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CEsJXV088954; Sun, 12 Feb 2012 14:54:19 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201202121454.q1CEsJXV088954@svn.freebsd.org> From: Andriy Gapon Date: Sun, 12 Feb 2012 14:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231558 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 14:54:20 -0000 Author: avg Date: Sun Feb 12 14:54:19 2012 New Revision: 231558 URL: http://svn.freebsd.org/changeset/base/231558 Log: newvers.sh: unbreak git/git-svn support MFC after: 2 weeks Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Sun Feb 12 07:59:25 2012 (r231557) +++ head/sys/conf/newvers.sh Sun Feb 12 14:54:19 2012 (r231558) @@ -92,11 +92,15 @@ for dir in /bin /usr/bin /usr/local/bin; svnversion=${dir}/svnversion break fi - if [ -d "${SYSDIR}/../.git" -a -x "${dir}/git" ] ; then - git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git" - break - fi done +if [ -d "${SYSDIR}/../.git" ] ; then + for dir in /bin /usr/bin /usr/local/bin; do + if [ -x "${dir}/git" ] ; then + git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git" + break + fi + done +fi if [ -n "$svnversion" ] ; then svn=`cd ${SYSDIR} && $svnversion` From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 14:55:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFBA91065672; Sun, 12 Feb 2012 14:55:27 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3DD58FC08; Sun, 12 Feb 2012 14:55:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CEtRLG089052; Sun, 12 Feb 2012 14:55:27 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CEtRNU089049; Sun, 12 Feb 2012 14:55:27 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201202121455.q1CEtRNU089049@svn.freebsd.org> From: Robert Millan Date: Sun, 12 Feb 2012 14:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231559 - in head/sys: amd64/conf conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 14:55:27 -0000 Author: rmh Date: Sun Feb 12 14:55:27 2012 New Revision: 231559 URL: http://svn.freebsd.org/changeset/base/231559 Log: Move WITHOUT_SOURCELESS_* files to sys/conf/ in order to avoid "universe" target processing them as if they were standalone kernel config files. Approved by: kib (mentor) MFC after: 5 days Added: head/sys/conf/WITHOUT_SOURCELESS - copied unchanged from r230972, head/sys/amd64/conf/WITHOUT_SOURCELESS head/sys/conf/WITHOUT_SOURCELESS_HOST - copied unchanged from r230972, head/sys/amd64/conf/WITHOUT_SOURCELESS_HOST head/sys/conf/WITHOUT_SOURCELESS_UCODE - copied unchanged from r230980, head/sys/amd64/conf/WITHOUT_SOURCELESS_UCODE Deleted: head/sys/amd64/conf/WITHOUT_SOURCELESS head/sys/amd64/conf/WITHOUT_SOURCELESS_HOST head/sys/amd64/conf/WITHOUT_SOURCELESS_UCODE head/sys/i386/conf/WITHOUT_SOURCELESS head/sys/i386/conf/WITHOUT_SOURCELESS_HOST head/sys/i386/conf/WITHOUT_SOURCELESS_UCODE Copied: head/sys/conf/WITHOUT_SOURCELESS (from r230972, head/sys/amd64/conf/WITHOUT_SOURCELESS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/WITHOUT_SOURCELESS Sun Feb 12 14:55:27 2012 (r231559, copy of r230972, head/sys/amd64/conf/WITHOUT_SOURCELESS) @@ -0,0 +1,7 @@ +# +# WITHOUT_SOURCELESS -- Disable drivers that include sourceless code. +# +# $FreeBSD$ + +include WITHOUT_SOURCELESS_HOST +include WITHOUT_SOURCELESS_UCODE Copied: head/sys/conf/WITHOUT_SOURCELESS_HOST (from r230972, head/sys/amd64/conf/WITHOUT_SOURCELESS_HOST) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/WITHOUT_SOURCELESS_HOST Sun Feb 12 14:55:27 2012 (r231559, copy of r230972, head/sys/amd64/conf/WITHOUT_SOURCELESS_HOST) @@ -0,0 +1,10 @@ +# +# WITHOUT_SOURCELESS_UCODE -- Disable drivers that include sourceless +# native code for host CPU. +# +# $FreeBSD$ + +nodevice hpt27xx +nodevice hptmv +nodevice hptrr +nodevice nve Copied: head/sys/conf/WITHOUT_SOURCELESS_UCODE (from r230980, head/sys/amd64/conf/WITHOUT_SOURCELESS_UCODE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/WITHOUT_SOURCELESS_UCODE Sun Feb 12 14:55:27 2012 (r231559, copy of r230980, head/sys/amd64/conf/WITHOUT_SOURCELESS_UCODE) @@ -0,0 +1,41 @@ +# +# WITHOUT_SOURCELESS_UCODE -- Disable drivers that include sourceless +# microcode. +# +# $FreeBSD$ + +nodevice adw +nodevice bce +nodevice fatm +nodevice fxp +nodevice ispfw +nodevice mwlfw +nodevice ralfw +nodevice runfw +nodevice sf +nodevice sn +nodevice ti +nodevice txp +nodevice ce +nodevice cp +nodevice ctau +nodevice ipwfw +nodevice iwifw +nodevice iwnfw +nodevice wpifw + +# drm +nodevice mga +nodevice r128 +nodevice radeon + +# sound +nodevice csa +nodevice ds1 +nodevice maestro3 + +# usb +nodevice rum +nodevice uath +nodevice zyd +nodevice kue From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 14:56:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8150106564A; Sun, 12 Feb 2012 14:56:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A64BB8FC15; Sun, 12 Feb 2012 14:56:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CEuV5G089119; Sun, 12 Feb 2012 14:56:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CEuVdj089117; Sun, 12 Feb 2012 14:56:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201202121456.q1CEuVdj089117@svn.freebsd.org> From: Dimitry Andric Date: Sun, 12 Feb 2012 14:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231560 - stable/9/usr.bin/rpcgen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 14:56:31 -0000 Author: dim Date: Sun Feb 12 14:56:31 2012 New Revision: 231560 URL: http://svn.freebsd.org/changeset/base/231560 Log: MFC r231054: In usr.bin/rpcgen/rpc_main.c, properly check the return value of strlcpy(), in addition to checking that of strlcat(). Modified: stable/9/usr.bin/rpcgen/rpc_main.c Directory Properties: stable/9/usr.bin/rpcgen/ (props changed) Modified: stable/9/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/9/usr.bin/rpcgen/rpc_main.c Sun Feb 12 14:55:27 2012 (r231559) +++ stable/9/usr.bin/rpcgen/rpc_main.c Sun Feb 12 14:56:31 2012 (r231560) @@ -1129,9 +1129,11 @@ parseargs(int argc, const char *argv[], if (++i == argc) { return (0); } - (void) strlcpy(pathbuf, argv[i], sizeof(pathbuf)); - if (strlcat(pathbuf, "/cpp", sizeof(pathbuf)) - >= sizeof(pathbuf)) { + if (strlcpy(pathbuf, argv[i], + sizeof(pathbuf)) >= sizeof(pathbuf) + || strlcat(pathbuf, "/cpp", + sizeof(pathbuf)) >= + sizeof(pathbuf)) { warnx("argument too long"); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 14:56:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74F6F106568A; Sun, 12 Feb 2012 14:56:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6340D8FC0C; Sun, 12 Feb 2012 14:56:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CEufUV089161; Sun, 12 Feb 2012 14:56:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CEufw3089159; Sun, 12 Feb 2012 14:56:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201202121456.q1CEufw3089159@svn.freebsd.org> From: Dimitry Andric Date: Sun, 12 Feb 2012 14:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231561 - stable/8/usr.bin/rpcgen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 14:56:41 -0000 Author: dim Date: Sun Feb 12 14:56:40 2012 New Revision: 231561 URL: http://svn.freebsd.org/changeset/base/231561 Log: MFC r231054: In usr.bin/rpcgen/rpc_main.c, properly check the return value of strlcpy(), in addition to checking that of strlcat(). Modified: stable/8/usr.bin/rpcgen/rpc_main.c Directory Properties: stable/8/usr.bin/rpcgen/ (props changed) Modified: stable/8/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/8/usr.bin/rpcgen/rpc_main.c Sun Feb 12 14:56:31 2012 (r231560) +++ stable/8/usr.bin/rpcgen/rpc_main.c Sun Feb 12 14:56:40 2012 (r231561) @@ -1129,9 +1129,11 @@ parseargs(int argc, const char *argv[], if (++i == argc) { return (0); } - (void) strlcpy(pathbuf, argv[i], sizeof(pathbuf)); - if (strlcat(pathbuf, "/cpp", sizeof(pathbuf)) - >= sizeof(pathbuf)) { + if (strlcpy(pathbuf, argv[i], + sizeof(pathbuf)) >= sizeof(pathbuf) + || strlcat(pathbuf, "/cpp", + sizeof(pathbuf)) >= + sizeof(pathbuf)) { warnx("argument too long"); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 14:56:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AABF4106564A; Sun, 12 Feb 2012 14:56:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 991548FC1E; Sun, 12 Feb 2012 14:56:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CEuoDP089202; Sun, 12 Feb 2012 14:56:50 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CEuoOs089200; Sun, 12 Feb 2012 14:56:50 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201202121456.q1CEuoOs089200@svn.freebsd.org> From: Dimitry Andric Date: Sun, 12 Feb 2012 14:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231562 - stable/7/usr.bin/rpcgen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 14:56:50 -0000 Author: dim Date: Sun Feb 12 14:56:50 2012 New Revision: 231562 URL: http://svn.freebsd.org/changeset/base/231562 Log: MFC r231054: In usr.bin/rpcgen/rpc_main.c, properly check the return value of strlcpy(), in addition to checking that of strlcat(). Modified: stable/7/usr.bin/rpcgen/rpc_main.c Directory Properties: stable/7/usr.bin/rpcgen/ (props changed) Modified: stable/7/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/7/usr.bin/rpcgen/rpc_main.c Sun Feb 12 14:56:40 2012 (r231561) +++ stable/7/usr.bin/rpcgen/rpc_main.c Sun Feb 12 14:56:50 2012 (r231562) @@ -1129,9 +1129,11 @@ parseargs(int argc, const char *argv[], if (++i == argc) { return (0); } - (void) strlcpy(pathbuf, argv[i], sizeof(pathbuf)); - if (strlcat(pathbuf, "/cpp", sizeof(pathbuf)) - >= sizeof(pathbuf)) { + if (strlcpy(pathbuf, argv[i], + sizeof(pathbuf)) >= sizeof(pathbuf) + || strlcat(pathbuf, "/cpp", + sizeof(pathbuf)) >= + sizeof(pathbuf)) { warnx("argument too long"); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 14:58:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAE531065672; Sun, 12 Feb 2012 14:58:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99F888FC0C; Sun, 12 Feb 2012 14:58:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CEwots089306; Sun, 12 Feb 2012 14:58:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CEwoJS089303; Sun, 12 Feb 2012 14:58:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201202121458.q1CEwoJS089303@svn.freebsd.org> From: Andriy Gapon Date: Sun, 12 Feb 2012 14:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231563 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 14:58:50 -0000 Author: avg Date: Sun Feb 12 14:58:50 2012 New Revision: 231563 URL: http://svn.freebsd.org/changeset/base/231563 Log: start watchdogd before most of other daemons/servers The main benefit is that watchdogd would shutdown after most of other daemons/servers and thus, for example, would remedy a system hang caused by unlucky X server shutdown. Reviewed by: dougb (earlier version) MFC after: 2 weeks Modified: head/etc/rc.d/SERVERS head/etc/rc.d/watchdogd Modified: head/etc/rc.d/SERVERS ============================================================================== --- head/etc/rc.d/SERVERS Sun Feb 12 14:56:50 2012 (r231562) +++ head/etc/rc.d/SERVERS Sun Feb 12 14:58:50 2012 (r231563) @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig savecore +# REQUIRE: mountcritremote abi ldconfig savecore watchdogd # This is a dummy dependency, for early-start servers relying on # some basic configuration. Modified: head/etc/rc.d/watchdogd ============================================================================== --- head/etc/rc.d/watchdogd Sun Feb 12 14:56:50 2012 (r231562) +++ head/etc/rc.d/watchdogd Sun Feb 12 14:58:50 2012 (r231563) @@ -28,7 +28,7 @@ # # PROVIDE: watchdogd -# REQUIRE: DAEMON cleanvar +# REQUIRE: FILESYSTEMS cleanvar syslogd # KEYWORD: nojail shutdown . /etc/rc.subr From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 16:43:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 824C21065674; Sun, 12 Feb 2012 16:43:29 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1E2848FC08; Sun, 12 Feb 2012 16:43:28 +0000 (UTC) Received: by iaeo4 with SMTP id o4so3721558iae.13 for ; Sun, 12 Feb 2012 08:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=mDqSARexVluEG9V/uYNjEfA4I/bvrIX+/eSWQKb+cYM=; b=Tb5K1ETZd50ra30HfA5GtOc50SVGZAYk6K0BxKoVOT/FqKjHtaeZuZJGAgR8UFWvWh c/wP3wAwTPBAu05441GNiE8EbqxsvGqz+vDn2+JEY4ZOj3VxXnZY6sr5GXA4ROeF5tN/ 8TQ/vThwFFy9UtCVgQs/24YTZRc+bLlu96d44= MIME-Version: 1.0 Received: by 10.50.178.65 with SMTP id cw1mr22558116igc.16.1329065008585; Sun, 12 Feb 2012 08:43:28 -0800 (PST) Sender: rmh.aybabtu@gmail.com Received: by 10.43.130.201 with HTTP; Sun, 12 Feb 2012 08:43:28 -0800 (PST) In-Reply-To: <4F2CFEE3.6070306@daemonic.se> References: <201202040054.q140siBP012241@svn.freebsd.org> <4F2CFEE3.6070306@daemonic.se> Date: Sun, 12 Feb 2012 16:43:28 +0000 X-Google-Sender-Auth: KxJ6sll-kNDsbL5YieCpewONut8 Message-ID: From: Robert Millan To: Niclas Zeising Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Kostik Belousov , svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd Subject: Re: svn commit: r230972 - in head: share/mk sys/amd64/conf sys/i386/conf sys/modules sys/modules/drm sys/modules/sound/driver sys/modules/usb tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 16:43:29 -0000 El 4 de febrer de 2012 9:48, Niclas Zeising ha escrit= : >> +++ head/sys/amd64/conf/WITHOUT_SOURCELESS_HOST =C2=A0 =C2=A0 =C2=A0 Sat= Feb =C2=A04 00:54:43 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r230972) >> @@ -0,0 +1,10 @@ >> +# >> +# WITHOUT_SOURCELESS_UCODE -- Disable drivers that include sourceless > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0^^^^^ > This seems like a typo. Shouldn't it read HOST instead? Oops, yes of course. Thanks for pointing it out. > Also, can you please regenerate the src.conf manual page? Sure. But as I've never done this before, I don't know the right way to do this. Is it: cd /usr/src/tools/build/options && ./makeman > ../../../share/man/man5/src.conf.5 ? I notice that this command replaces "from FreeBSD" lines with $FreeBSD$. I'm not sure if this is a problem: -.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS 183242 2008-09-21 22:02:26Z sam +.\" $FreeBSD$ From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 16:53:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7A3A1065709; Sun, 12 Feb 2012 16:53:47 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 712BB8FC19; Sun, 12 Feb 2012 16:53:47 +0000 (UTC) Received: by iaeo4 with SMTP id o4so3733537iae.13 for ; Sun, 12 Feb 2012 08:53:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WWfzBG+s7/VAaPy+nmqe7k+lE/feC9vGyUQMJj/hyNM=; b=SKGq3MLSHOl8yymZJ26pJ1IBgEYamSu5tXpXGF8inp1uNmynRE72M9BCxVqbdWT3Qb vzbhTMK6INDRRs7P2VU3jVX5YpVXej9LLnYAdxvh8DcnYNq++SxcsLQZNmgKh9pI4Vda v2wK8RfwAOZiSO/4m8CJY5p0555sLx8M+0Rc4= MIME-Version: 1.0 Received: by 10.50.178.65 with SMTP id cw1mr22590485igc.16.1329065626228; Sun, 12 Feb 2012 08:53:46 -0800 (PST) Sender: rmh.aybabtu@gmail.com Received: by 10.43.130.201 with HTTP; Sun, 12 Feb 2012 08:53:46 -0800 (PST) In-Reply-To: <201202061248.43744.jkim@FreeBSD.org> References: <201202040054.q140siBP012241@svn.freebsd.org> <201202061248.43744.jkim@FreeBSD.org> Date: Sun, 12 Feb 2012 16:53:46 +0000 X-Google-Sender-Auth: oBvmsk93oX1zCgKMZsXayd8Ayps Message-ID: From: Robert Millan To: Jung-uk Kim Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , Kostik Belousov , "svn-src-all@freebsd.org" , src-committers@freebsd.org, Adrian Chadd Subject: Re: svn commit: r230972 - in head: share/mk sys/amd64/conf sys/i386/conf sys/modules sys/modules/drm sys/modules/sound/driver sys/modules/usb tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 16:53:47 -0000 El 6 de febrer de 2012 17:48, Jung-uk Kim ha escrit: > On Friday 03 February 2012 07:54 pm, Robert Millan wrote: >> +nodevice =C2=A0 =C2=A0 =C2=A0 ti > > Tigon 1 and 2 had open-sourced firmware. =C2=A0In fact, I believe wpaul > developed custom firmware for FreeBSD and the (early?) sources are > still available here: > > http://people.freebsd.org/~wpaul/Alteon/ Well, there's always source somewhere. I just noticed that some of my original intent of this MK knob was blurred when renaming to "MK_SOURCELESS". The part that is relevant to me (I don't know about others, just talking for myself here!) is whether a driver is completely built from source or if a chunk of binary bytes (either uuencode'd or as a C array) is used instead. But of course if source is available we could avoid this debate by just integrating it into the tree :-). Is this something that would be desireable in FreeBSD? I notice there's something similar already (sys/dev/aic7xxx/aicasm). Btw, which would be the appropiate list to discuss this? freebsd-arch? From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 17:44:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 171F71065673; Sun, 12 Feb 2012 17:44:41 +0000 (UTC) (envelope-from zeising@daemonic.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6228FC13; Sun, 12 Feb 2012 17:44:40 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id A8BEB40002; Sun, 12 Feb 2012 18:44:38 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 9DD8340006; Sun, 12 Feb 2012 18:44:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (mx.daemonic.se [IPv6:2001:470:dca9:0:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 9473B40002; Sun, 12 Feb 2012 18:44:37 +0100 (CET) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 2830C119C1B; Sun, 12 Feb 2012 18:44:37 +0100 (CET) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([IPv6:2001:470:dca9:0:1::3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [2001:470:dca9:0:1::6]) (amavisd-new, port 10025) with ESMTPS id uBDFuAvlRkHZ; Sun, 12 Feb 2012 18:44:34 +0100 (CET) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2001:470:dca9:0:1::4]) by mx.daemonic.se (Postfix) with ESMTPS id B547A119C17; Sun, 12 Feb 2012 18:44:34 +0100 (CET) Received: from [IPv6:2001:470:dca9:1::4] (vivi.daemonic.se [IPv6:2001:470:dca9:1::4]) by mail.daemonic.se (Postfix) with ESMTPSA id 9DABA12B20D; Sun, 12 Feb 2012 18:44:34 +0100 (CET) Message-ID: <4F37FA7D.4070808@daemonic.se> Date: Sun, 12 Feb 2012 18:44:29 +0100 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Robert Millan References: <201202040054.q140siBP012241@svn.freebsd.org> <4F2CFEE3.6070306@daemonic.se> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: svn-src-head@freebsd.org, Kostik Belousov , svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd Subject: Re: svn commit: r230972 - in head: share/mk sys/amd64/conf sys/i386/conf sys/modules sys/modules/drm sys/modules/sound/driver sys/modules/usb tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 17:44:41 -0000 On 2012-02-12 17:43, Robert Millan wrote: > El 4 de febrer de 2012 9:48, Niclas Zeising ha escrit: >>> +++ head/sys/amd64/conf/WITHOUT_SOURCELESS_HOST Sat Feb 4 00:54:43 2012 (r230972) >>> @@ -0,0 +1,10 @@ >>> +# >>> +# WITHOUT_SOURCELESS_UCODE -- Disable drivers that include sourceless >> ^^^^^ >> This seems like a typo. Shouldn't it read HOST instead? > > Oops, yes of course. Thanks for pointing it out. > >> Also, can you please regenerate the src.conf manual page? > > Sure. But as I've never done this before, I don't know the right way > to do this. Is it: > > cd /usr/src/tools/build/options && ./makeman > > ../../../share/man/man5/src.conf.5 > > ? > > I notice that this command replaces "from FreeBSD" lines with > $FreeBSD$. I'm not sure if this is a problem: > > -.\" from FreeBSD: head/tools/build/options/WITHOUT_WIRELESS 183242 > 2008-09-21 22:02:26Z sam > +.\" $FreeBSD$ I am not 100% sure about how makeman works, but something akin to what you described above seems right. I think the change in the FreeBSD: line depends on if you do it from a svn repo or from a repo updated using cvsup or similar. With that said, I think dim@ already has regenerated src.conf for you, and commited it. Have a look at r231055 Regards! -- Niclas From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 18:29:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A6A61065674; Sun, 12 Feb 2012 18:29:57 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 804858FC0A; Sun, 12 Feb 2012 18:29:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CITvuM096018; Sun, 12 Feb 2012 18:29:57 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CITu63095981; Sun, 12 Feb 2012 18:29:56 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201202121829.q1CITu63095981@svn.freebsd.org> From: Ed Schouten Date: Sun, 12 Feb 2012 18:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231564 - in head: lib/libc/db/man lib/libc/gen lib/libc/net lib/libc/rpc lib/libc/sys lib/libcam lib/libdevstat lib/libradius sbin/bsdlabel sbin/newfs_msdos share/man/man4 share/man/ma... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 18:29:57 -0000 Author: ed Date: Sun Feb 12 18:29:56 2012 New Revision: 231564 URL: http://svn.freebsd.org/changeset/base/231564 Log: Globally replace u_int*_t from (non-contributed) man pages. The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write new code that uses the non-standard types. I am not going to bump the man page dates, as these changes can be considered style nits. The meaning of the man pages is unaffected. MFC after: 1 month Modified: head/lib/libc/db/man/hash.3 head/lib/libc/gen/arc4random.3 head/lib/libc/net/nsdispatch.3 head/lib/libc/rpc/rpc.3 head/lib/libc/rpc/rpc_clnt_create.3 head/lib/libc/sys/getdirentries.2 head/lib/libc/sys/jail.2 head/lib/libc/sys/nfssvc.2 head/lib/libcam/cam.3 head/lib/libcam/cam_cdbparse.3 head/lib/libdevstat/devstat.3 head/lib/libradius/libradius.3 head/sbin/bsdlabel/bsdlabel.8 head/sbin/newfs_msdos/newfs_msdos.8 head/share/man/man4/agp.4 head/share/man/man4/icmp6.4 head/share/man/man4/ip6.4 head/share/man/man4/mem.4 head/share/man/man4/mtio.4 head/share/man/man4/natm.4 head/share/man/man4/net80211.4 head/share/man/man4/ng_async.4 head/share/man/man4/ng_bridge.4 head/share/man/man4/ng_btsocket.4 head/share/man/man4/ng_car.4 head/share/man/man4/ng_ccatm.4 head/share/man/man4/ng_cisco.4 head/share/man/man4/ng_etf.4 head/share/man/man4/ng_hci.4 head/share/man/man4/ng_l2cap.4 head/share/man/man4/ng_l2tp.4 head/share/man/man4/ng_mppc.4 head/share/man/man4/ng_netflow.4 head/share/man/man4/ng_one2many.4 head/share/man/man4/ng_ppp.4 head/share/man/man4/ng_pppoe.4 head/share/man/man4/ng_pptpgre.4 head/share/man/man4/ppi.4 head/share/man/man5/fs.5 head/share/man/man9/MD5.9 head/share/man/man9/bios.9 head/share/man/man9/bus_space.9 head/share/man/man9/crypto.9 head/share/man/man9/device_set_flags.9 head/share/man/man9/devstat.9 head/share/man/man9/eventtimers.9 head/share/man/man9/get_cyclecount.9 head/share/man/man9/mbchain.9 head/share/man/man9/mbuf_tags.9 head/share/man/man9/mdchain.9 head/share/man/man9/netisr.9 head/share/man/man9/random.9 head/share/man/man9/rijndael.9 head/share/man/man9/zone.9 head/usr.bin/m4/lib/ohash_interval.3 head/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 Modified: head/lib/libc/db/man/hash.3 ============================================================================== --- head/lib/libc/db/man/hash.3 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libc/db/man/hash.3 Sun Feb 12 18:29:56 2012 (r231564) @@ -65,7 +65,7 @@ typedef struct { u_int ffactor; u_int nelem; u_int cachesize; - u_int32_t (*hash)(const void *, size_t); + uint32_t (*hash)(const void *, size_t); int lorder; } HASHINFO; .Ed Modified: head/lib/libc/gen/arc4random.3 ============================================================================== --- head/lib/libc/gen/arc4random.3 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libc/gen/arc4random.3 Sun Feb 12 18:29:56 2012 (r231564) @@ -44,12 +44,12 @@ .Lb libc .Sh SYNOPSIS .In stdlib.h -.Ft u_int32_t +.Ft uint32_t .Fn arc4random "void" .Ft void .Fn arc4random_buf "void *buf" "size_t nbytes" -.Ft u_int32_t -.Fn arc4random_uniform "u_int32_t upper_bound" +.Ft uint32_t +.Fn arc4random_uniform "uint32_t upper_bound" .Ft void .Fn arc4random_stir "void" .Ft void Modified: head/lib/libc/net/nsdispatch.3 ============================================================================== --- head/lib/libc/net/nsdispatch.3 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libc/net/nsdispatch.3 Sun Feb 12 18:29:56 2012 (r231564) @@ -129,7 +129,7 @@ structures, which have the following for .Bd -literal -offset indent typedef struct _ns_src { const char *src; - u_int32_t flags; + uint32_t flags; } ns_src; .Ed .Bd -ragged -offset indent Modified: head/lib/libc/rpc/rpc.3 ============================================================================== --- head/lib/libc/rpc/rpc.3 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libc/rpc/rpc.3 Sun Feb 12 18:29:56 2012 (r231564) @@ -119,12 +119,12 @@ file. .Sh Derived Types The derived types used in the RPC interfaces are defined as follows: .Bd -literal - typedef u_int32_t rpcprog_t; - typedef u_int32_t rpcvers_t; - typedef u_int32_t rpcproc_t; - typedef u_int32_t rpcprot_t; - typedef u_int32_t rpcport_t; - typedef int32_t rpc_inline_t; + typedef uint32_t rpcprog_t; + typedef uint32_t rpcvers_t; + typedef uint32_t rpcproc_t; + typedef uint32_t rpcprot_t; + typedef uint32_t rpcport_t; + typedef int32_t rpc_inline_t; .Ed .Sh "Data Structures" Some of the data structures used by the Modified: head/lib/libc/rpc/rpc_clnt_create.3 ============================================================================== --- head/lib/libc/rpc/rpc_clnt_create.3 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libc/rpc/rpc_clnt_create.3 Sun Feb 12 18:29:56 2012 (r231564) @@ -106,10 +106,10 @@ Set the timeout argument to 0 for batchi .It Dv CLGET_FD Ta "int *" Ta "get fd from handle" .It Dv CLSET_FD_CLOSE Ta "void" Ta "close fd on destroy" .It Dv CLSET_FD_NCLOSE Ta void Ta "do not close fd on destroy" -.It Dv CLGET_VERS Ta "u_int32_t *" Ta "get RPC program version" -.It Dv CLSET_VERS Ta "u_int32_t *" Ta "set RPC program version" -.It Dv CLGET_XID Ta "u_int32_t *" Ta "get XID of previous call" -.It Dv CLSET_XID Ta "u_int32_t *" Ta "set XID of next call" +.It Dv CLGET_VERS Ta "uint32_t *" Ta "get RPC program version" +.It Dv CLSET_VERS Ta "uint32_t *" Ta "set RPC program version" +.It Dv CLGET_XID Ta "uint32_t *" Ta "get XID of previous call" +.It Dv CLSET_XID Ta "uint32_t *" Ta "set XID of next call" .El .Pp The following operations are valid for connectionless transports only: Modified: head/lib/libc/sys/getdirentries.2 ============================================================================== --- head/lib/libc/sys/getdirentries.2 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libc/sys/getdirentries.2 Sun Feb 12 18:29:56 2012 (r231564) @@ -71,10 +71,10 @@ The data in the buffer is a series of .Vt dirent structures each containing the following entries: .Bd -literal -offset indent -u_int32_t d_fileno; -u_int16_t d_reclen; -u_int8_t d_type; -u_int8_t d_namlen; +uint32_t d_fileno; +uint16_t d_reclen; +uint8_t d_type; +uint8_t d_namlen; char d_name[MAXNAMELEN + 1]; /* see below */ .Ed .Pp Modified: head/lib/libc/sys/jail.2 ============================================================================== --- head/lib/libc/sys/jail.2 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libc/sys/jail.2 Sun Feb 12 18:29:56 2012 (r231564) @@ -59,7 +59,7 @@ system call sets up a jail and locks the The argument is a pointer to a structure describing the prison: .Bd -literal -offset indent struct jail { - u_int32_t version; + uint32_t version; char *path; char *hostname; char *jailname; Modified: head/lib/libc/sys/nfssvc.2 ============================================================================== --- head/lib/libc/sys/nfssvc.2 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libc/sys/nfssvc.2 Sun Feb 12 18:29:56 2012 (r231564) @@ -143,14 +143,14 @@ and a pointer to a struct nfsd_srvargs { struct nfsd *nsd_nfsd; /* Pointer to in kernel nfsd struct */ uid_t nsd_uid; /* Effective uid mapped to cred */ - u_int32_t nsd_haddr; /* Ip address of client */ + uint32_t nsd_haddr; /* Ip address of client */ struct ucred nsd_cr; /* Cred. uid maps to */ int nsd_authlen; /* Length of auth string (ret) */ u_char *nsd_authstr; /* Auth string (ret) */ int nsd_verflen; /* and the verifier */ u_char *nsd_verfstr; struct timeval nsd_timestamp; /* timestamp from verifier */ - u_int32_t nsd_ttl; /* credential ttl (sec) */ + uint32_t nsd_ttl; /* credential ttl (sec) */ NFSKERBKEY_T nsd_key; /* Session key */ }; .Ed Modified: head/lib/libcam/cam.3 ============================================================================== --- head/lib/libcam/cam.3 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libcam/cam.3 Sun Feb 12 18:29:56 2012 (r231564) @@ -145,7 +145,7 @@ struct cam_device { * Device name given by * the user. */ - u_int32_t given_unit_number; /* + uint32_t given_unit_number; /* * Unit number given by * the user. */ @@ -153,7 +153,7 @@ struct cam_device { * Name of the device, * e.g. 'pass' */ - u_int32_t dev_unit_num; /* Unit number of the passthrough + uint32_t dev_unit_num; /* Unit number of the passthrough * device associated with this * particular device. */ @@ -161,18 +161,18 @@ struct cam_device { char sim_name[SIM_IDLEN+1];/* * Controller name, e.g.'ahc' */ - u_int32_t sim_unit_number; /* Controller unit number */ - u_int32_t bus_id; /* Controller bus number */ + uint32_t sim_unit_number; /* Controller unit number */ + uint32_t bus_id; /* Controller bus number */ lun_id_t target_lun; /* Logical Unit Number */ target_id_t target_id; /* Target ID */ path_id_t path_id; /* System SCSI bus number */ - u_int16_t pd_type; /* type of peripheral device */ + uint16_t pd_type; /* type of peripheral device */ struct scsi_inquiry_data inq_data; /* SCSI Inquiry data */ - u_int8_t serial_num[252]; /* device serial number */ - u_int8_t serial_num_len; /* length of the serial number */ - u_int8_t sync_period; /* Negotiated sync period */ - u_int8_t sync_offset; /* Negotiated sync offset */ - u_int8_t bus_width; /* Negotiated bus width */ + uint8_t serial_num[252]; /* device serial number */ + uint8_t serial_num_len; /* length of the serial number */ + uint8_t sync_period; /* Negotiated sync period */ + uint8_t sync_offset; /* Negotiated sync offset */ + uint8_t bus_width; /* Negotiated bus width */ int fd; /* file descriptor for device */ }; .Ed Modified: head/lib/libcam/cam_cdbparse.3 ============================================================================== --- head/lib/libcam/cam_cdbparse.3 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libcam/cam_cdbparse.3 Sun Feb 12 18:29:56 2012 (r231564) @@ -83,9 +83,9 @@ .Ft int .Fo csio_build .Fa "struct ccb_scsiio *csio" -.Fa "u_int8_t *data_ptr" -.Fa "u_int32_t dxfer_len" -.Fa "u_int32_t flags" +.Fa "uint8_t *data_ptr" +.Fa "uint32_t dxfer_len" +.Fa "uint32_t flags" .Fa "int retry_count" .Fa "int timeout" .Fa "const char *cmd_spec" @@ -94,9 +94,9 @@ .Ft int .Fo csio_build_visit .Fa "struct ccb_scsiio *csio" -.Fa "u_int8_t *data_ptr" -.Fa "u_int32_t dxfer_len" -.Fa "u_int32_t flags" +.Fa "uint8_t *data_ptr" +.Fa "uint32_t dxfer_len" +.Fa "uint32_t flags" .Fa "int retry_count" .Fa "int timeout" .Fa "const char *cmd_spec" @@ -122,14 +122,14 @@ .Fc .Ft int .Fo buff_decode -.Fa "u_int8_t *buff" +.Fa "uint8_t *buff" .Fa "size_t len" .Fa "const char *fmt" .Fa "..." .Fc .Ft int .Fo buff_decode_visit -.Fa "u_int8_t *buff" +.Fa "uint8_t *buff" .Fa "size_t len" .Fa "const char *fmt" .Fa "void (*arg_put)(void *, int, void *, int, char *)" @@ -150,7 +150,7 @@ .Fc .Ft int .Fo buff_encode_visit -.Fa "u_int8_t *buff" +.Fa "uint8_t *buff" .Fa "size_t len" .Fa "const char *fmt" .Fa "int (*arg_get)(void *hook, char *field_name)" Modified: head/lib/libdevstat/devstat.3 ============================================================================== --- head/lib/libdevstat/devstat.3 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libdevstat/devstat.3 Sun Feb 12 18:29:56 2012 (r231564) @@ -193,7 +193,7 @@ subelement contains the following elemen .Bd -literal -offset indent struct devinfo { struct devstat *devices; - u_int8_t *mem_ptr; + uint8_t *mem_ptr; long generation; int numdevs; }; @@ -472,7 +472,7 @@ structure to calculate statistics over For each statistics to be calculated, the user should supply the proper enumerated type (listed below), and a variable of the indicated type. All statistics are either integer values, for which a -.Vt u_int64_t +.Vt uint64_t is used, or floating point, for which a .Vt "long double" @@ -489,7 +489,7 @@ be the last argument passed to It is an argument list terminator. .It Dv DSM_TOTAL_BYTES type: -.Vt "u_int64_t *" +.Vt "uint64_t *" .Pp The total number of bytes transferred between the acquisition of .Fa previous @@ -499,7 +499,7 @@ and .It Dv DSM_TOTAL_BYTES_WRITE .It Dv DSM_TOTAL_BYTES_FREE type: -.Vt "u_int64_t *" +.Vt "uint64_t *" .Pp The total number of bytes in transactions of the specified type between the acquisition of @@ -508,7 +508,7 @@ and .Fa current . .It Dv DSM_TOTAL_TRANSFERS type: -.Vt "u_int64_t *" +.Vt "uint64_t *" .Pp The total number of transfers between the acquisition of .Fa previous @@ -519,7 +519,7 @@ and .It Dv DSM_TOTAL_TRANSFERS_WRITE .It Dv DSM_TOTAL_TRANSFERS_FREE type: -.Vt "u_int64_t *" +.Vt "uint64_t *" .Pp The total number of transactions of the specified type between the acquisition of @@ -528,7 +528,7 @@ and .Fa current . .It Dv DSM_TOTAL_BLOCKS type: -.Vt "u_int64_t *" +.Vt "uint64_t *" .Pp The total number of blocks transferred between the acquisition of .Fa previous @@ -541,7 +541,7 @@ blocksize of 512 bytes will be used in t .It Dv DSM_TOTAL_BLOCKS_WRITE .It Dv DSM_TOTAL_BLOCKS_FREE type: -.Vt "u_int64_t *" +.Vt "uint64_t *" .Pp The total number of blocks of the specified type between the acquisition of .Fa previous @@ -665,7 +665,7 @@ and .Fa current . .It Dv DSM_QUEUE_LENGTH type: -.Vt "u_int64_t *" +.Vt "uint64_t *" .Pp The number of not yet completed transactions at the time when .Fa current Modified: head/lib/libradius/libradius.3 ============================================================================== --- head/lib/libradius/libradius.3 Sun Feb 12 14:58:50 2012 (r231563) +++ head/lib/libradius/libradius.3 Sun Feb 12 18:29:56 2012 (r231564) @@ -51,14 +51,14 @@ .Fn rad_create_response "struct rad_handle *h" "int code" .Ft "struct in_addr" .Fn rad_cvt_addr "const void *data" -.Ft u_int32_t +.Ft uint32_t .Fn rad_cvt_int "const void *data" .Ft char * .Fn rad_cvt_string "const void *data" "size_t len" .Ft int .Fn rad_get_attr "struct rad_handle *h" "const void **data" "size_t *len" .Ft int -.Fn rad_get_vendor_attr "u_int32_t *vendor" "const void **data" "size_t *len" +.Fn rad_get_vendor_attr "uint32_t *vendor" "const void **data" "size_t *len" .Ft int .Fn rad_init_send_request "struct rad_handle *h" "int *fd" "struct timeval *tv" .Ft int @@ -66,7 +66,7 @@ .Ft int .Fn rad_put_attr "struct rad_handle *h" "int type" "const void *data" "size_t len" .Ft int -.Fn rad_put_int "struct rad_handle *h" "int type" "u_int32_t value" +.Fn rad_put_int "struct rad_handle *h" "int type" "uint32_t value" .Ft int .Fn rad_put_string "struct rad_handle *h" "int type" "const char *str" .Ft int @@ -76,7 +76,7 @@ .Ft int .Fn rad_put_vendor_attr "struct rad_handle *h" "int vendor" "int type" "const void *data" "size_t len" .Ft int -.Fn rad_put_vendor_int "struct rad_handle *h" "int vendor" "int type" "u_int32_t value" +.Fn rad_put_vendor_int "struct rad_handle *h" "int vendor" "int type" "uint32_t value" .Ft int .Fn rad_put_vendor_string "struct rad_handle *h" "int vendor" "int type" "const char *str" .Ft ssize_t Modified: head/sbin/bsdlabel/bsdlabel.8 ============================================================================== --- head/sbin/bsdlabel/bsdlabel.8 Sun Feb 12 14:58:50 2012 (r231563) +++ head/sbin/bsdlabel/bsdlabel.8 Sun Feb 12 18:29:56 2012 (r231564) @@ -475,7 +475,7 @@ The kernel device drivers will not allow to be decreased or the offset of a partition to be changed while it is open. .Sh COMPATIBILITY Due to the use of an -.Vt u_int32_t +.Vt uint32_t to store the number of sectors, .Bx labels are restricted to a maximum of 2^32-1 sectors. Modified: head/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.8 Sun Feb 12 14:58:50 2012 (r231563) +++ head/sbin/newfs_msdos/newfs_msdos.8 Sun Feb 12 18:29:56 2012 (r231564) @@ -180,27 +180,27 @@ For reference purposes, this structure i below. .Bd -literal struct bsbpb { - u_int16_t bpbBytesPerSec; /* [-S] bytes per sector */ - u_int8_t bpbSecPerClust; /* [-c] sectors per cluster */ - u_int16_t bpbResSectors; /* [-r] reserved sectors */ - u_int8_t bpbFATs; /* [-n] number of FATs */ - u_int16_t bpbRootDirEnts; /* [-e] root directory entries */ - u_int16_t bpbSectors; /* [-s] total sectors */ - u_int8_t bpbMedia; /* [-m] media descriptor */ - u_int16_t bpbFATsecs; /* [-a] sectors per FAT */ - u_int16_t bpbSecPerTrack; /* [-u] sectors per track */ - u_int16_t bpbHeads; /* [-h] drive heads */ - u_int32_t bpbHiddenSecs; /* [-o] hidden sectors */ - u_int32_t bpbHugeSectors; /* [-s] big total sectors */ + uint16_t bpbBytesPerSec; /* [-S] bytes per sector */ + uint8_t bpbSecPerClust; /* [-c] sectors per cluster */ + uint16_t bpbResSectors; /* [-r] reserved sectors */ + uint8_t bpbFATs; /* [-n] number of FATs */ + uint16_t bpbRootDirEnts; /* [-e] root directory entries */ + uint16_t bpbSectors; /* [-s] total sectors */ + uint8_t bpbMedia; /* [-m] media descriptor */ + uint16_t bpbFATsecs; /* [-a] sectors per FAT */ + uint16_t bpbSecPerTrack; /* [-u] sectors per track */ + uint16_t bpbHeads; /* [-h] drive heads */ + uint32_t bpbHiddenSecs; /* [-o] hidden sectors */ + uint32_t bpbHugeSectors; /* [-s] big total sectors */ }; /* FAT32 extensions */ struct bsxbpb { - u_int32_t bpbBigFATsecs; /* [-a] big sectors per FAT */ - u_int16_t bpbExtFlags; /* control flags */ - u_int16_t bpbFSVers; /* file system version */ - u_int32_t bpbRootClust; /* root directory start cluster */ - u_int16_t bpbFSInfo; /* [-i] file system info sector */ - u_int16_t bpbBackup; /* [-k] backup boot sector */ + uint32_t bpbBigFATsecs; /* [-a] big sectors per FAT */ + uint16_t bpbExtFlags; /* control flags */ + uint16_t bpbFSVers; /* file system version */ + uint32_t bpbRootClust; /* root directory start cluster */ + uint16_t bpbFSInfo; /* [-i] file system info sector */ + uint16_t bpbBackup; /* [-k] backup boot sector */ }; .Ed .Sh LIMITATION Modified: head/share/man/man4/agp.4 ============================================================================== --- head/share/man/man4/agp.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/agp.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -80,8 +80,8 @@ The result is a pointer to the following .Bd -literal typedef struct _agp_info { agp_version version; /* version of the driver */ - u_int32_t bridge_id; /* bridge vendor/device */ - u_int32_t agp_mode; /* mode info of bridge */ + uint32_t bridge_id; /* bridge vendor/device */ + uint32_t agp_mode; /* mode info of bridge */ off_t aper_base; /* base of aperture */ size_t aper_size; /* size of aperture */ size_t pg_total; /* max pages (swap + system) */ @@ -105,7 +105,7 @@ This takes the following structure: .Bd -literal typedef struct _agp_setup { - u_int32_t agp_mode; /* mode info of bridge */ + uint32_t agp_mode; /* mode info of bridge */ } agp_setup; .Ed .Pp @@ -120,8 +120,8 @@ takes the following structure: typedef struct _agp_allocate { int key; /* tag of allocation */ size_t pg_count; /* number of pages */ - u_int32_t type; /* 0 == normal, other devspec */ - u_int32_t physical; /* device specific (some devices + uint32_t type; /* 0 == normal, other devspec */ + uint32_t physical; /* device specific (some devices * need a phys address of the * actual page behind the gatt * table) */ @@ -159,7 +159,7 @@ takes the following structure: .Bd -literal typedef struct _agp_unbind { int key; /* tag of allocation */ - u_int32_t priority; /* priority for paging out */ + uint32_t priority; /* priority for paging out */ } agp_unbind; .Ed .El Modified: head/share/man/man4/icmp6.4 ============================================================================== --- head/share/man/man4/icmp6.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/icmp6.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -140,13 +140,13 @@ This header corresponds to the structure and has the following definition: .Bd -literal -offset indent struct icmp6_hdr { - u_int8_t icmp6_type; /* type field */ - u_int8_t icmp6_code; /* code field */ - u_int16_t icmp6_cksum; /* checksum field */ + uint8_t icmp6_type; /* type field */ + uint8_t icmp6_code; /* code field */ + uint16_t icmp6_cksum; /* checksum field */ union { - u_int32_t icmp6_un_data32[1]; /* type-specific */ - u_int16_t icmp6_un_data16[2]; /* type-specific */ - u_int8_t icmp6_un_data8[4]; /* type-specific */ + uint32_t icmp6_un_data32[1]; /* type-specific */ + uint16_t icmp6_un_data16[2]; /* type-specific */ + uint8_t icmp6_un_data8[4]; /* type-specific */ } icmp6_dataun; } __packed; Modified: head/share/man/man4/ip6.4 ============================================================================== --- head/share/man/man4/ip6.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ip6.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -75,12 +75,12 @@ The header has the following definition: struct ip6_hdr { union { struct ip6_hdrctl { - u_int32_t ip6_un1_flow; /* 20 bits of flow ID */ - u_int16_t ip6_un1_plen; /* payload length */ - u_int8_t ip6_un1_nxt; /* next header */ - u_int8_t ip6_un1_hlim; /* hop limit */ + uint32_t ip6_un1_flow; /* 20 bits of flow ID */ + uint16_t ip6_un1_plen; /* payload length */ + uint8_t ip6_un1_nxt; /* next header */ + uint8_t ip6_un1_hlim; /* hop limit */ } ip6_un1; - u_int8_t ip6_un2_vfc; /* version and class */ + uint8_t ip6_un2_vfc; /* version and class */ } ip6_ctlun; struct in6_addr ip6_src; /* source address */ struct in6_addr ip6_dst; /* destination address */ @@ -121,8 +121,8 @@ The IPv6 header may be followed by any n with the following generic definition: .Bd -literal -offset indent struct ip6_ext { - u_int8_t ip6e_nxt; - u_int8_t ip6e_len; + uint8_t ip6e_nxt; + uint8_t ip6e_len; } __packed; .Ed .Ss Options @@ -281,8 +281,8 @@ The option is stored in the following st returned: .Bd -literal struct ip6_hbh { - u_int8_t ip6h_nxt; /* next header */ - u_int8_t ip6h_len; /* length in units of 8 octets */ + uint8_t ip6h_nxt; /* next header */ + uint8_t ip6h_len; /* length in units of 8 octets */ /* followed by options */ } __packed; .Ed @@ -301,8 +301,8 @@ The option is stored in the following st returned: .Bd -literal struct ip6_dest { - u_int8_t ip6d_nxt; /* next header */ - u_int8_t ip6d_len; /* length in units of 8 octets */ + uint8_t ip6d_nxt; /* next header */ + uint8_t ip6d_len; /* length in units of 8 octets */ /* followed by options */ } __packed; .Ed @@ -333,10 +333,10 @@ The header is stored in the following st returned: .Bd -literal struct ip6_rthdr { - u_int8_t ip6r_nxt; /* next header */ - u_int8_t ip6r_len; /* length in units of 8 octets */ - u_int8_t ip6r_type; /* routing type */ - u_int8_t ip6r_segleft; /* segments left */ + uint8_t ip6r_nxt; /* next header */ + uint8_t ip6r_len; /* length in units of 8 octets */ + uint8_t ip6r_type; /* routing type */ + uint8_t ip6r_segleft; /* segments left */ /* followed by routing-type-specific data */ } __packed; .Ed Modified: head/share/man/man4/mem.4 ============================================================================== --- head/share/man/man4/mem.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/mem.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -101,8 +101,8 @@ The region cannot be written to. Memory ranges are described by .Vt struct mem_range_desc : .Bd -literal -offset indent -u_int64_t mr_base; /\(** physical base address \(**/ -u_int64_t mr_len; /\(** physical length of region \(**/ +uint64_t mr_base; /\(** physical base address \(**/ +uint64_t mr_len; /\(** physical length of region \(**/ int mr_flags; /\(** attributes of region \(**/ char mr_owner[8]; .Ed Modified: head/share/man/man4/mtio.4 ============================================================================== --- head/share/man/man4/mtio.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/mtio.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -175,7 +175,7 @@ struct mtget { #if defined (__FreeBSD__) int32_t mt_blksiz; /* presently operating blocksize */ int32_t mt_density; /* presently operating density */ - u_int32_t mt_comp; /* presently operating compression */ + uint32_t mt_comp; /* presently operating compression */ int32_t mt_blksiz0; /* blocksize for mode 0 */ int32_t mt_blksiz1; /* blocksize for mode 1 */ int32_t mt_blksiz2; /* blocksize for mode 2 */ @@ -185,10 +185,10 @@ struct mtget { int32_t mt_density2; /* density for mode 2 */ int32_t mt_density3; /* density for mode 3 */ /* the following are not yet implemented */ - u_int32_t mt_comp0; /* compression type for mode 0 */ - u_int32_t mt_comp1; /* compression type for mode 1 */ - u_int32_t mt_comp2; /* compression type for mode 2 */ - u_int32_t mt_comp3; /* compression type for mode 3 */ + uint32_t mt_comp0; /* compression type for mode 0 */ + uint32_t mt_comp1; /* compression type for mode 1 */ + uint32_t mt_comp2; /* compression type for mode 2 */ + uint32_t mt_comp3; /* compression type for mode 3 */ /* end not yet implemented */ #endif int32_t mt_fileno; /* relative file number of current position */ @@ -203,23 +203,23 @@ struct scsi_tape_errors { * Check Condition noted for these operations. The act * of issuing an MTIOCERRSTAT unlatches and clears them. */ - u_int8_t io_sense[32]; /* Last Sense Data For Data I/O */ + uint8_t io_sense[32]; /* Last Sense Data For Data I/O */ int32_t io_resid; /* residual count from last Data I/O */ - u_int8_t io_cdb[16]; /* Command that Caused the Last Data Sense */ - u_int8_t ctl_sense[32]; /* Last Sense Data For Control I/O */ + uint8_t io_cdb[16]; /* Command that Caused the Last Data Sense */ + uint8_t ctl_sense[32]; /* Last Sense Data For Control I/O */ int32_t ctl_resid; /* residual count from last Control I/O */ - u_int8_t ctl_cdb[16]; /* Command that Caused the Last Control Sense */ + uint8_t ctl_cdb[16]; /* Command that Caused the Last Control Sense */ /* * These are the read and write cumulative error counters. * (how to reset cumulative error counters is not yet defined). * (not implemented as yet but space is being reserved for them) */ struct { - u_int32_t retries; /* total # retries performed */ - u_int32_t corrected; /* total # corrections performed */ - u_int32_t processed; /* total # corrections successful */ - u_int32_t failures; /* total # corrections/retries failed */ - u_int64_t nbytes; /* total # bytes processed */ + uint32_t retries; /* total # retries performed */ + uint32_t corrected; /* total # corrections performed */ + uint32_t processed; /* total # corrections successful */ + uint32_t failures; /* total # corrections/retries failed */ + uint64_t nbytes; /* total # bytes processed */ } wterr, rderr; }; @@ -265,18 +265,18 @@ union mterrstat { * rethink these ioctls to support all the entities they haul into * the picture (64 bit blocks, logical file record numbers, etc..). */ -#define MTIOCRDSPOS _IOR('m', 5, u_int32_t) /* get logical blk addr */ -#define MTIOCRDHPOS _IOR('m', 6, u_int32_t) /* get hardware blk addr */ -#define MTIOCSLOCATE _IOW('m', 5, u_int32_t) /* seek to logical blk addr */ -#define MTIOCHLOCATE _IOW('m', 6, u_int32_t) /* seek to hardware blk addr */ +#define MTIOCRDSPOS _IOR('m', 5, uint32_t) /* get logical blk addr */ +#define MTIOCRDHPOS _IOR('m', 6, uint32_t) /* get hardware blk addr */ +#define MTIOCSLOCATE _IOW('m', 5, uint32_t) /* seek to logical blk addr */ +#define MTIOCHLOCATE _IOW('m', 6, uint32_t) /* seek to hardware blk addr */ #define MTIOCERRSTAT _IOR('m', 7, union mterrstat) /* get tape errors */ /* * Set EOT model- argument is number of filemarks to end a tape with. * Note that not all possible values will be accepted. */ -#define MTIOCSETEOTMODEL _IOW('m', 8, u_int32_t) +#define MTIOCSETEOTMODEL _IOW('m', 8, uint32_t) /* Get current EOT model */ -#define MTIOCGETEOTMODEL _IOR('m', 8, u_int32_t) +#define MTIOCGETEOTMODEL _IOR('m', 8, uint32_t) #ifndef _KERNEL #define DEFTAPE "/dev/nsa0" Modified: head/share/man/man4/natm.4 ============================================================================== --- head/share/man/man4/natm.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/natm.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -23,11 +23,11 @@ The NATM layer uses a to specify a virtual circuit: .Bd -literal -offset indent struct sockaddr_natm { - u_int8_t snatm_len; /* length */ - u_int8_t snatm_family; /* AF_NATM */ + uint8_t snatm_len; /* length */ + uint8_t snatm_family; /* AF_NATM */ char snatm_if[IFNAMSIZ]; /* interface name */ - u_int16_t snatm_vci; /* vci */ - u_int8_t snatm_vpi; /* vpi */ + uint16_t snatm_vci; /* vci */ + uint8_t snatm_vpi; /* vpi */ }; .Ed .Pp Modified: head/share/man/man4/net80211.4 ============================================================================== --- head/share/man/man4/net80211.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/net80211.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -64,7 +64,7 @@ This structure is defined as follows: .Bd -literal struct ieee80211req { char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */ - u_int16_t i_type; /* req type */ + uint16_t i_type; /* req type */ int16_t i_val; /* Index or simple value */ int16_t i_len; /* Index or simple value */ void *i_data; /* Extra data */ Modified: head/share/man/man4/ng_async.4 ============================================================================== --- head/share/man/man4/ng_async.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_async.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -118,9 +118,9 @@ Sets the node configuration, which is de .Bd -literal -offset 4n struct ng_async_cfg { u_char enabled; /* Turn encoding on/off */ - u_int16_t amru; /* Max receive async frame len */ - u_int16_t smru; /* Max receive sync frame len */ - u_int32_t accm; /* ACCM encoding */ + uint16_t amru; /* Max receive async frame len */ + uint16_t smru; /* Max receive sync frame len */ + uint32_t accm; /* ACCM encoding */ }; .Ed .Pp Modified: head/share/man/man4/ng_bridge.4 ============================================================================== --- head/share/man/man4/ng_bridge.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_bridge.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -108,9 +108,9 @@ as an argument: struct ng_bridge_config { u_char ipfw[NG_BRIDGE_MAX_LINKS]; /* enable ipfw */ u_char debugLevel; /* debug level */ - u_int32_t loopTimeout; /* link loopback mute time */ - u_int32_t maxStaleness; /* max host age before nuking */ - u_int32_t minStableAge; /* min time for a stable host */ + uint32_t loopTimeout; /* link loopback mute time */ + uint32_t maxStaleness; /* max host age before nuking */ + uint32_t minStableAge; /* min time for a stable host */ }; .Ed .Pp @@ -155,20 +155,20 @@ currently connected: .Bd -literal -offset 0n /* Statistics structure (one for each link) */ struct ng_bridge_link_stats { - u_int64_t recvOctets; /* total octets rec'd on link */ - u_int64_t recvPackets; /* total pkts rec'd on link */ - u_int64_t recvMulticasts; /* multicast pkts rec'd on link */ - u_int64_t recvBroadcasts; /* broadcast pkts rec'd on link */ - u_int64_t recvUnknown; /* pkts rec'd with unknown dest addr */ - u_int64_t recvRunts; /* pkts rec'd less than 14 bytes */ - u_int64_t recvInvalid; /* pkts rec'd with bogus source addr */ - u_int64_t xmitOctets; /* total octets xmit'd on link */ - u_int64_t xmitPackets; /* total pkts xmit'd on link */ - u_int64_t xmitMulticasts; /* multicast pkts xmit'd on link */ - u_int64_t xmitBroadcasts; /* broadcast pkts xmit'd on link */ - u_int64_t loopDrops; /* pkts dropped due to loopback */ - u_int64_t loopDetects; /* number of loop detections */ - u_int64_t memoryFailures; /* times couldn't get mem or mbuf */ + uint64_t recvOctets; /* total octets rec'd on link */ + uint64_t recvPackets; /* total pkts rec'd on link */ + uint64_t recvMulticasts; /* multicast pkts rec'd on link */ + uint64_t recvBroadcasts; /* broadcast pkts rec'd on link */ + uint64_t recvUnknown; /* pkts rec'd with unknown dest addr */ + uint64_t recvRunts; /* pkts rec'd less than 14 bytes */ + uint64_t recvInvalid; /* pkts rec'd with bogus source addr */ + uint64_t xmitOctets; /* total octets xmit'd on link */ + uint64_t xmitPackets; /* total pkts xmit'd on link */ + uint64_t xmitMulticasts; /* multicast pkts xmit'd on link */ + uint64_t xmitBroadcasts; /* broadcast pkts xmit'd on link */ + uint64_t loopDrops; /* pkts dropped due to loopback */ + uint64_t loopDetects; /* number of loop detections */ + uint64_t memoryFailures; /* times couldn't get mem or mbuf */ }; .Ed .It Dv NGM_BRIDGE_CLR_STATS Modified: head/share/man/man4/ng_btsocket.4 ============================================================================== --- head/share/man/man4/ng_btsocket.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_btsocket.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -154,7 +154,7 @@ The Bluetooth L2CAP socket address is de struct sockaddr_l2cap { u_char l2cap_len; /* total length */ u_char l2cap_family; /* address family */ - u_int16_t l2cap_psm; /* Protocol/Service Multiplexor */ + uint16_t l2cap_psm; /* Protocol/Service Multiplexor */ bdaddr_t l2cap_bdaddr; /* address */ }; .Ed @@ -272,7 +272,7 @@ struct sockaddr_rfcomm { u_char rfcomm_len; /* total length */ u_char rfcomm_family; /* address family */ bdaddr_t rfcomm_bdaddr; /* address */ - u_int8_t rfcomm_channel; /* channel */ + uint8_t rfcomm_channel; /* channel */ }; .Ed .Ss Dv SOCK_STREAM Ss RFCOMM sockets Modified: head/share/man/man4/ng_car.4 ============================================================================== --- head/share/man/man4/ng_car.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_car.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -123,15 +123,15 @@ Return current node configuration as .Vt "struct ng_car_bulkconf" .Bd -literal struct ng_car_hookconf { - u_int64_t cbs; /* Committed burst size */ - u_int64_t ebs; /* Exceeded/Peak burst size */ - u_int64_t cir; /* Committed information rate */ - u_int64_t pir; /* Peak information rate */ - u_int8_t green_action; /* Action for green packets */ - u_int8_t yellow_action; /* Action for yellow packets */ - u_int8_t red_action; /* Action for red packets */ - u_int8_t mode; /* operation mode */ - u_int8_t opt; /* mode options */ + uint64_t cbs; /* Committed burst size */ + uint64_t ebs; /* Exceeded/Peak burst size */ + uint64_t cir; /* Committed information rate */ + uint64_t pir; /* Peak information rate */ + uint8_t green_action; /* Action for green packets */ + uint8_t yellow_action; /* Action for yellow packets */ + uint8_t red_action; /* Action for red packets */ + uint8_t mode; /* operation mode */ + uint8_t opt; /* mode options */ }; /* possible actions (..._action) */ @@ -161,12 +161,12 @@ Return node statistics as .Vt "struct ng_car_bulkstats" .Bd -literal struct ng_car_hookstats { - u_int64_t passed_pkts; - u_int64_t droped_pkts; - u_int64_t green_pkts; - u_int64_t yellow_pkts; - u_int64_t red_pkts; - u_int64_t errors; + uint64_t passed_pkts; + uint64_t droped_pkts; + uint64_t green_pkts; + uint64_t yellow_pkts; + uint64_t red_pkts; + uint64_t errors; }; struct ng_car_bulkstats { Modified: head/share/man/man4/ng_ccatm.4 ============================================================================== --- head/share/man/man4/ng_ccatm.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_ccatm.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -110,7 +110,7 @@ The interface on these hooks is defined and uses a structure .Bd -literal struct ccatm_op { - u_int32_t op; /* request code */ + uint32_t op; /* request code */ u_char data[]; /* optional data */ }; .Ed @@ -230,7 +230,7 @@ struct ngm_ccatm_get_addresses { struct ngm_ccatm_address_req addr[0]; }; struct ngm_ccatm_address_req { - u_int32_t port; + uint32_t port; struct uni_addr addr; }; .Ed Modified: head/share/man/man4/ng_cisco.4 ============================================================================== --- head/share/man/man4/ng_cisco.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_cisco.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -148,8 +148,8 @@ Returns a .Dv "struct ngciscostat" : .Bd -literal -offset 4n struct ngciscostat { - u_int32_t seq_retries; /* # unack'd retries */ - u_int32_t keepalive_period; /* in seconds */ + uint32_t seq_retries; /* # unack'd retries */ + uint32_t keepalive_period; /* in seconds */ }; .Ed .El Modified: head/share/man/man4/ng_etf.4 ============================================================================== --- head/share/man/man4/ng_etf.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_etf.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -102,7 +102,7 @@ are specified in a structure of type .Bd -literal -offset 4n struct ng_etffilter { char matchhook[NG_HOOKSIZ]; /* hook name */ - u_int16_t ethertype; /* catch these */ + uint16_t ethertype; /* catch these */ }; .Ed .El Modified: head/share/man/man4/ng_hci.4 ============================================================================== --- head/share/man/man4/ng_hci.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_hci.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -133,9 +133,9 @@ The next sections specify the HCI packet .Bd -literal -offset indent #define NG_HCI_CMD_PKT 0x01 typedef struct { - u_int8_t type; /* MUST be 0x1 */ - u_int16_t opcode; /* OpCode */ - u_int8_t length; /* parameter(s) length in bytes */ + uint8_t type; /* MUST be 0x1 */ + uint16_t opcode; /* OpCode */ + uint8_t length; /* parameter(s) length in bytes */ } __attribute__ ((packed)) ng_hci_cmd_pkt_t; .Ed .Pp @@ -156,9 +156,9 @@ Controller to the Host. .Bd -literal -offset indent #define NG_HCI_EVENT_PKT 0x04 typedef struct { - u_int8_t type; /* MUST be 0x4 */ - u_int8_t event; /* event */ - u_int8_t length; /* parameter(s) length in bytes */ + uint8_t type; /* MUST be 0x4 */ + uint8_t event; /* event */ + uint8_t length; /* parameter(s) length in bytes */ } __attribute__ ((packed)) ng_hci_event_pkt_t; .Ed .Pp @@ -168,9 +168,9 @@ when events occur. .Bd -literal -offset indent #define NG_HCI_ACL_DATA_PKT 0x02 typedef struct { - u_int8_t type; /* MUST be 0x2 */ - u_int16_t con_handle; /* connection handle + PB + BC flags */ - u_int16_t length; /* payload length in bytes */ + uint8_t type; /* MUST be 0x2 */ + uint16_t con_handle; /* connection handle + PB + BC flags */ + uint16_t length; /* payload length in bytes */ } __attribute__ ((packed)) ng_hci_acldata_pkt_t; .Ed .Pp @@ -180,9 +180,9 @@ Host Controller. .Bd -literal -offset indent #define NG_HCI_SCO_DATA_PKT 0x03 typedef struct { - u_int8_t type; /* MUST be 0x3 */ - u_int16_t con_handle; /* connection handle + reserved bits */ - u_int8_t length; /* payload length in bytes */ + uint8_t type; /* MUST be 0x3 */ + uint16_t con_handle; /* connection handle + reserved bits */ + uint8_t length; /* payload length in bytes */ } __attribute__ ((packed)) ng_hci_scodata_pkt_t; .Ed .Pp @@ -216,9 +216,9 @@ Netgraph message defined as follows. .Bd -literal -offset indent #define NGM_HCI_NODE_UP 112 /* HCI -> Upper */ typedef struct { - u_int16_t pkt_size; /* max. ACL/SCO packet size (w/o hdr) */ - u_int16_t num_pkts; /* ACL/SCO packet queue size */ - u_int16_t reserved; /* place holder */ + uint16_t pkt_size; /* max. ACL/SCO packet size (w/o hdr) */ + uint16_t num_pkts; /* ACL/SCO packet queue size */ + uint16_t reserved; /* place holder */ bdaddr_t bdaddr; /* bdaddr */ } ng_hci_node_up_ep; .Ed @@ -244,8 +244,8 @@ Netgraph message is defined as follows. .Bd -literal -offset indent #define NGM_HCI_SYNC_CON_QUEUE 113 /* HCI -> Upper */ typedef struct { - u_int16_t con_handle; /* connection handle */ - u_int16_t completed; /* number of completed packets */ + uint16_t con_handle; /* connection handle */ + uint16_t completed; /* number of completed packets */ } ng_hci_sync_con_queue_ep; .Ed .Sh HOOKS Modified: head/share/man/man4/ng_l2cap.4 ============================================================================== --- head/share/man/man4/ng_l2cap.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_l2cap.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -310,9 +310,9 @@ appropriate upstream hook and must be pr .Bd -literal -offset indent /* L2CA data packet header */ typedef struct { - u_int32_t token; /* token to use in L2CAP_L2CA_WRITE */ - u_int16_t length; /* length of the data */ - u_int16_t lcid; /* local channel ID */ + uint32_t token; /* token to use in L2CAP_L2CA_WRITE */ + uint16_t length; /* length of the data */ + uint16_t lcid; /* local channel ID */ } __attribute__ ((packed)) ng_l2cap_l2ca_hdr_t; .Ed .Pp Modified: head/share/man/man4/ng_l2tp.4 ============================================================================== --- head/share/man/man4/ng_l2tp.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_l2tp.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -115,11 +115,11 @@ as an argument: struct ng_l2tp_config { u_char enabled; /* enables traffic flow */ u_char match_id; /* tunnel id must match 'tunnel_id' */ - u_int16_t tunnel_id; /* local tunnel id */ - u_int16_t peer_id; /* peer's tunnel id */ - u_int16_t peer_win; /* peer's max recv window size */ - u_int16_t rexmit_max; /* max retransmits before failure */ - u_int16_t rexmit_max_to; /* max delay between retransmits */ + uint16_t tunnel_id; /* local tunnel id */ + uint16_t peer_id; /* peer's tunnel id */ + uint16_t peer_win; /* peer's max recv window size */ + uint16_t rexmit_max; /* max retransmits before failure */ + uint16_t rexmit_max_to; /* max delay between retransmits */ }; .Ed .Pp @@ -197,8 +197,8 @@ The argument is a .Bd -literal /* Configuration for a session hook */ struct ng_l2tp_sess_config { - u_int16_t session_id; /* local session id */ - u_int16_t peer_id; /* peer's session id */ + uint16_t session_id; /* local session id */ + uint16_t peer_id; /* peer's session id */ u_char control_dseq; /* we control data sequencing? */ u_char enable_dseq; /* enable data sequencing? */ u_char include_length; /* include length field? */ Modified: head/share/man/man4/ng_mppc.4 ============================================================================== --- head/share/man/man4/ng_mppc.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_mppc.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -106,7 +106,7 @@ as an argument: /* Configuration for a session */ struct ng_mppc_config { u_char enable; /* enable */ - u_int32_t bits; /* config bits */ + uint32_t bits; /* config bits */ u_char startkey[MPPE_KEY_LEN]; /* start key */ }; Modified: head/share/man/man4/ng_netflow.4 ============================================================================== --- head/share/man/man4/ng_netflow.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_netflow.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -148,8 +148,8 @@ This message requires as an argument: .Bd -literal -offset 4n struct ng_netflow_setifindex { - u_int16_t iface; /* which iface to operate on */ - u_int16_t index; /* new index */ + uint16_t iface; /* which iface to operate on */ + uint16_t index; /* new index */ }; .Ed .Pp @@ -175,8 +175,8 @@ This message requires as an argument: .Bd -literal -offset 4n struct ng_netflow_setconfig { - u_int16_t iface; - u_int32_t conf; + uint16_t iface; + uint32_t conf; #define NG_NETFLOW_CONF_INGRESS 1 #define NG_NETFLOW_CONF_EGRESS 2 #define NG_NETFLOW_CONF_ONCE 4 Modified: head/share/man/man4/ng_one2many.4 ============================================================================== --- head/share/man/man4/ng_one2many.4 Sun Feb 12 14:58:50 2012 (r231563) +++ head/share/man/man4/ng_one2many.4 Sun Feb 12 18:29:56 2012 (r231564) @@ -156,8 +156,8 @@ as the control message argument: .Bd -literal *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 19:07:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB56D1065672; Sun, 12 Feb 2012 19:07:02 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7848FC08; Sun, 12 Feb 2012 19:07:01 +0000 (UTC) Received: by bkcjg1 with SMTP id jg1so3809988bkc.13 for ; Sun, 12 Feb 2012 11:07:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=yWd4/SAMWKnjdB0vuNovleOsBWl43gnnDD453zuuKcc=; b=AS1ynaQCnZjxacjcCa0buzg4BMf2MYMTTI0nL1QK1+VKq1QmiagsHCdoyy/LhlVc6F CwdI0J5FrbKYfkZdEUZvsQerEnsWPdVQpMY4yYObIaEiMeghuHAq8NKARJ18I8GeWJXt amNB5/DUJPeM5DOJVr+i+1rBOx4oEkKuNQOTo= Received: by 10.204.10.91 with SMTP id o27mr5842916bko.17.1329073620697; Sun, 12 Feb 2012 11:07:00 -0800 (PST) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id jc4sm38621743bkc.7.2012.02.12.11.06.57 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Feb 2012 11:06:58 -0800 (PST) From: Mikolaj Golub To: Andrey Zonov References: <27A0A960-F767-4D2C-BF3E-31F73FBF4E28@palisadesystems.com> <86zkcy5ur9.fsf@kopusha.home.net> <20120205093938.GC30033@garage.freebsd.pl> <86lioh7yz5.fsf@kopusha.home.net> <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> X-Comment-To: Andrey Zonov Sender: Mikolaj Golub Date: Sun, 12 Feb 2012 21:06:55 +0200 In-Reply-To: <4F365C10.5050607@zonov.org> (Andrey Zonov's message of "Sat, 11 Feb 2012 16:16:16 +0400") Message-ID: <861upz6fcg.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, Guy Helmer , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Pawel Jakub Dawidek Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 19:07:03 -0000 On Sat, 11 Feb 2012 16:16:16 +0400 Andrey Zonov wrote: AZ> On 11.02.2012 14:35, Mikolaj Golub wrote: >> >> Thank you. Here are the patches I would like to commit if there are no >> objections or other suggestions: >> >> http://people.freebsd.org/~trociny/daemon/daemon.spawn.1.patch >> http://people.freebsd.org/~trociny/daemon/daemon.SIGTERM.1.patch >> http://people.freebsd.org/~trociny/daemon/daemon.restart.1.patch The restart patch has been updated: the variable initialization was lost when separting the patches. http://people.freebsd.org/~trociny/daemon/daemon.restart.2.patch >> AZ> There are two more suggestions, if you don't mind. AZ> Use madvise(MADV_PROTECT). It would be useful because of the AZ> daemon(8) should not leak or eats much memory. I also thought about this and it looks like a good idea for me too. http://people.freebsd.org/~trociny/daemon/daemon.madvise.1.patch AZ> Check return code from pidfile_write() function. I saw many times AZ> when pid could not be written because of there is not enough free AZ> space (but file was created). Unfortunately, I have no suggestions AZ> how to handle this properly. We could return with error in this case (for me this almost the same as if we don't create file at all). But if we check pidfile_write() status we should resign the pidfile_write() feature that allows to pass NULL pidfh and check if pidfile option is used. Something like in this patch: http://people.freebsd.org/~trociny/daemon/daemon.pidfile_write.1.patch Not sure I should commit this though. -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 19:29:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61B74106566B; Sun, 12 Feb 2012 19:29:35 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CBBC8FC16; Sun, 12 Feb 2012 19:29:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CJTZFP097885; Sun, 12 Feb 2012 19:29:35 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CJTZ7d097882; Sun, 12 Feb 2012 19:29:35 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201202121929.q1CJTZ7d097882@svn.freebsd.org> From: Robert Millan Date: Sun, 12 Feb 2012 19:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231565 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 19:29:35 -0000 Author: rmh Date: Sun Feb 12 19:29:34 2012 New Revision: 231565 URL: http://svn.freebsd.org/changeset/base/231565 Log: Fix a typo. Approved by: kib (mentor) Reported by: lwhsu, Niclas Zeising MFC after: 5 days Modified: head/sys/conf/WITHOUT_SOURCELESS_HOST Modified: head/sys/conf/WITHOUT_SOURCELESS_HOST ============================================================================== --- head/sys/conf/WITHOUT_SOURCELESS_HOST Sun Feb 12 18:29:56 2012 (r231564) +++ head/sys/conf/WITHOUT_SOURCELESS_HOST Sun Feb 12 19:29:34 2012 (r231565) @@ -1,5 +1,5 @@ # -# WITHOUT_SOURCELESS_UCODE -- Disable drivers that include sourceless +# WITHOUT_SOURCELESS_HOST -- Disable drivers that include sourceless # native code for host CPU. # # $FreeBSD$ From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 19:49:23 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 110F3106566C; Sun, 12 Feb 2012 19:49:23 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id B13528FC0A; Sun, 12 Feb 2012 19:49:22 +0000 (UTC) Received: from localhost.samsco.home (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.5/8.14.5) with ESMTP id q1CJnGcD034353; Sun, 12 Feb 2012 12:49:16 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <201202121455.q1CEtRNU089049@svn.freebsd.org> Date: Sun, 12 Feb 2012 12:49:16 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <15AE59C7-99D6-43F2-A3E8-9A4349E5E9CF@samsco.org> References: <201202121455.q1CEtRNU089049@svn.freebsd.org> To: Robert Millan X-Mailer: Apple Mail (2.1251.1) X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r231559 - in head/sys: amd64/conf conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 19:49:23 -0000 On Feb 12, 2012, at 7:55 AM, Robert Millan wrote: > Author: rmh > Date: Sun Feb 12 14:55:27 2012 > New Revision: 231559 > URL: http://svn.freebsd.org/changeset/base/231559 >=20 > Log: > Move WITHOUT_SOURCELESS_* files to sys/conf/ in order to avoid = "universe" > target processing them as if they were standalone kernel config files. Thanks, these were an eyesore in the arch directories. They're still an = eyesore, but less of one now. Scott From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 20:04:16 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 368D6106566B; Sun, 12 Feb 2012 20:04:16 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id D1C028FC0C; Sun, 12 Feb 2012 20:04:15 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 1D06F3BF; Sun, 12 Feb 2012 21:04:13 +0100 (CET) Date: Sun, 12 Feb 2012 21:02:53 +0100 From: Pawel Jakub Dawidek To: Mikolaj Golub Message-ID: <20120212200253.GC1355@garage.freebsd.pl> References: <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> <861upz6fcg.fsf@kopusha.home.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ctP54qlpMx3WjD+/" Content-Disposition: inline In-Reply-To: <861upz6fcg.fsf@kopusha.home.net> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, Guy Helmer , svn-src-all@FreeBSD.org, Andrey Zonov , src-committers@FreeBSD.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 20:04:16 -0000 --ctP54qlpMx3WjD+/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 12, 2012 at 09:06:55PM +0200, Mikolaj Golub wrote: > AZ> Check return code from pidfile_write() function. I saw many times > AZ> when pid could not be written because of there is not enough free > AZ> space (but file was created). Unfortunately, I have no suggestions > AZ> how to handle this properly. >=20 > We could return with error in this case (for me this almost the same as i= f we > don't create file at all). But if we check pidfile_write() status we shou= ld > resign the pidfile_write() feature that allows to pass NULL pidfh and che= ck if > pidfile option is used. Something like in this patch: >=20 > http://people.freebsd.org/~trociny/daemon/daemon.pidfile_write.1.patch >=20 > Not sure I should commit this though. Please don't. Even if you can't write the pidfile, you should run the service. The same as for pidfile_open() failure as documented in example. Feel free to warn about problem with writing to pidfile, but don't treat it as critial error. We can also add such a warning to the example in the manual page. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --ctP54qlpMx3WjD+/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk84Gu0ACgkQForvXbEpPzS2ZwCfbUTLJTsB/Fw+k2x2BkoFORC4 WyMAn3+qZ7yh/iYGFvpGYO1CzRAqdvhq =eHFr -----END PGP SIGNATURE----- --ctP54qlpMx3WjD+/-- From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 20:09:39 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49A07106564A; Sun, 12 Feb 2012 20:09:39 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id E56B38FC13; Sun, 12 Feb 2012 20:09:37 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 8FE733C4; Sun, 12 Feb 2012 21:09:36 +0100 (CET) Date: Sun, 12 Feb 2012 21:08:17 +0100 From: Pawel Jakub Dawidek To: Mikolaj Golub Message-ID: <20120212200817.GD1355@garage.freebsd.pl> References: <20120205093938.GC30033@garage.freebsd.pl> <86lioh7yz5.fsf@kopusha.home.net> <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8w3uRX/HFJGApMzv" Content-Disposition: inline In-Reply-To: <86sjihsln4.fsf@kopusha.home.net> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, Guy Helmer , svn-src-all@FreeBSD.org, Andrey Zonov , src-committers@FreeBSD.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 20:09:39 -0000 --8w3uRX/HFJGApMzv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 11, 2012 at 12:35:27PM +0200, Mikolaj Golub wrote: > Thank you. Here are the patches I would like to commit if there are no > objections or other suggestions: >=20 > http://people.freebsd.org/~trociny/daemon/daemon.spawn.1.patch The patch looks good to me. I'd just fix style nit: please compare 'pidfile' with NULL, don't treat it as bool. > http://people.freebsd.org/~trociny/daemon/daemon.SIGTERM.1.patch > http://people.freebsd.org/~trociny/daemon/daemon.restart.1.patch I'd prefer not to be listed in 'Discussed by' for those two patches. As I said before, I'm not convinced those are desired functionalities. I don't object strongly against them, but having my name there suggests we reached some consensus and we didn't:) --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --8w3uRX/HFJGApMzv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk84HDEACgkQForvXbEpPzRy3gCfVbdVfvLGKgmSjNovx4uwvwcK tVkAoKp2ItXL2dEvG3S0PTR8wH+KZcww =RhjG -----END PGP SIGNATURE----- --8w3uRX/HFJGApMzv-- From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 20:49:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFEE11065678; Sun, 12 Feb 2012 20:49:45 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id A34568FC13; Sun, 12 Feb 2012 20:49:45 +0000 (UTC) Received: by pbcxa7 with SMTP id xa7so3507160pbc.13 for ; Sun, 12 Feb 2012 12:49:45 -0800 (PST) Received: by 10.68.73.103 with SMTP id k7mr39714604pbv.132.1329079314789; Sun, 12 Feb 2012 12:41:54 -0800 (PST) Received: from [10.254.254.77] (ppp95-165-146-120.pppoe.spdop.ru. [95.165.146.120]) by mx.google.com with ESMTPS id w4sm34550485pbf.4.2012.02.12.12.41.50 (version=SSLv3 cipher=OTHER); Sun, 12 Feb 2012 12:41:53 -0800 (PST) Message-ID: <4F38240B.5040507@zonov.org> Date: Mon, 13 Feb 2012 00:41:47 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> <861upz6fcg.fsf@kopusha.home.net> <20120212200253.GC1355@garage.freebsd.pl> In-Reply-To: <20120212200253.GC1355@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQn5AKDjWqjKHiPVUhMaH3zMfCptaZcaeWqJSAN4kcRruv8BWKN++p0tpNKw+8dbqQssBJHT Cc: Mikolaj Golub , Guy Helmer , svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 20:49:46 -0000 On 13.02.2012 0:02, Pawel Jakub Dawidek wrote: > On Sun, Feb 12, 2012 at 09:06:55PM +0200, Mikolaj Golub wrote: >> AZ> Check return code from pidfile_write() function. I saw many times >> AZ> when pid could not be written because of there is not enough free >> AZ> space (but file was created). Unfortunately, I have no suggestions >> AZ> how to handle this properly. >> >> We could return with error in this case (for me this almost the same as if we >> don't create file at all). But if we check pidfile_write() status we should >> resign the pidfile_write() feature that allows to pass NULL pidfh and check if >> pidfile option is used. Something like in this patch: >> >> http://people.freebsd.org/~trociny/daemon/daemon.pidfile_write.1.patch >> >> Not sure I should commit this though. > > Please don't. Even if you can't write the pidfile, you should run the > service. The same as for pidfile_open() failure as documented in > example. Feel free to warn about problem with writing to pidfile, but > don't treat it as critial error. The problem is the following you cannot stop such a service with standard rc.d script and empty pidfile. > > We can also add such a warning to the example in the manual page. > -- Andrey Zonov From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 20:56:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D150106566C; Sun, 12 Feb 2012 20:56:59 +0000 (UTC) (envelope-from jos@catnook.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8509B8FC13; Sun, 12 Feb 2012 20:56:58 +0000 (UTC) Received: by obcwo16 with SMTP id wo16so7690935obc.13 for ; Sun, 12 Feb 2012 12:56:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.12.103 with SMTP id x7mr3239577oeb.51.1329080218121; Sun, 12 Feb 2012 12:56:58 -0800 (PST) Received: by 10.182.116.33 with HTTP; Sun, 12 Feb 2012 12:56:58 -0800 (PST) In-Reply-To: <4F38240B.5040507@zonov.org> References: <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> <861upz6fcg.fsf@kopusha.home.net> <20120212200253.GC1355@garage.freebsd.pl> <4F38240B.5040507@zonov.org> Date: Sun, 12 Feb 2012 12:56:58 -0800 Message-ID: From: Jos Backus To: Andrey Zonov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , Guy Helmer , svn-src-all@freebsd.org, Mikolaj Golub , svn-src-head@freebsd.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 20:56:59 -0000 On Sun, Feb 12, 2012 at 12:41 PM, Andrey Zonov wrote: > On 13.02.2012 0:02, Pawel Jakub Dawidek wrote: >> >> On Sun, Feb 12, 2012 at 09:06:55PM +0200, Mikolaj Golub wrote: >>> >>> =A0AZ> =A0Check return code from pidfile_write() function. =A0I saw man= y times >>> =A0AZ> =A0when pid could not be written because of there is not enough = free >>> =A0AZ> =A0space (but file was created). =A0Unfortunately, I have no sug= gestions >>> =A0AZ> =A0how to handle this properly. >>> >>> We could return with error in this case (for me this almost the same as >>> if we >>> don't create file at all). But if we check pidfile_write() status we >>> should >>> resign the pidfile_write() feature that allows to pass NULL pidfh and >>> check if >>> pidfile option is used. Something like in this patch: >>> >>> http://people.freebsd.org/~trociny/daemon/daemon.pidfile_write.1.patch >>> >>> Not sure I should commit this though. >> >> >> Please don't. Even if you can't write the pidfile, you should run the >> service. The same as for pidfile_open() failure as documented in >> example. Feel free to warn about problem with writing to pidfile, but >> don't treat it as critial error. > > > The problem is the following you cannot stop such a service with standard > rc.d script and empty pidfile. Right. So why not add a Unix socket listener to daemon(8) so the rc.d script can send commands over the socket instead of using the pidfile? This is what supervise/svc let you do today. I don't understand why this solution isn't obvious once you are committed to running daemon(8) for each service anyway. And then you don't need pidfiles because now you have a much better, standard control interface (sending commands to daemon(8) and gathering responses). Jos >> >> We can also add such a warning to the example in the manual page. >> > > -- > Andrey Zonov > > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" --=20 Jos Backus jos at catnook.com From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 21:17:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B28A106564A; Sun, 12 Feb 2012 21:17:08 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id BA1A08FC12; Sun, 12 Feb 2012 21:17:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.4/8.14.4) with ESMTP id q1CKuL5M039081; Mon, 13 Feb 2012 00:56:21 +0400 (MSK) (envelope-from marck@rinet.ru) Date: Mon, 13 Feb 2012 00:56:21 +0400 (MSK) From: Dmitry Morozovsky To: Andrey Zonov In-Reply-To: <4F38240B.5040507@zonov.org> Message-ID: References: <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> <861upz6fcg.fsf@kopusha.home.net> <20120212200253.GC1355@garage.freebsd.pl> <4F38240B.5040507@zonov.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (woozle.rinet.ru [0.0.0.0]); Mon, 13 Feb 2012 00:56:22 +0400 (MSK) Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , Guy Helmer , svn-src-all@freebsd.org, Mikolaj Golub , svn-src-head@freebsd.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 21:17:08 -0000 On Mon, 13 Feb 2012, Andrey Zonov wrote: [snip] > > Please don't. Even if you can't write the pidfile, you should run the > > service. The same as for pidfile_open() failure as documented in > > example. Feel free to warn about problem with writing to pidfile, but > > don't treat it as critial error. > > The problem is the following you cannot stop such a service with standard rc.d > script and empty pidfile. As for me, unstoppable (via standard way) service is at least slightly better than unstartable. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 21:32:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 805281065670; Sun, 12 Feb 2012 21:32:24 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 30ADF8FC0C; Sun, 12 Feb 2012 21:32:23 +0000 (UTC) Received: by bkcjg1 with SMTP id jg1so3865242bkc.13 for ; Sun, 12 Feb 2012 13:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=VjReZXRHGN70AEGbCNzZ7HU5OiOPkyO7OL3KPHzEF8g=; b=d7xfKwsQmeajUHWTkcY4qwDzaPKplFsuOK605HFekFbdU7tMBkzPRBDcGKgy1C79YB FLYKxQl3hF/Ncz/cmb+ATTQ1kVwf/v2/MJgDU1N3s7dXawNLUo1DPWa1A1apl3NziKFU 4lm04bhdT8e/3C4ysoPCQxU1ifq8Mke+Uyybc= Received: by 10.204.152.88 with SMTP id f24mr5846328bkw.31.1329082342266; Sun, 12 Feb 2012 13:32:22 -0800 (PST) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id ez5sm39498248bkc.15.2012.02.12.13.32.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Feb 2012 13:32:21 -0800 (PST) From: Mikolaj Golub To: Jos Backus References: <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> <861upz6fcg.fsf@kopusha.home.net> <20120212200253.GC1355@garage.freebsd.pl> <4F38240B.5040507@zonov.org> X-Comment-To: Jos Backus Sender: Mikolaj Golub Date: Sun, 12 Feb 2012 23:32:17 +0200 In-Reply-To: (Jos Backus's message of "Sun, 12 Feb 2012 12:56:58 -0800") Message-ID: <86wr7r4u1q.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , Guy Helmer , svn-src-all@freebsd.org, Andrey Zonov , svn-src-head@freebsd.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 21:32:24 -0000 On Sun, 12 Feb 2012 12:56:58 -0800 Jos Backus wrote: JB> Right. So why not add a Unix socket listener to daemon(8) so the rc.d JB> script can send commands over the socket instead of using the pidfile? JB> This is what supervise/svc let you do today. JB> I don't understand why this solution isn't obvious once you are JB> committed to running daemon(8) for each service anyway. And then you JB> don't need pidfiles because now you have a much better, standard JB> control interface (sending commands to daemon(8) and gathering JB> responses). Why do you think one is committed to running daemon(8) for each service? daemon(8) is for a program that can't daemonize itself and you want an easy way to run it detached from a terminal. And have an easy way to integrate it in rc(8) using rc.subr(8). And rc.subr(8) knows about pidfiles but knows nothing about unix sockets. Although I don't say that the idea to use a socket file for monitoring and control is bad in general. -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 22:37:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C68D106566B; Sun, 12 Feb 2012 22:37:11 +0000 (UTC) (envelope-from jos@catnook.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 566778FC14; Sun, 12 Feb 2012 22:37:10 +0000 (UTC) Received: by obcwo16 with SMTP id wo16so7759319obc.13 for ; Sun, 12 Feb 2012 14:37:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.47.37 with SMTP id a5mr9804227obn.41.1329086229951; Sun, 12 Feb 2012 14:37:09 -0800 (PST) Received: by 10.182.116.33 with HTTP; Sun, 12 Feb 2012 14:37:09 -0800 (PST) Received: by 10.182.116.33 with HTTP; Sun, 12 Feb 2012 14:37:09 -0800 (PST) In-Reply-To: <86wr7r4u1q.fsf@kopusha.home.net> References: <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> <861upz6fcg.fsf@kopusha.home.net> <20120212200253.GC1355@garage.freebsd.pl> <4F38240B.5040507@zonov.org> <86wr7r4u1q.fsf@kopusha.home.net> Date: Sun, 12 Feb 2012 14:37:09 -0800 Message-ID: From: Jos Backus To: Mikolaj Golub X-Gm-Message-State: ALoCoQn+ugJNH6lgk/EV86J1965QwWHXA/GkKp8KOTIua0q2QS1KPVvnL+VeEIT4AJQVw3Ofj0cM Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , Guy Helmer , svn-src-all@freebsd.org, Andrey Zonov , svn-src-head@freebsd.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 22:37:11 -0000 On Feb 12, 2012 1:32 PM, "Mikolaj Golub" wrote: > > > On Sun, 12 Feb 2012 12:56:58 -0800 Jos Backus wrote: > > JB> Right. So why not add a Unix socket listener to daemon(8) so the rc.d > JB> script can send commands over the socket instead of using the pidfile? > JB> This is what supervise/svc let you do today. > > JB> I don't understand why this solution isn't obvious once you are > JB> committed to running daemon(8) for each service anyway. And then you > JB> don't need pidfiles because now you have a much better, standard > JB> control interface (sending commands to daemon(8) and gathering > JB> responses). > > Why do you think one is committed to running daemon(8) for each service? > daemon(8) is for a program that can't daemonize itself and you want an easy > way to run it detached from a terminal. And have an easy way to integrate it > in rc(8) using rc.subr(8). And rc.subr(8) knows about pidfiles but knows > nothing about unix sockets. I realize that. But ISTR someone mentioned earlier keeping daemon(8) running to keep the pidfile open or something to that effect. > > Although I don't say that the idea to use a socket file for monitoring and > control is bad in general. Right. This approach has a number of benefits. I emailed the daemontools- encore author about including it in FreeBSD but so far he hasn't responded. Jos > > -- > Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 23:07:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB878106564A; Sun, 12 Feb 2012 23:07:45 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D53D48FC08; Sun, 12 Feb 2012 23:07:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CN7jq1004915; Sun, 12 Feb 2012 23:07:45 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CN7j02004913; Sun, 12 Feb 2012 23:07:45 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201202122307.q1CN7j02004913@svn.freebsd.org> From: Brooks Davis Date: Sun, 12 Feb 2012 23:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231566 - stable/9/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 23:07:46 -0000 Author: brooks Date: Sun Feb 12 23:07:45 2012 New Revision: 231566 URL: http://svn.freebsd.org/changeset/base/231566 Log: MFC 231196: eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r and ether_nota_r and do not use static variables so remove the note copied from ethers.3 saying they do. Reported by: bms Modified: stable/9/lib/libc/net/eui64.3 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/net/eui64.3 ============================================================================== --- stable/9/lib/libc/net/eui64.3 Sun Feb 12 19:29:34 2012 (r231565) +++ stable/9/lib/libc/net/eui64.3 Sun Feb 12 23:07:45 2012 (r231566) @@ -221,10 +221,3 @@ These functions first appears in They are derived from the .Xr ethers 3 family of functions. -.Sh BUGS -The -.Fn eui64_aton -and -.Fn eui64_ntoa -functions returns values that are stored in static memory areas -which may be overwritten the next time they are called. From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 23:12:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85CDA106564A; Sun, 12 Feb 2012 23:12:47 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 707698FC08; Sun, 12 Feb 2012 23:12:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CNClJi005137; Sun, 12 Feb 2012 23:12:47 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CNClnX005135; Sun, 12 Feb 2012 23:12:47 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201202122312.q1CNClnX005135@svn.freebsd.org> From: Brooks Davis Date: Sun, 12 Feb 2012 23:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231567 - stable/8/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 23:12:47 -0000 Author: brooks Date: Sun Feb 12 23:12:47 2012 New Revision: 231567 URL: http://svn.freebsd.org/changeset/base/231567 Log: MFC 231196: eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r and ether_nota_r and do not use static variables so remove the note copied from ethers.3 saying they do. Reported by: bms Modified: stable/8/lib/libc/net/eui64.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/net/eui64.3 ============================================================================== --- stable/8/lib/libc/net/eui64.3 Sun Feb 12 23:07:45 2012 (r231566) +++ stable/8/lib/libc/net/eui64.3 Sun Feb 12 23:12:47 2012 (r231567) @@ -221,10 +221,3 @@ These functions first appears in They are derived from the .Xr ethers 3 family of functions. -.Sh BUGS -The -.Fn eui64_aton -and -.Fn eui64_ntoa -functions returns values that are stored in static memory areas -which may be overwritten the next time they are called. From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 23:18:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABE3E106564A; Sun, 12 Feb 2012 23:18:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 964C68FC0C; Sun, 12 Feb 2012 23:18:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1CNI5KY005367; Sun, 12 Feb 2012 23:18:05 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CNI5YQ005365; Sun, 12 Feb 2012 23:18:05 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201202122318.q1CNI5YQ005365@svn.freebsd.org> From: Brooks Davis Date: Sun, 12 Feb 2012 23:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231568 - head/usr.sbin/periodic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 23:18:05 -0000 Author: brooks Date: Sun Feb 12 23:18:05 2012 New Revision: 231568 URL: http://svn.freebsd.org/changeset/base/231568 Log: Prevent periodic scripts that run longer than the expected period from starting up before the previous script finishes. This prevents an infinite number of them from piling up and slowing a system down. Since all the refactoring to make this happen required churning the indenting of most of this file, make the indentation more consistent. Reviewed by: simon MFC after: 1 week Modified: head/usr.sbin/periodic/periodic.sh Modified: head/usr.sbin/periodic/periodic.sh ============================================================================== --- head/usr.sbin/periodic/periodic.sh Sun Feb 12 23:12:47 2012 (r231567) +++ head/usr.sbin/periodic/periodic.sh Sun Feb 12 23:18:05 2012 (r231568) @@ -14,6 +14,18 @@ usage () { exit 1 } +output_pipe() +{ + # Where's our output going ? + eval output=\$${1##*/}_output + case "$output" in + /*) pipe="cat >>$output";; + "") pipe=cat;; + *) pipe="mail -E -s '$host ${1##*/} run output' $output";; + esac + eval $pipe +} + if [ $# -lt 1 ] ; then usage fi @@ -27,83 +39,102 @@ fi host=`hostname` export host + +# If we were called normally, then create a lock file for each argument +# in turn and reinvoke ourselves with the LOCKED argument. This prevents +# very long running jobs from being overlapped by another run as this is +# will lead the system running progressivly slower and more and more jobs +# are run at once. +if [ $1 != "LOCKED" ]; then + ret=0 + for arg; do + lockfile=/var/run/periodic.${arg##*/}.lock + lockf -t 0 "${lockfile}" /bin/sh $0 LOCKED "$arg" + case $? in + 0) ;; + 73) #EX_CANTCREATE + echo "can't create ${lockfile}" | output_pipe $arg + ret=1 + ;; + 75) #EX_TEMPFAIL + echo "$host ${arg##*/} prior run still in progress" | \ + output_pipe $arg + ret=1 + ;; + *) + ret=1 + ;; + esac + done + exit $ret +fi + +if [ $# -ne 2 ]; then + usage +fi +shift +arg=$1 + tmp_output=`mktemp ${TMPDIR:-/tmp}/periodic.XXXXXXXXXX` # Execute each executable file in the directory list. If the x bit is not # set, assume the user didn't really want us to muck with it (it's a # README file or has been disabled). -for arg -do - # Where's our output going ? - eval output=\$${arg##*/}_output - case "$output" in - /*) pipe="cat >>$output";; - "") pipe=cat;; - *) pipe="mail -E -s '$host ${arg##*/} run output' $output";; +success=YES info=YES badconfig=NO empty_output=YES # Defaults when ${run}_* aren't YES/NO +for var in success info badconfig empty_output; do + case $(eval echo "\$${arg##*/}_show_$var") in + [Yy][Ee][Ss]) eval $var=YES;; + [Nn][Oo]) eval $var=NO;; esac +done - success=YES info=YES badconfig=NO empty_output=YES # Defaults when ${run}_* aren't YES/NO - for var in success info badconfig empty_output - do - case $(eval echo "\$${arg##*/}_show_$var") in - [Yy][Ee][Ss]) eval $var=YES;; - [Nn][Oo]) eval $var=NO;; - esac +case $arg in +/*) if [ -d "$arg" ]; then + dirlist="$arg" + else + echo "$0: $arg not found" >&2 + continue + fi + ;; +*) dirlist= + for top in /etc/periodic ${local_periodic}; do + [ -d $top/$arg ] && dirlist="$dirlist $top/$arg" done + ;; +esac - case $arg in - /*) if [ -d "$arg" ] - then - dirlist="$arg" - else - echo "$0: $arg not found" >&2 - continue - fi;; - *) dirlist= - for top in /etc/periodic ${local_periodic} - do - [ -d $top/$arg ] && dirlist="$dirlist $top/$arg" - done;; - esac - - { - empty=TRUE - processed=0 - for dir in $dirlist - do - for file in $dir/* - do - if [ -x $file -a ! -d $file ] - then - output=TRUE - processed=$(($processed + 1)) - $file $tmp_output 2>&1 - rc=$? - if [ -s $tmp_output ] - then - case $rc in - 0) [ $success = NO ] && output=FALSE;; - 1) [ $info = NO ] && output=FALSE;; - 2) [ $badconfig = NO ] && output=FALSE;; - esac - [ $output = TRUE ] && { cat $tmp_output; empty=FALSE; } - fi - cp /dev/null $tmp_output +{ + empty=TRUE + processed=0 + for dir in $dirlist; do + for file in $dir/*; do + if [ -x $file -a ! -d $file ]; then + output=TRUE + processed=$(($processed + 1)) + $file $tmp_output 2>&1 + rc=$? + if [ -s $tmp_output ]; then + case $rc in + 0) [ $success = NO ] && output=FALSE;; + 1) [ $info = NO ] && output=FALSE;; + 2) [ $badconfig = NO ] && output=FALSE;; + esac + [ $output = TRUE ] && { cat $tmp_output; empty=FALSE; } fi - done + cp /dev/null $tmp_output + fi done - if [ $empty = TRUE ] - then - if [ $empty_output = TRUE ] - then + done + if [ $empty = TRUE ]; then + if [ $empty_output = TRUE ]; then [ $processed = 1 ] && plural= || plural=s echo "No output from the $processed file$plural processed" - fi - else - echo "" - echo "-- End of $arg output --" fi - } | eval $pipe -done + else + echo "" + echo "-- End of $arg output --" + fi +} | output_pipe ${arg} + rm -f $tmp_output From owner-svn-src-all@FreeBSD.ORG Mon Feb 13 00:28:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABF5F1065670; Mon, 13 Feb 2012 00:28:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A9E58FC13; Mon, 13 Feb 2012 00:28:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1D0SfAJ007694; Mon, 13 Feb 2012 00:28:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1D0SfsB007692; Mon, 13 Feb 2012 00:28:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202130028.q1D0SfsB007692@svn.freebsd.org> From: Adrian Chadd Date: Mon, 13 Feb 2012 00:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231571 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 00:28:41 -0000 Author: adrian Date: Mon Feb 13 00:28:41 2012 New Revision: 231571 URL: http://svn.freebsd.org/changeset/base/231571 Log: Attempt to address some potential vap->iv_bss race conditions. There are unfortunately a number of situations where vap->iv_bss is changed or freed by some code in net80211. Because multiple threads can concurrently be doing work (and the vap->iv_bss access isn't at all done behind any kind of lock), it's quite possible that: * a change will occur in one thread - eg, by a call through ieee80211_sta_join1(); * a state change occurs in another thread - eg an RX is scheduled in the ath tasklet and it calls ieee80211_input_mimo_all(), which does dereference vap->iv_bss; * these two executing concurrently, causing things to explode. Another instance is ath_beacon_alloc() which takes an ieee80211_node *. It's called with the vap->iv_bss node from ath_newstate(). If the node has changed in the meantime (say it's been freed elsewhere) the reference that it grabbed _before_ refcounting it may be stale. I would _prefer_ that these sorts of things were serialised somewhere but that may be a bit much to ask. Instead, the best we can (currently) hope is that the underlying bss node is still (somewhat) valid. There is a related PR (kern/164382) described by the first case above. That should be fixed by properly serialising the RX path and reset path so an RX can't occur at the same time as the vap free/shutdown path. This is inspired by some related fixes in r212127. PR: kern/165060 Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Feb 12 23:48:39 2012 (r231570) +++ head/sys/dev/ath/if_ath.c Mon Feb 13 00:28:41 2012 (r231571) @@ -1669,6 +1669,7 @@ ath_bmiss_vap(struct ieee80211vap *vap) struct ath_softc *sc = ifp->if_softc; u_int64_t lastrx = sc->sc_lastrx; u_int64_t tsf = ath_hal_gettsf64(sc->sc_ah); + /* XXX should take a locked ref to iv_bss */ u_int bmisstimeout = vap->iv_bmissthreshold * vap->iv_bss->ni_intval * 1024; @@ -3245,7 +3246,7 @@ ath_beacon_config(struct ath_softc *sc, if (vap == NULL) vap = TAILQ_FIRST(&ic->ic_vaps); /* XXX */ - ni = vap->iv_bss; + ni = ieee80211_ref_node(vap->iv_bss); /* extract tstamp from last beacon and convert to TU */ nexttbtt = TSF_TO_TU(LE_READ_4(ni->ni_tstamp.data + 4), @@ -3415,6 +3416,7 @@ ath_beacon_config(struct ath_softc *sc, ath_beacon_start_adhoc(sc, vap); } sc->sc_syncbeacon = 0; + ieee80211_free_node(ni); #undef FUDGE #undef TSF_TO_TU } @@ -3853,6 +3855,7 @@ ath_recv_mgmt(struct ieee80211_node *ni, switch (subtype) { case IEEE80211_FC0_SUBTYPE_BEACON: /* update rssi statistics for use by the hal */ + /* XXX unlocked check against vap->iv_bss? */ ATH_RSSI_LPF(sc->sc_halstats.ns_avgbrssi, rssi); if (sc->sc_syncbeacon && ni == vap->iv_bss && vap->iv_state == IEEE80211_S_RUN) { @@ -5721,7 +5724,7 @@ ath_newstate(struct ieee80211vap *vap, e taskqueue_unblock(sc->sc_tq); } - ni = vap->iv_bss; + ni = ieee80211_ref_node(vap->iv_bss); rfilt = ath_calcrxfilter(sc); stamode = (vap->iv_opmode == IEEE80211_M_STA || vap->iv_opmode == IEEE80211_M_AHDEMO || @@ -5752,7 +5755,8 @@ ath_newstate(struct ieee80211vap *vap, e if (nstate == IEEE80211_S_RUN) { /* NB: collect bss node again, it may have changed */ - ni = vap->iv_bss; + ieee80211_free_node(ni); + ni = ieee80211_ref_node(vap->iv_bss); DPRINTF(sc, ATH_DEBUG_STATE, "%s(RUN): iv_flags 0x%08x bintvl %d bssid %s " @@ -5875,6 +5879,7 @@ ath_newstate(struct ieee80211vap *vap, e #endif } bad: + ieee80211_free_node(ni); return error; } @@ -5893,6 +5898,7 @@ ath_setup_stationkey(struct ieee80211_no struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc; ieee80211_keyix keyix, rxkeyix; + /* XXX should take a locked ref to vap->iv_bss */ if (!ath_key_alloc(vap, &ni->ni_ucastkey, &keyix, &rxkeyix)) { /* * Key cache is full; we'll fall back to doing @@ -6448,6 +6454,7 @@ ath_tdma_config(struct ath_softc *sc, st return; } } + /* XXX should take a locked ref to iv_bss */ tp = vap->iv_bss->ni_txparms; /* * Calculate the guard time for each slot. This is the @@ -6697,6 +6704,7 @@ ath_tdma_beacon_send(struct ath_softc *s * Record local TSF for our last send for use * in arbitrating slot collisions. */ + /* XXX should take a locked ref to iv_bss */ vap->iv_bss->ni_tstamp.tsf = ath_hal_gettsf64(ah); } } From owner-svn-src-all@FreeBSD.ORG Mon Feb 13 01:33:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBD6B106566C; Mon, 13 Feb 2012 01:33:39 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6ED38FC0A; Mon, 13 Feb 2012 01:33:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1D1Xdo2009789; Mon, 13 Feb 2012 01:33:39 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1D1XdDP009787; Mon, 13 Feb 2012 01:33:39 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201202130133.q1D1XdDP009787@svn.freebsd.org> From: Kirk McKusick Date: Mon, 13 Feb 2012 01:33:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231572 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 01:33:40 -0000 Author: mckusick Date: Mon Feb 13 01:33:39 2012 New Revision: 231572 URL: http://svn.freebsd.org/changeset/base/231572 Log: Missing conditions in checking whether an inode has been written. Found and tested by: Peter Holm MFC after: 2 weeks (to 9 only) Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Feb 13 00:28:41 2012 (r231571) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Feb 13 01:33:39 2012 (r231572) @@ -7161,13 +7161,16 @@ check_inode_unwritten(inodedep) mtx_assert(&lk, MA_OWNED); if ((inodedep->id_state & (DEPCOMPLETE | UNLINKED)) != 0 || + !LIST_EMPTY(&inodedep->id_dirremhd) || !LIST_EMPTY(&inodedep->id_pendinghd) || !LIST_EMPTY(&inodedep->id_bufwait) || !LIST_EMPTY(&inodedep->id_inowait) || + !TAILQ_EMPTY(&inodedep->id_inoreflst) || !TAILQ_EMPTY(&inodedep->id_inoupdt) || !TAILQ_EMPTY(&inodedep->id_newinoupdt) || !TAILQ_EMPTY(&inodedep->id_extupdt) || !TAILQ_EMPTY(&inodedep->id_newextupdt) || + !TAILQ_EMPTY(&inodedep->id_freeblklst) || inodedep->id_mkdiradd != NULL || inodedep->id_nlinkdelta != 0) return (0); From owner-svn-src-all@FreeBSD.ORG Mon Feb 13 01:44:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B3A4106564A; Mon, 13 Feb 2012 01:44:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 463D38FC08; Mon, 13 Feb 2012 01:44:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1D1iD7a010139; Mon, 13 Feb 2012 01:44:13 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1D1iD4X010137; Mon, 13 Feb 2012 01:44:13 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201202130144.q1D1iD4X010137@svn.freebsd.org> From: Ed Maste Date: Mon, 13 Feb 2012 01:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231573 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 01:44:13 -0000 Author: emaste Date: Mon Feb 13 01:44:12 2012 New Revision: 231573 URL: http://svn.freebsd.org/changeset/base/231573 Log: Fix panic after "WARNING - ATA_IDENTIFY taskqueue timeout" When performing a firmware upgrade via atacontrol[1] the subsequent command may time out producing the error message above. When this happens the callout could still be active, and the system would then panic due to a destroyed semaphore. Instead, ensure that the callout is done first, via callout_drain. Note that this fix applies to the "old" ata(4) and so isn't applicable to the default configuration in HEAD. It is still applicable to stable/8. [1] http://lists.freebsd.org/pipermail/freebsd-current/2012-January/031122.html Submitted by: Nima Misaghian Reviewed by: rstone, attilio, mav Obtained from: SVOS MFC after: 3 days Modified: head/sys/dev/ata/ata-queue.c Modified: head/sys/dev/ata/ata-queue.c ============================================================================== --- head/sys/dev/ata/ata-queue.c Mon Feb 13 01:33:39 2012 (r231572) +++ head/sys/dev/ata/ata-queue.c Mon Feb 13 01:44:12 2012 (r231573) @@ -112,6 +112,7 @@ ata_queue_request(struct ata_request *re ATA_DEBUG_RQ(request, "wait for completion"); if (!dumping && sema_timedwait(&request->done, request->timeout * hz * 4)) { + callout_drain(&request->callout); device_printf(request->dev, "WARNING - %s taskqueue timeout " "- completing request directly\n", From owner-svn-src-all@FreeBSD.ORG Mon Feb 13 06:20:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2D71065672; Mon, 13 Feb 2012 06:20:50 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id B07768FC12; Mon, 13 Feb 2012 06:20:48 +0000 (UTC) Received: by bkcjg1 with SMTP id jg1so4087454bkc.13 for ; Sun, 12 Feb 2012 22:20:47 -0800 (PST) Received: by 10.204.152.25 with SMTP id e25mr5428036bkw.49.1329114047667; Sun, 12 Feb 2012 22:20:47 -0800 (PST) Received: from [10.254.254.77] (ppp95-165-146-120.pppoe.spdop.ru. [95.165.146.120]) by mx.google.com with ESMTPS id cz3sm42974110bkb.3.2012.02.12.22.20.46 (version=SSLv3 cipher=OTHER); Sun, 12 Feb 2012 22:20:47 -0800 (PST) Message-ID: <4F38ABBD.7080502@zonov.org> Date: Mon, 13 Feb 2012 10:20:45 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Dmitry Morozovsky References: <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> <861upz6fcg.fsf@kopusha.home.net> <20120212200253.GC1355@garage.freebsd.pl> <4F38240B.5040507@zonov.org> In-Reply-To: