From owner-svn-src-head@FreeBSD.ORG Sun Feb 12 05:14:13 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 05:34:02 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 07:45:49 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 09:19:29 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 14:54:19 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 14:55:27 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 14:58:50 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 16:43:29 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 16:53:47 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 17:44:41 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 18:29:57 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 19:07:02 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 19:29:35 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 19:49:23 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 20:04:16 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 20:09:39 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 20:49:45 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 20:56:59 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 21:17:08 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 21:32:24 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 22:37:11 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Feb 12 23:18:05 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Feb 13 00:28:41 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Feb 13 01:33:39 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Feb 13 01:44:13 2012 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Feb 13 06:20:50 2012 Return-Path: Delivered-To: svn-src-head@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: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkfxKeoDkIm4+Cksj/K8jl8n5S3ilQlthjX0oe84R1y7L9zaPxsCmiR+vrKdAeHKI8q6L8i 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 06:20:50 -0000 On 13.02.2012 0:56, Dmitry Morozovsky wrote: > 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. > OK, another solution for this problem is do not automatically remove pidfile when pidfile_write() fails. I can explain this. Sometimes daemons crash and I want to restart them. I use cron for this purpose like this: */5 * * * * root /usr/local/etc/rc.d/mydaemon status > /dev/null || /usr/local/etc/rc.d/mydaemon start and if mydaemon doesn't listen any socket or pidfile_write() fails and remove pidfile (it doesn't hold lock on it, in fact) mydaemon will start. If you have other solution -- welcome. -- Andrey Zonov From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 07:47:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3E88106564A; Mon, 13 Feb 2012 07:47:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C89098FC0A; Mon, 13 Feb 2012 07:47:16 +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 q1D7lG4a022656; Mon, 13 Feb 2012 07:47:16 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1D7lGUB022654; Mon, 13 Feb 2012 07:47:16 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201202130747.q1D7lGUB022654@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 13 Feb 2012 07:47:16 +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: r231575 - head/etc/devd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 07:47:17 -0000 Author: hselasky Date: Mon Feb 13 07:47:16 2012 New Revision: 231575 URL: http://svn.freebsd.org/changeset/base/231575 Log: Re-generate /etc/devd/usb.conf MFC after: 1 day Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Mon Feb 13 07:30:42 2012 (r231574) +++ head/etc/devd/usb.conf Mon Feb 13 07:47:16 2012 (r231575) @@ -157,7 +157,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6010|0x6011|0x8372|0x9e90|0xcc48|0xcc49|0xcc4a|0xd678|0xe6c8|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xee18|0xf608|0xf60b|0xf850|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfc08|0xfc09|0xfc0b|0xfc0c|0xfc0d|0xfc82)"; + match "product" "(0x6001|0x6004|0x6010|0x6011|0x8372|0x9e90|0xa6d0|0xa6d0|0xcc48|0xcc49|0xcc4a|0xd678|0xe6c8|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xee18|0xf608|0xf60b|0xf850|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfc08|0xfc09|0xfc0b|0xfc0c|0xfc0d|0xfc82)"; action "kldload uftdi"; }; @@ -293,7 +293,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0411"; - match "product" "(0x0148|0x0150|0x015d|0x016f)"; + match "product" "(0x0148|0x0150|0x015d|0x016f|0x01a2)"; action "kldload if_run"; }; @@ -1021,7 +1021,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05c6"; - match "product" "(0x6000|0x6613)"; + match "product" "(0x1000|0x6000|0x6613)"; action "kldload u3g"; }; @@ -1301,7 +1301,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0789"; - match "product" "(0x0162|0x0163|0x0164)"; + match "product" "(0x0162|0x0163|0x0164|0x0166)"; action "kldload if_run"; }; @@ -2093,7 +2093,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b95"; - match "product" "(0x1720|0x1780|0x7720|0x772a|0x772b)"; + match "product" "(0x1720|0x1780|0x7720|0x772a|0x772b|0x7e2b)"; action "kldload if_axe"; }; @@ -4205,6 +4205,15 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "intclass" "0x02"; + match "intsubclass" "0x02"; + match "intprotocol" "0xff"; + action "kldload umodem"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "intclass" "0x03"; match "intsubclass" "0x01"; match "intprotocol" "0x01"; @@ -4327,5 +4336,5 @@ nomatch 32 { action "kldload umass"; }; -# 1645 USB entries processed +# 1652 USB entries processed From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 07:47:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47AB2106564A; Mon, 13 Feb 2012 07:47:37 +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 2B8BB8FC13; Mon, 13 Feb 2012 07:47:37 +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 q1D7lbRc022702; Mon, 13 Feb 2012 07:47:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1D7lajK022699; Mon, 13 Feb 2012 07:47:36 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202130747.q1D7lajK022699@svn.freebsd.org> From: Adrian Chadd Date: Mon, 13 Feb 2012 07:47:36 +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: r231576 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 07:47:37 -0000 Author: adrian Date: Mon Feb 13 07:47:36 2012 New Revision: 231576 URL: http://svn.freebsd.org/changeset/base/231576 Log: Correct the 802.11s mesh configuration structure and related tidbits. * Change the mesh IE size to be IEEE80211_MESH_CONF_SZ rather than the size of the structure; * conf_cap is now a uint8_t rather than a uint16_t (uint16_t in D3.0, uint8_t in the amendment spec); * Update mesh config capability bits - earlier bits were from draft X, current is amendment spec; * Update the following to be an enum rather than #define and added a VENDOR entry too from the amendment spec; IEEE80211_MESHCONF_PATH_* IEEE80211_MESHCONF_METRIC_* IEEE80211_MESHCONF_CC_* IEEE80211_MESHCONF_SYNC_* IEEE80211_MESHCONF_AUTH_* * Kept IEEE80211_MESHCONF_FORM_* and IEEE80211_MESHCONF_CAP_* as defines because they are defined in a way that we need to mask in/out information; * In IEEE80211_MESHCONF_CAP_* IEEE80211_MESHCONF_CAP_TBTTA is removed and 0x80 is made reserved as defined in the amendment spec. Submitted by: monthadar@gmail.com Reviewed by: rpaulo Modified: head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_mesh.h Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Mon Feb 13 07:47:16 2012 (r231575) +++ head/sys/net80211/ieee80211_mesh.c Mon Feb 13 07:47:36 2012 (r231576) @@ -2289,7 +2289,6 @@ mesh_verify_meshconf(struct ieee80211vap const struct ieee80211_meshconf_ie *meshconf = (const struct ieee80211_meshconf_ie *) ie; const struct ieee80211_mesh_state *ms = vap->iv_mesh; - uint16_t cap; if (meshconf == NULL) return 1; @@ -2323,10 +2322,8 @@ mesh_verify_meshconf(struct ieee80211vap meshconf->conf_pselid); return 1; } - /* NB: conf_cap is only read correctly here */ - cap = LE_READ_2(&meshconf->conf_cap); /* Not accepting peers */ - if (!(cap & IEEE80211_MESHCONF_CAP_AP)) { + if (!(meshconf->conf_cap & IEEE80211_MESHCONF_CAP_AP)) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, "not accepting peers: 0x%x\n", meshconf->conf_cap); return 1; @@ -2395,7 +2392,7 @@ ieee80211_add_meshconf(uint8_t *frm, str KASSERT(vap->iv_opmode == IEEE80211_M_MBSS, ("not a MBSS vap")); *frm++ = IEEE80211_ELEMID_MESHCONF; - *frm++ = sizeof(struct ieee80211_meshconf_ie) - 2; + *frm++ = IEEE80211_MESH_CONF_SZ; *frm++ = ms->ms_ppath->mpp_ie; /* path selection */ *frm++ = ms->ms_pmetric->mpm_ie; /* link metric */ *frm++ = IEEE80211_MESHCONF_CC_DISABLED; @@ -2411,7 +2408,7 @@ ieee80211_add_meshconf(uint8_t *frm, str caps |= IEEE80211_MESHCONF_CAP_AP; if (ms->ms_flags & IEEE80211_MESHFLAGS_FWD) caps |= IEEE80211_MESHCONF_CAP_FWRD; - ADDSHORT(frm, caps); + *frm++ = caps; return frm; } Modified: head/sys/net80211/ieee80211_mesh.h ============================================================================== --- head/sys/net80211/ieee80211_mesh.h Mon Feb 13 07:47:16 2012 (r231575) +++ head/sys/net80211/ieee80211_mesh.h Mon Feb 13 07:47:36 2012 (r231576) @@ -40,6 +40,7 @@ * 802.11s Information Elements. */ /* Mesh Configuration */ +#define IEEE80211_MESH_CONF_SZ (7) struct ieee80211_meshconf_ie { uint8_t conf_ie; /* IEEE80211_ELEMID_MESHCONF */ uint8_t conf_len; @@ -49,31 +50,66 @@ struct ieee80211_meshconf_ie { uint8_t conf_syncid; /* Sync. Protocol ID */ uint8_t conf_authid; /* Auth. Protocol ID */ uint8_t conf_form; /* Formation Information */ - uint16_t conf_cap; + uint8_t conf_cap; } __packed; /* Hybrid Wireless Mesh Protocol */ -#define IEEE80211_MESHCONF_PATH_HWMP 0x00 +enum { + /* 0 reserved */ + IEEE80211_MESHCONF_PATH_HWMP = 1, + /* 2-254 reserved */ + IEEE80211_MESHCONF_PATH_VENDOR = 255, +}; + /* Airtime Link Metric */ -#define IEEE80211_MESHCONF_METRIC_AIRTIME 0x00 +enum { + /* 0 reserved */ + IEEE80211_MESHCONF_METRIC_AIRTIME = 1, + /* 2-254 reserved */ + IEEE80211_MESHCONF_METRIC_VENDOR = 255, +}; + /* Congestion Control */ -#define IEEE80211_MESHCONF_CC_DISABLED 0x00 -#define IEEE80211_MESHCONF_CC_SIG 0x01 +enum { + IEEE80211_MESHCONF_CC_DISABLED = 0, + IEEE80211_MESHCONF_CC_SIG = 1, + /* 2-254 reserved */ + IEEE80211_MESHCONF_CC_VENDOR = 255, +}; + /* Neighbour Offset */ -#define IEEE80211_MESHCONF_SYNC_NEIGHOFF 0x00 -#define IEEE80211_MESHCONF_AUTH_DISABLED 0x00 -/* Simultaneous Authenticaction of Equals */ -#define IEEE80211_MESHCONF_AUTH_SAE 0x01 -#define IEEE80211_MESHCONF_FORM_MP 0x01 /* Connected to Portal */ -#define IEEE80211_MESHCONF_FORM_NNEIGH_MASK 0x04 /* Number of Neighbours */ +enum { + /* 0 reserved */ + IEEE80211_MESHCONF_SYNC_NEIGHOFF = 1, + /* 2-254 rserved */ + IEEE80211_MESHCONF_SYNC_VENDOR = 255, +}; + +/* Authentication Protocol Identifier */ +enum { + + IEEE80211_MESHCONF_AUTH_DISABLED = 0, + /* Simultaneous Authenticaction of Equals */ + IEEE80211_MESHCONF_AUTH_SEA = 1, + IEEE80211_MESHCONF_AUTH_8021X = 2, /* IEEE 802.1X */ + /* 3-254 reserved */ + IEEE80211_MESHCONF_AUTH_VENDOR = 255, +}; + +/* Mesh Formation Info */ +#define IEEE80211_MESHCONF_FORM_MP 0x01 /* Connected to Portal */ +#define IEEE80211_MESHCONF_FORM_NNEIGH_MASK 0x7E /* Number of Neighbours */ +#define IEEE80211_MESHCONF_FORM_SA 0xF0 /* indicating 802.1X auth */ + +/* Mesh Capability */ #define IEEE80211_MESHCONF_CAP_AP 0x01 /* Accepting Peers */ #define IEEE80211_MESHCONF_CAP_MCCAS 0x02 /* MCCA supported */ #define IEEE80211_MESHCONF_CAP_MCCAE 0x04 /* MCCA enabled */ #define IEEE80211_MESHCONF_CAP_FWRD 0x08 /* forwarding enabled */ #define IEEE80211_MESHCONF_CAP_BTR 0x10 /* Beacon Timing Report Enab */ -#define IEEE80211_MESHCONF_CAP_TBTTA 0x20 /* TBTT Adj. Enabled */ -#define IEEE80211_MESHCONF_CAP_TBTT 0x40 /* TBTT Adjusting */ -#define IEEE80211_MESHCONF_CAP_PSL 0x80 /* Power Save Level */ +#define IEEE80211_MESHCONF_CAP_TBTT 0x20 /* TBTT Adjusting */ +#define IEEE80211_MESHCONF_CAP_PSL 0x40 /* Power Save Level */ +/* 0x80 reserved */ /* Mesh Identifier */ struct ieee80211_meshid_ie { From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 11:15:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85A38106568D; Mon, 13 Feb 2012 11:15:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74B118FC19; Mon, 13 Feb 2012 11:15: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 q1DBFUZE040001; Mon, 13 Feb 2012 11:15:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1DBFUQ7039998; Mon, 13 Feb 2012 11:15:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202131115.q1DBFUQ7039998@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 13 Feb 2012 11:15:30 +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: r231582 - head/libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 11:15:30 -0000 Author: kib Date: Mon Feb 13 11:15:29 2012 New Revision: 231582 URL: http://svn.freebsd.org/changeset/base/231582 Log: Add missed EOL when die() was converted to use rtld_fdputstr() instead of errx(). Reported by: amdmi3 PR: bin/165075 MFC after: 3 days Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Feb 13 10:48:43 2012 (r231581) +++ head/libexec/rtld-elf/rtld.c Mon Feb 13 11:15:29 2012 (r231582) @@ -757,6 +757,7 @@ die(void) if (msg == NULL) msg = "Fatal error"; rtld_fdputstr(STDERR_FILENO, msg); + rtld_fdputchar(STDERR_FILENO, '\n'); _exit(1); } From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 12:00:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A41A0106564A; Mon, 13 Feb 2012 12:00:00 +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 839F88FC08; Mon, 13 Feb 2012 12:00:00 +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 q1DC0011041478; Mon, 13 Feb 2012 12:00:00 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1DC00AW041463; Mon, 13 Feb 2012 12:00:00 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201202131200.q1DC00AW041463@svn.freebsd.org> From: Ed Schouten Date: Mon, 13 Feb 2012 12:00:00 +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: r231584 - head/crypto/openssh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 12:00:00 -0000 Author: ed Date: Mon Feb 13 11:59:59 2012 New Revision: 231584 URL: http://svn.freebsd.org/changeset/base/231584 Log: Polish diff against upstream. - Revert unneeded whitespace changes. - Revert modifications to loginrec.c, as the upstream version already does the right thing. - Fix indentation and whitespace of local changes. Approved by: des MFC after: 1 month Modified: head/crypto/openssh/auth2.c head/crypto/openssh/channels.c head/crypto/openssh/channels.h head/crypto/openssh/kex.c head/crypto/openssh/loginrec.c (contents, props changed) head/crypto/openssh/readconf.c head/crypto/openssh/readconf.h head/crypto/openssh/servconf.c head/crypto/openssh/sftp.1 head/crypto/openssh/ssh.c head/crypto/openssh/sshd.c head/crypto/openssh/sshd_config.5 head/crypto/openssh/version.h Modified: head/crypto/openssh/auth2.c ============================================================================== --- head/crypto/openssh/auth2.c Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/auth2.c Mon Feb 13 11:59:59 2012 (r231584) @@ -223,8 +223,8 @@ input_userauth_request(int type, u_int32 login_cap_t *lc; const char *from_host, *from_ip; - from_host = get_canonical_hostname(options.use_dns); - from_ip = get_remote_ipaddr(); + from_host = get_canonical_hostname(options.use_dns); + from_ip = get_remote_ipaddr(); #endif if (authctxt == NULL) @@ -272,23 +272,23 @@ input_userauth_request(int type, u_int32 } #ifdef HAVE_LOGIN_CAP - if (authctxt->pw != NULL) { - lc = login_getpwclass(authctxt->pw); - if (lc == NULL) - lc = login_getclassbyname(NULL, authctxt->pw); - if (!auth_hostok(lc, from_host, from_ip)) { - logit("Denied connection for %.200s from %.200s [%.200s].", - authctxt->pw->pw_name, from_host, from_ip); - packet_disconnect("Sorry, you are not allowed to connect."); - } - if (!auth_timeok(lc, time(NULL))) { - logit("LOGIN %.200s REFUSED (TIME) FROM %.200s", - authctxt->pw->pw_name, from_host); - packet_disconnect("Logins not available right now."); - } - login_close(lc); - lc = NULL; - } + if (authctxt->pw != NULL) { + lc = login_getpwclass(authctxt->pw); + if (lc == NULL) + lc = login_getclassbyname(NULL, authctxt->pw); + if (!auth_hostok(lc, from_host, from_ip)) { + logit("Denied connection for %.200s from %.200s [%.200s].", + authctxt->pw->pw_name, from_host, from_ip); + packet_disconnect("Sorry, you are not allowed to connect."); + } + if (!auth_timeok(lc, time(NULL))) { + logit("LOGIN %.200s REFUSED (TIME) FROM %.200s", + authctxt->pw->pw_name, from_host); + packet_disconnect("Logins not available right now."); + } + login_close(lc); + lc = NULL; + } #endif /* HAVE_LOGIN_CAP */ /* reset state */ Modified: head/crypto/openssh/channels.c ============================================================================== --- head/crypto/openssh/channels.c Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/channels.c Mon Feb 13 11:59:59 2012 (r231584) @@ -824,7 +824,7 @@ channel_tcpwinsz(void) u_int maxlen; /* If we are not on a socket return 128KB. */ - if (!packet_connection_is_on_socket()) + if (!packet_connection_is_on_socket()) return (128 * 1024); tcpwinsz = 0; @@ -854,7 +854,7 @@ channel_pre_open(Channel *c, fd_set *rea limit = MIN(compat20 ? c->remote_window : packet_get_maxsize(), 2 * c->tcpwinsz); - + if (c->istate == CHAN_INPUT_OPEN && limit > 0 && buffer_len(&c->input) < limit && @@ -2687,10 +2687,10 @@ channel_set_af(int af) IPv4or6 = af; } -void +void channel_set_hpn(int disabled, u_int buf_size) { - hpn_disabled = disabled; + hpn_disabled = disabled; buffer_size = buf_size; debug("HPN Disabled: %d, HPN Buffer Size: %d", hpn_disabled, buffer_size); @@ -2856,10 +2856,10 @@ channel_setup_fwd_listener(int type, con c = channel_new("port listener", type, sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "port listener", 1); - else - c = channel_new("port listener", type, sock, sock, -1, - buffer_size, CHAN_TCP_PACKET_DEFAULT, - 0, "port listener", 1); + else + c = channel_new("port listener", type, sock, sock, -1, + buffer_size, CHAN_TCP_PACKET_DEFAULT, + 0, "port listener", 1); c->path = xstrdup(host); c->host_port = port_to_connect; c->listening_port = listen_port; Modified: head/crypto/openssh/channels.h ============================================================================== --- head/crypto/openssh/channels.h Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/channels.h Mon Feb 13 11:59:59 2012 (r231584) @@ -126,7 +126,7 @@ struct Channel { u_int local_window_max; u_int local_consumed; u_int local_maxpacket; - u_int tcpwinsz; + u_int tcpwinsz; int dynamic_window; int extended_usage; int single_connection; @@ -165,13 +165,10 @@ struct Channel { /* default window/packet sizes for tcp/x11-fwd-channel */ #define CHAN_SES_PACKET_DEFAULT (32*1024) #define CHAN_SES_WINDOW_DEFAULT (64*CHAN_SES_PACKET_DEFAULT) - #define CHAN_TCP_PACKET_DEFAULT (32*1024) #define CHAN_TCP_WINDOW_DEFAULT (64*CHAN_TCP_PACKET_DEFAULT) - #define CHAN_X11_PACKET_DEFAULT (16*1024) #define CHAN_X11_WINDOW_DEFAULT (4*CHAN_X11_PACKET_DEFAULT) - #define CHAN_HPN_MIN_WINDOW_DEFAULT (2*1024*1024) /* possible input states */ @@ -302,6 +299,7 @@ void chan_write_failed(Channel *); void chan_obuf_empty(Channel *); /* hpn handler */ -void channel_set_hpn(int, u_int); + +void channel_set_hpn(int, u_int); #endif Modified: head/crypto/openssh/kex.c ============================================================================== --- head/crypto/openssh/kex.c Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/kex.c Mon Feb 13 11:59:59 2012 (r231584) @@ -457,13 +457,13 @@ kex_choose_conf(Kex *kex) #ifdef NONE_CIPHER_ENABLED debug("REQUESTED ENC.NAME is '%s'", newkeys->enc.name); if (strcmp(newkeys->enc.name, "none") == 0) { - debug("Requesting NONE. Authflag is %d", auth_flag); + debug("Requesting NONE. Authflag is %d", auth_flag); if (auth_flag == 1) debug("None requested post authentication."); else fatal("Pre-authentication none cipher requests " "are not allowed."); - } + } #endif debug("kex: %s %s %s %s", ctos ? "client->server" : "server->client", Modified: head/crypto/openssh/loginrec.c ============================================================================== --- head/crypto/openssh/loginrec.c Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/loginrec.c Mon Feb 13 11:59:59 2012 (r231584) @@ -146,7 +146,6 @@ */ #include "includes.h" -__RCSID("$FreeBSD$"); #include #include @@ -516,10 +515,6 @@ getlast_entry(struct logininfo *li) return (utmpx_get_entry(li)); #endif -#if 1 - return (utmpx_get_entry(li)); -#endif - #if defined(DISABLE_LASTLOG) /* On some systems we shouldn't even try to obtain last login * time, e.g. AIX */ Modified: head/crypto/openssh/readconf.c ============================================================================== --- head/crypto/openssh/readconf.c Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/readconf.c Mon Feb 13 11:59:59 2012 (r231584) @@ -264,6 +264,7 @@ static struct { { "noneswitch", oNoneSwitch }, #endif { "versionaddendum", oVersionAddendum }, + { NULL, oBadOption } }; @@ -1092,9 +1093,9 @@ parse_int: case oNoneEnabled: intptr = &options->none_enabled; goto parse_flag; - + /* - * We check to see if the command comes from the command line or not. + * We check to see if the command comes from the command line or not. * If it does then enable it otherwise fail. NONE must never be a * default configuration. */ @@ -1110,7 +1111,7 @@ parse_int: "from the command line", filename); error("Continuing..."); return 0; - } + } #endif case oVersionAddendum: @@ -1458,7 +1459,7 @@ fill_default_options(Options * options) /* options->host_key_alias should not be set by default */ /* options->preferred_authentications will be set in ssh */ if (options->hpn_disabled == -1) - options->hpn_disabled = 0; + options->hpn_disabled = 0; if (options->hpn_buffer_size > -1) { u_int maxlen; @@ -1478,7 +1479,7 @@ fill_default_options(Options * options) } if (options->tcp_rcv_buf == 0) options->tcp_rcv_buf = 1; - if (options->tcp_rcv_buf > -1) + if (options->tcp_rcv_buf > -1) options->tcp_rcv_buf *= 1024; if (options->tcp_rcv_buf_poll == -1) options->tcp_rcv_buf_poll = 1; Modified: head/crypto/openssh/readconf.h ============================================================================== --- head/crypto/openssh/readconf.h Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/readconf.h Mon Feb 13 11:59:59 2012 (r231584) @@ -133,6 +133,7 @@ typedef struct { int visual_host_key; int use_roaming; + int request_tty; int hpn_disabled; /* Switch to disable HPN buffer management. */ Modified: head/crypto/openssh/servconf.c ============================================================================== --- head/crypto/openssh/servconf.c Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/servconf.c Mon Feb 13 11:59:59 2012 (r231584) @@ -166,7 +166,7 @@ fill_default_server_options(ServerOption _PATH_HOST_KEY_FILE; if (options->protocol & SSH_PROTO_2) { options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_RSA_KEY_FILE; + _PATH_HOST_RSA_KEY_FILE; options->host_key_files[options->num_host_key_files++] = _PATH_HOST_DSA_KEY_FILE; #ifdef OPENSSL_HAS_ECC @@ -286,7 +286,7 @@ fill_default_server_options(ServerOption options->ip_qos_interactive = IPTOS_LOWDELAY; if (options->ip_qos_bulk == -1) options->ip_qos_bulk = IPTOS_THROUGHPUT; - if (options->hpn_disabled == -1) + if (options->hpn_disabled == -1) options->hpn_disabled = 0; if (options->hpn_buffer_size == -1) { /* Modified: head/crypto/openssh/sftp.1 ============================================================================== --- head/crypto/openssh/sftp.1 Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/sftp.1 Mon Feb 13 11:59:59 2012 (r231584) @@ -246,7 +246,7 @@ diagnostic messages from Specify how many requests may be outstanding at any one time. Increasing this may slightly improve file transfer speed but will increase memory usage. -The default is 256 outstanding requests providing for 8MB +The default is 256 outstanding requests providing for 8MB of outstanding data with a 32KB buffer. .It Fl r Recursively copy entire directories when uploading and downloading. Modified: head/crypto/openssh/ssh.c ============================================================================== --- head/crypto/openssh/ssh.c Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/ssh.c Mon Feb 13 11:59:59 2012 (r231584) @@ -1461,6 +1461,7 @@ ssh_session2_open(void) c->dynamic_window = 1; debug("Enabled Dynamic Window Scaling\n"); } + debug3("ssh_session2_open: channel_new: %d", c->self); channel_send_open(c->self); Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/sshd.c Mon Feb 13 11:59:59 2012 (r231584) @@ -1916,11 +1916,11 @@ main(int ac, char **av) #ifdef __FreeBSD__ /* * Initialize the resolver. This may not happen automatically - * before privsep chroot(). + * before privsep chroot(). */ if ((_res.options & RES_INIT) == 0) { - debug("res_init()"); - res_init(); + debug("res_init()"); + res_init(); } #ifdef GSSAPI /* Modified: head/crypto/openssh/sshd_config.5 ============================================================================== --- head/crypto/openssh/sshd_config.5 Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/sshd_config.5 Mon Feb 13 11:59:59 2012 (r231584) @@ -499,7 +499,7 @@ or .Pp .Pa /etc/hosts.equiv and -.Pa /etc/ssh/shosts.equiv +.Pa /etc/ssh/shosts.equiv are still used. The default is .Dq yes . Modified: head/crypto/openssh/version.h ============================================================================== --- head/crypto/openssh/version.h Mon Feb 13 11:36:42 2012 (r231583) +++ head/crypto/openssh/version.h Mon Feb 13 11:59:59 2012 (r231584) @@ -2,11 +2,11 @@ /* $FreeBSD$ */ #ifndef SSH_VERSION -#define SSH_VERSION_BASE "OpenSSH_5.9p1" -#define SSH_VERSION_ADDENDUM "FreeBSD-20111001" +#define SSH_VERSION_BASE "OpenSSH_5.9p1" +#define SSH_VERSION_ADDENDUM "FreeBSD-20111001" #define SSH_VERSION_HPN "_hpn13v11" #define SSH_VERSION SSH_VERSION_BASE SSH_VERSION_HPN " " SSH_VERSION_ADDENDUM -#define SSH_RELEASE (ssh_version_get()) +#define SSH_RELEASE (ssh_version_get()) const char *ssh_version_get(void); void ssh_version_set_addendum(const char *); From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 13:07:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A43C1065676; Mon, 13 Feb 2012 13:07:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6988D8FC1F; Mon, 13 Feb 2012 13:07: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 q1DD7vjC043818; Mon, 13 Feb 2012 13:07:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1DD7vHn043816; Mon, 13 Feb 2012 13:07:57 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201202131307.q1DD7vHn043816@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 13 Feb 2012 13:07:57 +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: r231585 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 13:07:57 -0000 Author: glebius Date: Mon Feb 13 13:07:56 2012 New Revision: 231585 URL: http://svn.freebsd.org/changeset/base/231585 Log: No need to optimise for a node with no hooks, my braino. Modified: head/sys/netgraph/ng_socket.c Modified: head/sys/netgraph/ng_socket.c ============================================================================== --- head/sys/netgraph/ng_socket.c Mon Feb 13 11:59:59 2012 (r231584) +++ head/sys/netgraph/ng_socket.c Mon Feb 13 13:07:56 2012 (r231585) @@ -850,12 +850,9 @@ ngs_findhook(node_p node, const char *na uint32_t h; /* - * Microoptimisations for a ng_socket with no - * hooks, or with a single hook, which is a - * common case. + * Microoptimisation for an ng_socket with + * a single hook, which is a common case. */ - if (node->nd_numhooks == 0) - return (NULL); if (node->nd_numhooks == 1) { hook_p hook; From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 14:40:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE669106566B; Mon, 13 Feb 2012 14:40:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B25008FC13; Mon, 13 Feb 2012 14:40: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 q1DEeFVS046755; Mon, 13 Feb 2012 14:40:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1DEeFmH046752; Mon, 13 Feb 2012 14:40:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201202131440.q1DEeFmH046752@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 13 Feb 2012 14:40:15 +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: r231586 - head/usr.bin/write X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 14:40:16 -0000 Author: glebius Date: Mon Feb 13 14:40:15 2012 New Revision: 231586 URL: http://svn.freebsd.org/changeset/base/231586 Log: Fix write(1) to support wide characters. Submitted by: amdmi3 PR: bin/164317 Modified: head/usr.bin/write/write.1 head/usr.bin/write/write.c Modified: head/usr.bin/write/write.1 ============================================================================== --- head/usr.bin/write/write.1 Mon Feb 13 13:07:56 2012 (r231585) +++ head/usr.bin/write/write.1 Mon Feb 13 14:40:15 2012 (r231586) @@ -31,7 +31,7 @@ .\" @(#)write.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 17, 2004 +.Dd February 13, 2012 .Dt WRITE 1 .Os .Sh NAME @@ -107,7 +107,3 @@ setting is used to determine which chara terminal, not the receiver's (which .Nm has no way of knowing). -.Pp -The -.Nm -utility does not recognize multibyte characters. Modified: head/usr.bin/write/write.c ============================================================================== --- head/usr.bin/write/write.c Mon Feb 13 13:07:56 2012 (r231585) +++ head/usr.bin/write/write.c Mon Feb 13 14:40:15 2012 (r231586) @@ -60,12 +60,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include void done(int); void do_write(char *, char *, uid_t); static void usage(void); int term_chk(char *, int *, time_t *, int); -void wr_fputs(unsigned char *s); +void wr_fputs(wchar_t *s); void search_utmp(char *, char *, char *, uid_t); int utmp_chk(char *, char *); @@ -243,7 +245,8 @@ do_write(char *tty, char *mytty, uid_t m char *nows; struct passwd *pwd; time_t now; - char path[MAXPATHLEN], host[MAXHOSTNAMELEN], line[512]; + char path[MAXPATHLEN], host[MAXHOSTNAMELEN]; + wchar_t line[512]; /* Determine our login name before we reopen() stdout */ if ((login = getlogin()) == NULL) { @@ -269,7 +272,7 @@ do_write(char *tty, char *mytty, uid_t m (void)printf("\r\n\007\007\007Message from %s@%s on %s at %s ...\r\n", login, host, mytty, nows + 11); - while (fgets(line, sizeof(line), stdin) != NULL) + while (fgetws(line, sizeof(line)/sizeof(wchar_t), stdin) != NULL) wr_fputs(line); } @@ -288,30 +291,20 @@ done(int n __unused) * turns \n into \r\n */ void -wr_fputs(unsigned char *s) +wr_fputs(wchar_t *s) { -#define PUTC(c) if (putchar(c) == EOF) err(1, NULL); +#define PUTC(c) if (putwchar(c) == WEOF) err(1, NULL); - for (; *s != '\0'; ++s) { - if (*s == '\n') { - PUTC('\r'); - } else if (((*s & 0x80) && *s < 0xA0) || - /* disable upper controls */ - (!isprint(*s) && !isspace(*s) && - *s != '\a' && *s != '\b') - ) { - if (*s & 0x80) { - *s &= ~0x80; - PUTC('M'); - PUTC('-'); - } - if (iscntrl(*s)) { - *s ^= 0x40; - PUTC('^'); - } + for (; *s != L'\0'; ++s) { + if (*s == L'\n') { + PUTC(L'\r'); + PUTC(L'\n'); + } else if (iswprint(*s) || iswspace(*s)) { + PUTC(*s); + } else { + wprintf(L"<0x%X>", *s); } - PUTC(*s); } return; #undef PUTC From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 16:26:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D71CC1065670; Mon, 13 Feb 2012 16:26:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AEAA98FC18; Mon, 13 Feb 2012 16:26:40 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id D1B0B46B46; Mon, 13 Feb 2012 11:26:39 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 53E4FB925; Mon, 13 Feb 2012 11:26:39 -0500 (EST) From: John Baldwin To: "Bjoern A. Zeeb" Date: Mon, 13 Feb 2012 11:07:42 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201202110743.q1B7hXoq019215@svn.freebsd.org> In-Reply-To: <201202110743.q1B7hXoq019215@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201202131107.42248.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 13 Feb 2012 11:26:39 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231508 - head/sys/dev/oce X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 16:26:40 -0000 On Saturday, February 11, 2012 2:43:33 am Bjoern A. Zeeb wrote: > Author: bz > Date: Sat Feb 11 07:43:33 2012 > New Revision: 231508 > URL: http://svn.freebsd.org/changeset/base/231508 > > Log: > Make use of the read-only variant of the IF_ADDR_*LOCK() macros introduced > in r229614 rather than the compat one. Drivers should use the 'if_*addr_*lock()' functions, not the macros directly anyway. In this case it should likely be if_maddr_rlock() and if_maddr_runlock(). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 16:26:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CAA5106564A; Mon, 13 Feb 2012 16:26:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4417B8FC13; Mon, 13 Feb 2012 16:26:41 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id F378046B09; Mon, 13 Feb 2012 11:26:40 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 72704B93F; Mon, 13 Feb 2012 11:26:40 -0500 (EST) From: John Baldwin To: Ed Schouten Date: Mon, 13 Feb 2012 11:26:38 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201202101340.q1ADeWDj076596@svn.freebsd.org> In-Reply-To: <201202101340.q1ADeWDj076596@svn.freebsd.org> MIME-Version: 1.0 Message-Id: <201202131126.38759.jhb@freebsd.org> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 13 Feb 2012 11:26:40 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231383 - in head: lib/libutil usr.sbin/vipw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 16:26:41 -0000 On Friday, February 10, 2012 8:40:32 am Ed Schouten wrote: > Author: ed > Date: Fri Feb 10 13:40:32 2012 > New Revision: 231383 > URL: http://svn.freebsd.org/changeset/base/231383 > > Log: > Detect file modification properly by using tv_nsec. > > POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond > precision to detect file modification. > > MFC after: 2 weeks Eh, the BUG is still worth mentioning. By default FreeBSD only uses second granularity for VFS timestamps, so two updates within a single second is still racey. You can keep the code change, but I would revert the manual page change to put the BUG back as your change didn't remove it. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 16:48:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27219106566B; Mon, 13 Feb 2012 16:48:50 +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 161F08FC14; Mon, 13 Feb 2012 16:48: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 q1DGmn1x052379; Mon, 13 Feb 2012 16:48:49 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1DGmnID052377; Mon, 13 Feb 2012 16:48:49 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201202131648.q1DGmnID052377@svn.freebsd.org> From: Ed Maste Date: Mon, 13 Feb 2012 16:48: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: r231589 - head/sys/dev/aac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 16:48:50 -0000 Author: emaste Date: Mon Feb 13 16:48:49 2012 New Revision: 231589 URL: http://svn.freebsd.org/changeset/base/231589 Log: Add a sysctl to report the firmware build number. Some older firmware versions have issues that can be worked around by avoiding certain operations. Add a sysctl dev.aac.#.firmware_build to make it easy for scripts or userland tools to detect the firmware version. Modified: head/sys/dev/aac/aac.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Mon Feb 13 16:43:29 2012 (r231588) +++ head/sys/dev/aac/aac.c Mon Feb 13 16:48:49 2012 (r231589) @@ -292,6 +292,15 @@ aac_attach(struct aac_softc *sc) aac_describe_controller(sc); /* + * Add sysctls. + */ + SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->aac_dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->aac_dev)), + OID_AUTO, "firmware_build", CTLFLAG_RD, + &sc->aac_revision.buildNumber, 0, + "firmware build number"); + + /* * Register to probe our containers later. */ sc->aac_ich.ich_func = aac_startup; From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 18:41:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4422E106564A; Mon, 13 Feb 2012 18:41:33 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3371B8FC0A; Mon, 13 Feb 2012 18:41:33 +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 q1DIfXiD056124; Mon, 13 Feb 2012 18:41:33 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1DIfXYr056122; Mon, 13 Feb 2012 18:41:33 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201202131841.q1DIfXYr056122@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 13 Feb 2012 18:41:32 +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: r231592 - head/sys/dev/cxgbe/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 18:41:33 -0000 Author: np Date: Mon Feb 13 18:41:32 2012 New Revision: 231592 URL: http://svn.freebsd.org/changeset/base/231592 Log: Use the non-sleeping variang of t4_wr_mbox in code that can be called with locks held. MFC after: 1 day Modified: head/sys/dev/cxgbe/common/t4_hw.c Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Mon Feb 13 18:26:58 2012 (r231591) +++ head/sys/dev/cxgbe/common/t4_hw.c Mon Feb 13 18:41:32 2012 (r231592) @@ -4314,7 +4314,7 @@ int t4_change_mac(struct adapter *adap, V_FW_VI_MAC_CMD_IDX(idx)); memcpy(p->macaddr, addr, sizeof(p->macaddr)); - ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); + ret = t4_wr_mbox_ns(adap, mbox, &c, sizeof(c), &c); if (ret == 0) { ret = G_FW_VI_MAC_CMD_IDX(ntohs(p->valid_to_idx)); if (ret >= FW_CLS_TCAM_NUM_ENTRIES) From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 18:43:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC1471065676; Mon, 13 Feb 2012 18:43:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 477568FC22; Mon, 13 Feb 2012 18:43:45 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id AC5D02A28CC5; Mon, 13 Feb 2012 19:43:41 +0100 (CET) Date: Mon, 13 Feb 2012 19:43:41 +0100 From: Ed Schouten To: John Baldwin Message-ID: <20120213184341.GY1860@hoeg.nl> References: <201202101340.q1ADeWDj076596@svn.freebsd.org> <201202131126.38759.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BN+Sv8yD/qqrpTrl" Content-Disposition: inline In-Reply-To: <201202131126.38759.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231383 - in head: lib/libutil usr.sbin/vipw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 18:43:45 -0000 --BN+Sv8yD/qqrpTrl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * John Baldwin , 20120213 17:26: > Eh, the BUG is still worth mentioning. By default FreeBSD only uses > second granularity for VFS timestamps, so two updates within a single > second is still racey. You can keep the code change, but I would > revert the manual page change to put the BUG back as your change > didn't remove it. I'll re-add it tomorrow. I do think I will extend the message a bit, stating that this is only a problem if your file system doesn't do fine-grained timestamps. --=20 Ed Schouten WWW: http://80386.nl/ --BN+Sv8yD/qqrpTrl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iQIcBAEBAgAGBQJPOVndAAoJEG5e2P40kaK72NgQAJEkMmtiTBMUJXnYAkdavl2j 70ufjZeOhOXu5LzqAZgaS3dQ7Zb+CbkO6EH5U6AgIWCL49rbZeJcuu6wMrNr0n2Q sqsefAPqZcZpI4SzNygJtYLl14FJUMyCTOPKjAXSaQEpgnCLHdfGBGHoyoBpEyf1 50/68yLQNWW0/JnvYiGaUdDdtJAOifHBdWHKcNuZQIqlW3q7zn2NPOaBFW0rupWH eHkm2+HcfNsxvUZshpE/JBYiWhHUbdQr788mhVFRaD3MERntrQ7hG6z+0jq3mR5q Sd7Hazcl4UYGSxkfttqFWtmgQZewB5Z0fMAyCItK55X7Xt7Thk568BTRjNICDCoE 7etj8Jk7rxlq24ub+kal1WOBlFLX1hjoKIsa6h1ztdJiFrtjN1o6+ka9Mob1Hkjp wIKy6BRobbvo0c0n5jG9LbKB5avH8HU5GjdC71s6MF6hotcLIIqvb7S6HFHfR6UM vXW/Wx+8dsaODxNYqmGNabPxZWUa2dg4CNhZ4Qsvp6mgVfYVOPARBb82m3c45hxj jkH6y+jcpAO9g2cXLOAWl1HSx+zycqiOvkO46AxgCy9b0uF4QZf7Nb2BK2OW9jli Zn54ZkgwbF5a0AenoyqujvPBmOg3m6hZRf8bf8TTGMbNXdbR+tfhS8t9RO6+QgB2 jTOAxdiiH/q3omrjxpcD =gfzD -----END PGP SIGNATURE----- --BN+Sv8yD/qqrpTrl-- From owner-svn-src-head@FreeBSD.ORG Mon Feb 13 18:56:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D622106566C; Mon, 13 Feb 2012 18:56:35 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B88D8FC12; Mon, 13 Feb 2012 18:56: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 q1DIuYA7056769; Mon, 13 Feb 2012 18:56:34 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1DIuYCo056761; Mon, 13 Feb 2012 18:56:34 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201202131856.q1DIuYCo056761@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 13 Feb 2012 18:56:34 +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: r231594 - head/sys/dev/netmap X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 18:56:35 -0000 Author: luigi Date: Mon Feb 13 18:56:34 2012 New Revision: 231594 URL: http://svn.freebsd.org/changeset/base/231594 Log: - use struct ifnet as explicit type of the argument to the txsync() and rxsync() callbacks, removing some variables made useless by this change; - add generic lock and irq handling routines. These can be useful in case there are no driver locks that we can reuse; - add a few macros to reduce differences with the Linux version. Modified: head/sys/dev/netmap/if_em_netmap.h head/sys/dev/netmap/if_igb_netmap.h head/sys/dev/netmap/if_lem_netmap.h head/sys/dev/netmap/if_re_netmap.h head/sys/dev/netmap/ixgbe_netmap.h head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_kern.h Modified: head/sys/dev/netmap/if_em_netmap.h ============================================================================== --- head/sys/dev/netmap/if_em_netmap.h Mon Feb 13 18:54:15 2012 (r231593) +++ head/sys/dev/netmap/if_em_netmap.h Mon Feb 13 18:56:34 2012 (r231594) @@ -42,9 +42,9 @@ static void em_netmap_block_tasks(struct adapter *); static void em_netmap_unblock_tasks(struct adapter *); static int em_netmap_reg(struct ifnet *, int onoff); -static int em_netmap_txsync(void *, u_int, int); -static int em_netmap_rxsync(void *, u_int, int); -static void em_netmap_lock_wrapper(void *, int, u_int); +static int em_netmap_txsync(struct ifnet *, u_int, int); +static int em_netmap_rxsync(struct ifnet *, u_int, int); +static void em_netmap_lock_wrapper(struct ifnet *, int, u_int); static void em_netmap_attach(struct adapter *adapter) @@ -69,9 +69,9 @@ em_netmap_attach(struct adapter *adapter * wrapper to export locks to the generic code */ static void -em_netmap_lock_wrapper(void *_a, int what, u_int queueid) +em_netmap_lock_wrapper(struct ifnet *ifp, int what, u_int queueid) { - struct adapter *adapter = _a; + struct adapter *adapter = ifp->if_softc; ASSERT(queueid < adapter->num_queues); switch (what) { @@ -183,9 +183,9 @@ fail: * Reconcile hardware and user view of the transmit ring. */ static int -em_netmap_txsync(void *a, u_int ring_nr, int do_lock) +em_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct adapter *adapter = a; + struct adapter *adapter = ifp->if_softc; struct tx_ring *txr = &adapter->tx_rings[ring_nr]; struct netmap_adapter *na = NA(adapter->ifp); struct netmap_kring *kring = &na->tx_rings[ring_nr]; @@ -289,9 +289,9 @@ em_netmap_txsync(void *a, u_int ring_nr, * Reconcile kernel and user view of the receive ring. */ static int -em_netmap_rxsync(void *a, u_int ring_nr, int do_lock) +em_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct adapter *adapter = a; + struct adapter *adapter = ifp->if_softc; struct rx_ring *rxr = &adapter->rx_rings[ring_nr]; struct netmap_adapter *na = NA(adapter->ifp); struct netmap_kring *kring = &na->rx_rings[ring_nr]; Modified: head/sys/dev/netmap/if_igb_netmap.h ============================================================================== --- head/sys/dev/netmap/if_igb_netmap.h Mon Feb 13 18:54:15 2012 (r231593) +++ head/sys/dev/netmap/if_igb_netmap.h Mon Feb 13 18:56:34 2012 (r231594) @@ -38,9 +38,9 @@ #include static int igb_netmap_reg(struct ifnet *, int onoff); -static int igb_netmap_txsync(void *, u_int, int); -static int igb_netmap_rxsync(void *, u_int, int); -static void igb_netmap_lock_wrapper(void *, int, u_int); +static int igb_netmap_txsync(struct ifnet *, u_int, int); +static int igb_netmap_rxsync(struct ifnet *, u_int, int); +static void igb_netmap_lock_wrapper(struct ifnet *, int, u_int); static void @@ -66,9 +66,9 @@ igb_netmap_attach(struct adapter *adapte * wrapper to export locks to the generic code */ static void -igb_netmap_lock_wrapper(void *_a, int what, u_int queueid) +igb_netmap_lock_wrapper(struct ifnet *ifp, int what, u_int queueid) { - struct adapter *adapter = _a; + struct adapter *adapter = ifp->if_softc; ASSERT(queueid < adapter->num_queues); switch (what) { @@ -140,9 +140,9 @@ fail: * Reconcile kernel and user view of the transmit ring. */ static int -igb_netmap_txsync(void *a, u_int ring_nr, int do_lock) +igb_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct adapter *adapter = a; + struct adapter *adapter = ifp->if_softc; struct tx_ring *txr = &adapter->tx_rings[ring_nr]; struct netmap_adapter *na = NA(adapter->ifp); struct netmap_kring *kring = &na->tx_rings[ring_nr]; @@ -258,9 +258,9 @@ igb_netmap_txsync(void *a, u_int ring_nr * Reconcile kernel and user view of the receive ring. */ static int -igb_netmap_rxsync(void *a, u_int ring_nr, int do_lock) +igb_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct adapter *adapter = a; + struct adapter *adapter = ifp->if_softc; struct rx_ring *rxr = &adapter->rx_rings[ring_nr]; struct netmap_adapter *na = NA(adapter->ifp); struct netmap_kring *kring = &na->rx_rings[ring_nr]; Modified: head/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- head/sys/dev/netmap/if_lem_netmap.h Mon Feb 13 18:54:15 2012 (r231593) +++ head/sys/dev/netmap/if_lem_netmap.h Mon Feb 13 18:56:34 2012 (r231594) @@ -40,9 +40,9 @@ #include static int lem_netmap_reg(struct ifnet *, int onoff); -static int lem_netmap_txsync(void *, u_int, int); -static int lem_netmap_rxsync(void *, u_int, int); -static void lem_netmap_lock_wrapper(void *, int, u_int); +static int lem_netmap_txsync(struct ifnet *, u_int, int); +static int lem_netmap_rxsync(struct ifnet *, u_int, int); +static void lem_netmap_lock_wrapper(struct ifnet *, int, u_int); SYSCTL_NODE(_dev, OID_AUTO, lem, CTLFLAG_RW, 0, "lem card"); @@ -67,9 +67,9 @@ lem_netmap_attach(struct adapter *adapte static void -lem_netmap_lock_wrapper(void *_a, int what, u_int ringid) +lem_netmap_lock_wrapper(struct ifnet *ifp, int what, u_int ringid) { - struct adapter *adapter = _a; + struct adapter *adapter = ifp->if_softc; /* only one ring here so ignore the ringid */ switch (what) { @@ -153,9 +153,9 @@ fail: * Reconcile kernel and user view of the transmit ring. */ static int -lem_netmap_txsync(void *a, u_int ring_nr, int do_lock) +lem_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct adapter *adapter = a; + struct adapter *adapter = ifp->if_softc; struct netmap_adapter *na = NA(adapter->ifp); struct netmap_kring *kring = &na->tx_rings[0]; struct netmap_ring *ring = kring->ring; @@ -257,9 +257,9 @@ lem_netmap_txsync(void *a, u_int ring_nr * Reconcile kernel and user view of the receive ring. */ static int -lem_netmap_rxsync(void *a, u_int ring_nr, int do_lock) +lem_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct adapter *adapter = a; + struct adapter *adapter = ifp->if_softc; struct netmap_adapter *na = NA(adapter->ifp); struct netmap_kring *kring = &na->rx_rings[0]; struct netmap_ring *ring = kring->ring; Modified: head/sys/dev/netmap/if_re_netmap.h ============================================================================== --- head/sys/dev/netmap/if_re_netmap.h Mon Feb 13 18:54:15 2012 (r231593) +++ head/sys/dev/netmap/if_re_netmap.h Mon Feb 13 18:56:34 2012 (r231594) @@ -37,9 +37,9 @@ #include static int re_netmap_reg(struct ifnet *, int onoff); -static int re_netmap_txsync(void *, u_int, int); -static int re_netmap_rxsync(void *, u_int, int); -static void re_netmap_lock_wrapper(void *, int, u_int); +static int re_netmap_txsync(struct ifnet *, u_int, int); +static int re_netmap_rxsync(struct ifnet *, u_int, int); +static void re_netmap_lock_wrapper(struct ifnet *, int, u_int); static void re_netmap_attach(struct rl_softc *sc) @@ -65,9 +65,9 @@ re_netmap_attach(struct rl_softc *sc) * We should not use the tx/rx locks */ static void -re_netmap_lock_wrapper(void *_a, int what, u_int queueid) +re_netmap_lock_wrapper(struct ifnet *ifp, int what, u_int queueid) { - struct rl_softc *adapter = _a; + struct rl_softc *adapter = ifp->if_softc; switch (what) { case NETMAP_CORE_LOCK: @@ -133,9 +133,9 @@ fail: * Reconcile kernel and user view of the transmit ring. */ static int -re_netmap_txsync(void *a, u_int ring_nr, int do_lock) +re_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct rl_softc *sc = a; + struct rl_softc *sc = ifp->if_softc; struct rl_txdesc *txd = sc->rl_ldata.rl_tx_desc; struct netmap_adapter *na = NA(sc->rl_ifp); struct netmap_kring *kring = &na->tx_rings[ring_nr]; @@ -236,9 +236,9 @@ re_netmap_txsync(void *a, u_int ring_nr, * Reconcile kernel and user view of the receive ring. */ static int -re_netmap_rxsync(void *a, u_int ring_nr, int do_lock) +re_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct rl_softc *sc = a; + struct rl_softc *sc = ifp->if_softc; struct rl_rxdesc *rxd = sc->rl_ldata.rl_rx_desc; struct netmap_adapter *na = NA(sc->rl_ifp); struct netmap_kring *kring = &na->rx_rings[ring_nr]; Modified: head/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- head/sys/dev/netmap/ixgbe_netmap.h Mon Feb 13 18:54:15 2012 (r231593) +++ head/sys/dev/netmap/ixgbe_netmap.h Mon Feb 13 18:56:34 2012 (r231594) @@ -55,9 +55,9 @@ * *_netmap_attach() routine. */ static int ixgbe_netmap_reg(struct ifnet *, int onoff); -static int ixgbe_netmap_txsync(void *, u_int, int); -static int ixgbe_netmap_rxsync(void *, u_int, int); -static void ixgbe_netmap_lock_wrapper(void *, int, u_int); +static int ixgbe_netmap_txsync(struct ifnet *, u_int, int); +static int ixgbe_netmap_rxsync(struct ifnet *, u_int, int); +static void ixgbe_netmap_lock_wrapper(struct ifnet *, int, u_int); /* @@ -90,9 +90,9 @@ ixgbe_netmap_attach(struct adapter *adap * wrapper to export locks to the generic netmap code. */ static void -ixgbe_netmap_lock_wrapper(void *_a, int what, u_int queueid) +ixgbe_netmap_lock_wrapper(struct ifnet *_a, int what, u_int queueid) { - struct adapter *adapter = _a; + struct adapter *adapter = _a->if_softc; ASSERT(queueid < adapter->num_queues); switch (what) { @@ -190,9 +190,9 @@ fail: * buffers irrespective of interrupt mitigation. */ static int -ixgbe_netmap_txsync(void *a, u_int ring_nr, int do_lock) +ixgbe_netmap_txsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct adapter *adapter = a; + struct adapter *adapter = ifp->if_softc; struct tx_ring *txr = &adapter->tx_rings[ring_nr]; struct netmap_adapter *na = NA(adapter->ifp); struct netmap_kring *kring = &na->tx_rings[ring_nr]; @@ -418,9 +418,9 @@ ring_reset: * do_lock has a special meaning: please refer to txsync. */ static int -ixgbe_netmap_rxsync(void *a, u_int ring_nr, int do_lock) +ixgbe_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock) { - struct adapter *adapter = a; + struct adapter *adapter = ifp->if_softc; struct rx_ring *rxr = &adapter->rx_rings[ring_nr]; struct netmap_adapter *na = NA(adapter->ifp); struct netmap_kring *kring = &na->rx_rings[ring_nr]; Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Mon Feb 13 18:54:15 2012 (r231593) +++ head/sys/dev/netmap/netmap.c Mon Feb 13 18:56:34 2012 (r231594) @@ -749,7 +749,7 @@ netmap_dtor_locked(void *data) D("deleting last netmap instance for %s", ifp->if_xname); /* * there is a race here with *_netmap_task() and - * netmap_poll(), which don't run under NETMAP_CORE_LOCK. + * netmap_poll(), which don't run under NETMAP_REG_LOCK. * na->refcount == 0 && na->ifp->if_capenable & IFCAP_NETMAP * (aka NETMAP_DELETING(na)) are a unique marker that the * device is dying. @@ -759,9 +759,9 @@ netmap_dtor_locked(void *data) * should check the condition at entry and quit if * they cannot run. */ - na->nm_lock(ifp->if_softc, NETMAP_CORE_UNLOCK, 0); + na->nm_lock(ifp, NETMAP_REG_UNLOCK, 0); tsleep(na, 0, "NIOCUNREG", 4); - na->nm_lock(ifp->if_softc, NETMAP_CORE_LOCK, 0); + na->nm_lock(ifp, NETMAP_REG_LOCK, 0); na->nm_register(ifp, 0); /* off, clear IFCAP_NETMAP */ /* Wake up any sleeping threads. netmap_poll will * then return POLLERR @@ -803,9 +803,9 @@ netmap_dtor(void *data) struct ifnet *ifp = priv->np_ifp; struct netmap_adapter *na = NA(ifp); - na->nm_lock(ifp->if_softc, NETMAP_CORE_LOCK, 0); + na->nm_lock(ifp, NETMAP_REG_LOCK, 0); netmap_dtor_locked(data); - na->nm_lock(ifp->if_softc, NETMAP_CORE_UNLOCK, 0); + na->nm_lock(ifp, NETMAP_REG_UNLOCK, 0); if_rele(ifp); bzero(priv, sizeof(*priv)); /* XXX for safety */ @@ -863,7 +863,7 @@ netmap_sync_to_host(struct netmap_adapte netmap_ring_reinit(kring); return; } - // na->nm_lock(na->ifp->if_softc, NETMAP_CORE_LOCK, 0); + // na->nm_lock(na->ifp, NETMAP_CORE_LOCK, 0); /* Take packets from hwcur to cur and pass them up. * In case of no buffers we give up. At the end of the loop, @@ -890,16 +890,15 @@ netmap_sync_to_host(struct netmap_adapte } kring->nr_hwcur = k; kring->nr_hwavail = ring->avail = lim; - // na->nm_lock(na->ifp->if_softc, NETMAP_CORE_UNLOCK, 0); + // na->nm_lock(na->ifp, NETMAP_CORE_UNLOCK, 0); /* send packets up, outside the lock */ while ((m = head) != NULL) { head = head->m_nextpkt; m->m_nextpkt = NULL; - m->m_pkthdr.rcvif = na->ifp; if (netmap_verbose & NM_VERB_HOST) - D("sending up pkt %p size %d", m, m->m_pkthdr.len); - (na->ifp->if_input)(na->ifp, m); + D("sending up pkt %p size %d", m, MBUF_LEN(m)); + NM_SEND_UP(na->ifp, m); } } @@ -919,7 +918,7 @@ netmap_sync_from_host(struct netmap_adap int error = 1, delta; u_int k = ring->cur, lim = kring->nkr_num_slots; - na->nm_lock(na->ifp->if_softc, NETMAP_CORE_LOCK, 0); + na->nm_lock(na->ifp, NETMAP_CORE_LOCK, 0); if (k >= lim) /* bad value */ goto done; delta = k - kring->nr_hwcur; @@ -936,7 +935,7 @@ netmap_sync_from_host(struct netmap_adap if (k && (netmap_verbose & NM_VERB_HOST)) D("%d pkts from stack", k); don