CVS commit: src/share/misc
Module Name:src Committed By: plunky Date: Mon Apr 27 09:10:45 UTC 2020 Modified Files: src/share/misc: acronyms.comp Log Message: EPT extended page tables To generate a diff of this commit: cvs rdiff -u -r1.300 -r1.301 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.300 src/share/misc/acronyms.comp:1.301 --- src/share/misc/acronyms.comp:1.300 Thu Mar 26 18:28:09 2020 +++ src/share/misc/acronyms.comp Mon Apr 27 09:10:45 2020 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.300 2020/03/26 18:28:09 leot Exp $ +$NetBSD: acronyms.comp,v 1.301 2020/04/27 09:10:45 plunky Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -534,6 +534,7 @@ EPIC explicitly parallel instruction com EPP enhanced parallel port EPRML extended partial response, maximum likelihood EPROM erasable programmable read only memory +EPT extended page tables ERC error recovery control ERD emergency recovery disk ERD entity relationship diagram
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: plunky Date: Fri Apr 10 14:32:50 UTC 2020 Modified Files: src/sbin/ifconfig: af_inet.c Log Message: trim extraneous return statement To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sbin/ifconfig/af_inet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ifconfig/af_inet.c diff -u src/sbin/ifconfig/af_inet.c:1.26 src/sbin/ifconfig/af_inet.c:1.27 --- src/sbin/ifconfig/af_inet.c:1.26 Fri Aug 16 10:33:17 2019 +++ src/sbin/ifconfig/af_inet.c Fri Apr 10 14:32:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: af_inet.c,v 1.26 2019/08/16 10:33:17 msaitoh Exp $ */ +/* $NetBSD: af_inet.c,v 1.27 2020/04/10 14:32:50 plunky Exp $ */ /* * Copyright (c) 1983, 1993 @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: af_inet.c,v 1.26 2019/08/16 10:33:17 msaitoh Exp $"); +__RCSID("$NetBSD: af_inet.c,v 1.27 2020/04/10 14:32:50 plunky Exp $"); #endif /* not lint */ #include @@ -219,7 +219,6 @@ in_addr_flags(struct ifaddrs *ifa, int f if (prog_ioctl(s, SIOCGIFAFLAG_IN, ) == -1) err(EXIT_FAILURE, "SIOCGIFAFLAG_IN"); return ifr.ifr_addrflags & flags ? true : false; - return false; } #endif
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Sun Feb 23 20:16:10 UTC 2020 Modified Files: src/sys/netbt: rfcomm_session.c Log Message: fix reversed logic for Remote Port Negotiation, pointed out by maxv@ To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/netbt/rfcomm_session.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/rfcomm_session.c diff -u src/sys/netbt/rfcomm_session.c:1.25 src/sys/netbt/rfcomm_session.c:1.26 --- src/sys/netbt/rfcomm_session.c:1.25 Sat Dec 22 14:28:57 2018 +++ src/sys/netbt/rfcomm_session.c Sun Feb 23 20:16:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_session.c,v 1.25 2018/12/22 14:28:57 maxv Exp $ */ +/* $NetBSD: rfcomm_session.c,v 1.26 2020/02/23 20:16:10 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.25 2018/12/22 14:28:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.26 2020/02/23 20:16:10 plunky Exp $"); #include #include @@ -1232,11 +1232,13 @@ rfcomm_session_recv_mcc_rpn(struct rfcom rpn.xoff_char = RFCOMM_RPN_XOFF_CHAR; if (m->m_pkthdr.len == sizeof(rpn)) { + /* negotiation request */ m_copydata(m, 0, sizeof(rpn), ); - rpn.param_mask = RFCOMM_RPN_PM_ALL; + rpn.param_mask = le16toh(rpn.param_mask); } else if (m->m_pkthdr.len == 1) { + /* current settings request */ m_copydata(m, 0, 1, ); - rpn.param_mask = le16toh(rpn.param_mask); + rpn.param_mask = RFCOMM_RPN_PM_ALL; } else { DPRINTF("Bad RPN length (%d)\n", m->m_pkthdr.len); return;
CVS commit: src/etc/mtree
Module Name:src Committed By: plunky Date: Mon Dec 24 08:31:08 UTC 2018 Modified Files: src/etc/mtree: NetBSD.dist.base Log Message: remove lwresd as now obsolete To generate a diff of this commit: cvs rdiff -u -r1.181 -r1.182 src/etc/mtree/NetBSD.dist.base Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.181 src/etc/mtree/NetBSD.dist.base:1.182 --- src/etc/mtree/NetBSD.dist.base:1.181 Wed Dec 19 13:57:44 2018 +++ src/etc/mtree/NetBSD.dist.base Mon Dec 24 08:31:08 2018 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.181 2018/12/19 13:57:44 maxv Exp $ +# $NetBSD: NetBSD.dist.base,v 1.182 2018/12/24 08:31:08 plunky Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -1266,7 +1266,6 @@ ./var/chroot/named/usr/libexec ./var/chroot/named/var ./var/chroot/named/var/run mode=0775 gname=named -./var/chroot/named/var/run/lwresd mode=0775 gname=named ./var/chroot/named/var/run/named mode=0775 gname=named ./var/chroot/named/var/tmp mode=01775 gname=named ./var/chroot/nsd mode=0755 uname=_nsd gname=_nsd @@ -1318,7 +1317,6 @@ ./var/preserve ./var/quotas gname=operator mode=0750 ./var/run -./var/run/lwresd mode=0775 gname=named ./var/run/named mode=0775 gname=named ./var/rwho uname=_rwhod gname=_rwhod ./var/shm mode=01777
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: plunky Date: Tue Dec 4 16:53:45 UTC 2018 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: rc.d/isdnd is obsolete To generate a diff of this commit: cvs rdiff -u -r1.220 -r1.221 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.220 src/usr.sbin/postinstall/postinstall:1.221 --- src/usr.sbin/postinstall/postinstall:1.220 Tue Nov 6 06:16:00 2018 +++ src/usr.sbin/postinstall/postinstall Tue Dec 4 16:53:44 2018 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.220 2018/11/06 06:16:00 plunky Exp $ +# $NetBSD: postinstall,v 1.221 2018/12/04 16:53:44 plunky Exp $ # # Copyright (c) 2002-2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -1503,6 +1503,7 @@ btuartd daemon fsck.sh gated +isdnd kerberos login nfsiod
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: plunky Date: Tue Nov 6 06:16:00 UTC 2018 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: add rc.d/dhcpd6 To generate a diff of this commit: cvs rdiff -u -r1.219 -r1.220 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.219 src/usr.sbin/postinstall/postinstall:1.220 --- src/usr.sbin/postinstall/postinstall:1.219 Fri Oct 26 18:06:34 2018 +++ src/usr.sbin/postinstall/postinstall Tue Nov 6 06:16:00 2018 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.219 2018/10/26 18:06:34 martin Exp $ +# $NetBSD: postinstall,v 1.220 2018/11/06 06:16:00 plunky Exp $ # # Copyright (c) 2002-2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -1392,6 +1392,7 @@ cron devpubd dhcpcd dhcpd +dhcpd6 dhcrelay dmesg downinterfaces
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Fri Sep 7 14:47:15 UTC 2018 Modified Files: src/sys/netbt: hci_link.c Log Message: two issues noted by maxv@ 1. If an adaptor sends repeated fragments indicating HCI_PACKET_START, we would leak mbufs. Fix that by releasing the previous in that case. 2. If an adaptor sends fragments which overflow the expected total payload length, it could build up the pending packet to use up system mbufs. Fix that by changing the unsigned calculation to a comparison and rejecting oversize packets To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/netbt/hci_link.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/hci_link.c diff -u src/sys/netbt/hci_link.c:1.24 src/sys/netbt/hci_link.c:1.25 --- src/sys/netbt/hci_link.c:1.24 Tue May 20 18:25:54 2014 +++ src/sys/netbt/hci_link.c Fri Sep 7 14:47:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: hci_link.c,v 1.24 2014/05/20 18:25:54 rmind Exp $ */ +/* $NetBSD: hci_link.c,v 1.25 2018/09/07 14:47:15 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hci_link.c,v 1.24 2014/05/20 18:25:54 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hci_link.c,v 1.25 2018/09/07 14:47:15 plunky Exp $"); #include #include @@ -475,12 +475,15 @@ hci_acl_recv(struct mbuf *m, struct hci_ switch (pb) { case HCI_PACKET_START: - if (link->hl_rxp != NULL) + if (m->m_pkthdr.len < sizeof(l2cap_hdr_t)) + goto bad; + + if (link->hl_rxp != NULL) { aprint_error_dev(unit->hci_dev, "dropped incomplete ACL packet\n"); - if (m->m_pkthdr.len < sizeof(l2cap_hdr_t)) - goto bad; + m_freem(link->hl_rxp); + } link->hl_rxp = m; got = m->m_pkthdr.len; @@ -508,18 +511,24 @@ hci_acl_recv(struct mbuf *m, struct hci_ } m_copydata(m, 0, sizeof(want), ); - want = le16toh(want) + sizeof(l2cap_hdr_t) - got; + want = le16toh(want); + got -= sizeof(l2cap_hdr_t); - if (want > 0) + if (got < want) /* wait for more */ return; link->hl_rxp = NULL; - if (want == 0) { - l2cap_recv_frame(m, link); - return; + if (got > want) { + DPRINTF("%s: packet overflow\n", + device_xname(unit->hci_dev)); + + goto bad; } + l2cap_recv_frame(m, link); + return; + bad: m_freem(m); }
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Tue Aug 21 14:59:13 UTC 2018 Modified Files: src/sys/netbt: hci_event.c l2cap_signal.c Log Message: Result of audit to check that mbuf length is checked before m_copydata() and that any data supposedly copied out is valid before use. prompted by maxv@, I have checked every usage of m_copydata() and made the following corrections hci_event.c: hci_event_command_compl() check that the packet does contain enough data for there to be a status code before noting possible failures. hci_event_num_compl_pkts() check that the packet does contain data to cover the stated number of handle/num pairs l2cap_signal.c: l2cap_recv_signal() just ignore packets with not enough data rather than trying to reject them (may not have cmd.ident) l2cap_recv_command_rej() check we have a valid reason and/or data before use To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/netbt/hci_event.c cvs rdiff -u -r1.18 -r1.19 src/sys/netbt/l2cap_signal.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/hci_event.c diff -u src/sys/netbt/hci_event.c:1.24 src/sys/netbt/hci_event.c:1.25 --- src/sys/netbt/hci_event.c:1.24 Sat Nov 28 09:04:34 2015 +++ src/sys/netbt/hci_event.c Tue Aug 21 14:59:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: hci_event.c,v 1.24 2015/11/28 09:04:34 plunky Exp $ */ +/* $NetBSD: hci_event.c,v 1.25 2018/08/21 14:59:13 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hci_event.c,v 1.24 2015/11/28 09:04:34 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hci_event.c,v 1.25 2018/08/21 14:59:13 plunky Exp $"); #include #include @@ -316,12 +316,14 @@ hci_event_command_compl(struct hci_unit * that a command_complete packet will contain the status though most * do seem to. */ - m_copydata(m, 0, sizeof(rp), ); - if (rp.status > 0) - aprint_error_dev(unit->hci_dev, - "CommandComplete opcode (%03x|%04x) failed (status=0x%02x)\n", - HCI_OGF(le16toh(ep.opcode)), HCI_OCF(le16toh(ep.opcode)), - rp.status); + if (m->m_pkthdr.len >= sizeof(rp)) { + m_copydata(m, 0, sizeof(rp), ); + if (rp.status > 0) + aprint_error_dev(unit->hci_dev, + "CommandComplete opcode (%03x|%04x) failed (status=0x%02x)\n", + HCI_OGF(le16toh(ep.opcode)), HCI_OCF(le16toh(ep.opcode)), + rp.status); + } /* * post processing of completed commands @@ -383,6 +385,9 @@ hci_event_num_compl_pkts(struct hci_unit m_copydata(m, 0, sizeof(ep), ); m_adj(m, sizeof(ep)); + if (m->m_pkthdr.len < ep.num_con_handles * (sizeof(handle) + sizeof(num))) + return; + while (ep.num_con_handles--) { m_copydata(m, 0, sizeof(handle), ); m_adj(m, sizeof(handle)); Index: src/sys/netbt/l2cap_signal.c diff -u src/sys/netbt/l2cap_signal.c:1.18 src/sys/netbt/l2cap_signal.c:1.19 --- src/sys/netbt/l2cap_signal.c:1.18 Tue Oct 4 14:13:46 2016 +++ src/sys/netbt/l2cap_signal.c Tue Aug 21 14:59:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: l2cap_signal.c,v 1.18 2016/10/04 14:13:46 joerg Exp $ */ +/* $NetBSD: l2cap_signal.c,v 1.19 2018/08/21 14:59:13 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.18 2016/10/04 14:13:46 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.19 2018/08/21 14:59:13 plunky Exp $"); #include #include @@ -64,7 +64,8 @@ static void l2cap_qos_htob(void *, l2cap /* * process incoming signal packets (CID 0x0001). Can contain multiple - * requests/responses. + * requests/responses. The signal hander should clear the command from + * the mbuf before returning. */ void l2cap_recv_signal(struct mbuf *m, struct hci_link *link) @@ -72,11 +73,8 @@ l2cap_recv_signal(struct mbuf *m, struct l2cap_cmd_hdr_t cmd; for(;;) { - if (m->m_pkthdr.len == 0) - goto finish; - if (m->m_pkthdr.len < sizeof(cmd)) - goto reject; + goto finish; m_copydata(m, 0, sizeof(cmd), ); cmd.length = le16toh(cmd.length); @@ -183,32 +181,42 @@ l2cap_recv_command_rej(struct mbuf *m, s cmd.length = le16toh(cmd.length); + /* The length here must contain the reason (2 octets) plus + * any data (0 or more octets) but we already know it is not + * bigger than l2cap_cmd_rej_cp + */ m_copydata(m, 0, cmd.length, ); m_adj(m, cmd.length); + if (cmd.length < 2) + return; + req = l2cap_request_lookup(link, cmd.ident); if (req == NULL) return; switch (le16toh(cp.reason)) { - case L2CAP_REJ_NOT_UNDERSTOOD: + case L2CAP_REJ_NOT_UNDERSTOOD: /* data length = 0 octets */ /* * I dont know
CVS commit: src/usr.sbin/btconfig
Module Name:src Committed By: plunky Date: Thu Dec 21 09:31:22 UTC 2017 Modified Files: src/usr.sbin/btconfig: btconfig.c Log Message: for Read_Local_Version, print also the HCI revision To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/btconfig/btconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btconfig/btconfig.c diff -u src/usr.sbin/btconfig/btconfig.c:1.27 src/usr.sbin/btconfig/btconfig.c:1.28 --- src/usr.sbin/btconfig/btconfig.c:1.27 Sat Nov 28 09:25:45 2015 +++ src/usr.sbin/btconfig/btconfig.c Thu Dec 21 09:31:22 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: btconfig.c,v 1.27 2015/11/28 09:25:45 plunky Exp $ */ +/* $NetBSD: btconfig.c,v 1.28 2017/12/21 09:31:22 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -33,7 +33,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2006 Itronix, Inc. All rights reserved."); -__RCSID("$NetBSD: btconfig.c,v 1.27 2015/11/28 09:25:45 plunky Exp $"); +__RCSID("$NetBSD: btconfig.c,v 1.28 2017/12/21 09:31:22 plunky Exp $"); #include #include @@ -651,20 +651,22 @@ print_info(int level) if (level-- < 1 || (btr.btr_flags & BTF_UP) == 0) return; - load_value(HCI_CMD_READ_LOCAL_VER, , sizeof(version)); + load_value(HCI_CMD_READ_LOCAL_VER, buf, 3); printf("\tHCI version: "); - switch(version) { - case HCI_SPEC_V10: printf("1.0b\n"); break; - case HCI_SPEC_V11: printf("1.1\n"); break; - case HCI_SPEC_V12: printf("1.2\n"); break; - case HCI_SPEC_V20: printf("2.0 + EDR\n"); break; - case HCI_SPEC_V21: printf("2.1 + EDR\n"); break; - case HCI_SPEC_V30: printf("3.0 + HS\n"); break; - case HCI_SPEC_V40: printf("4.0\n"); break; - case HCI_SPEC_V41: printf("4.1\n"); break; - case HCI_SPEC_V42: printf("4.2\n"); break; - default: printf("[%d]\n", version); break; + switch((version = buf[0])) { + case HCI_SPEC_V10: printf("1.0b"); break; + case HCI_SPEC_V11: printf("1.1"); break; + case HCI_SPEC_V12: printf("1.2"); break; + case HCI_SPEC_V20: printf("2.0 + EDR"); break; + case HCI_SPEC_V21: printf("2.1 + EDR"); break; + case HCI_SPEC_V30: printf("3.0 + HS"); break; + case HCI_SPEC_V40: printf("4.0"); break; + case HCI_SPEC_V41: printf("4.1"); break; + case HCI_SPEC_V42: printf("4.2"); break; + case HCI_SPEC_V50: printf("5.0"); break; + default: printf("[%d]", version);break; } + printf(" rev 0x%04x\n", le16dec([1])); load_value(HCI_CMD_READ_UNIT_CLASS, buf, HCI_CLASS_SIZE); print_class("\tclass:", buf);
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Thu Dec 21 09:30:31 UTC 2017 Modified Files: src/sys/netbt: hci.h Log Message: add HCI_SPEC_50 To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/netbt/hci.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/hci.h diff -u src/sys/netbt/hci.h:1.43 src/sys/netbt/hci.h:1.44 --- src/sys/netbt/hci.h:1.43 Sat Jan 28 19:19:41 2017 +++ src/sys/netbt/hci.h Thu Dec 21 09:30:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: hci.h,v 1.43 2017/01/28 19:19:41 jakllsch Exp $ */ +/* $NetBSD: hci.h,v 1.44 2017/12/21 09:30:30 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -54,7 +54,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: hci.h,v 1.43 2017/01/28 19:19:41 jakllsch Exp $ + * $Id: hci.h,v 1.44 2017/12/21 09:30:30 plunky Exp $ * $FreeBSD: src/sys/netgraph/bluetooth/include/ng_hci.h,v 1.6 2005/01/07 01:45:43 imp Exp $ */ @@ -105,7 +105,8 @@ #define HCI_SPEC_V40 0x06 /* v4.0 */ #define HCI_SPEC_V41 0x07 /* v4.1 */ #define HCI_SPEC_V42 0x08 /* v4.2 */ -/* 0x09 - 0xFF - reserved for future use */ +#define HCI_SPEC_V50 0x09 /* v5.0 */ +/* 0x0A - 0xFF - reserved for future use */ /* LMP features (and page 0 of extended features) */ /* --- byte 0 */
CVS commit: src/usr.bin/btpin
Module Name:src Committed By: plunky Date: Thu Dec 21 09:04:34 UTC 2017 Modified Files: src/usr.bin/btpin: btpin.c Log Message: consistent style: connect(2), socket(2) and setsockopt(2) return -1 for error so check for this specifically rather than < 0 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/btpin/btpin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/btpin/btpin.c diff -u src/usr.bin/btpin/btpin.c:1.6 src/usr.bin/btpin/btpin.c:1.7 --- src/usr.bin/btpin/btpin.c:1.6 Mon Aug 29 13:50:13 2011 +++ src/usr.bin/btpin/btpin.c Thu Dec 21 09:04:34 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: btpin.c,v 1.6 2011/08/29 13:50:13 joerg Exp $ */ +/* $NetBSD: btpin.c,v 1.7 2017/12/21 09:04:34 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -33,7 +33,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2006 Itronix, Inc. All rights reserved."); -__RCSID("$NetBSD: btpin.c,v 1.6 2011/08/29 13:50:13 joerg Exp $"); +__RCSID("$NetBSD: btpin.c,v 1.7 2017/12/21 09:04:34 plunky Exp $"); #include #include @@ -137,10 +137,10 @@ main(int ac, char *av[]) } s = socket(PF_LOCAL, SOCK_STREAM, 0); - if (s < 0) + if (s == -1) err(EXIT_FAILURE, "socket"); - if (connect(s, (struct sockaddr *), sizeof(un)) < 0) + if (connect(s, (struct sockaddr *), sizeof(un)) == -1) err(EXIT_FAILURE, "connect(\"%s\")", un.sun_path); if (send(s, , sizeof(rp), 0) != sizeof(rp)) @@ -152,18 +152,18 @@ main(int ac, char *av[]) exit(EXIT_SUCCESS); s = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP); - if (s < 0) + if (s == -1) err(EXIT_FAILURE, "socket"); ch = L2CAP_LM_AUTH; - if (setsockopt(s, BTPROTO_L2CAP, SO_L2CAP_LM, , sizeof(ch)) < 0) + if (setsockopt(s, BTPROTO_L2CAP, SO_L2CAP_LM, , sizeof(ch)) == -1) err(EXIT_FAILURE, "SO_L2CAP_LM"); memset(, 0, sizeof(bt)); bt.bt_len = sizeof(bt); bt.bt_family = AF_BLUETOOTH; bdaddr_copy(_bdaddr, ); - if (bind(s, (struct sockaddr *), sizeof(bt)) < 0) + if (bind(s, (struct sockaddr *), sizeof(bt)) == -1) err(EXIT_FAILURE, "bind"); fprintf(stdout, "Pairing.. "); @@ -171,7 +171,7 @@ main(int ac, char *av[]) bt.bt_psm = L2CAP_PSM_SDP; bdaddr_copy(_bdaddr, ); - if (connect(s, (struct sockaddr *), sizeof(bt)) < 0) { + if (connect(s, (struct sockaddr *), sizeof(bt)) == -1) { fprintf(stdout, "failed (%s)\n", strerror(errno)); exit(EXIT_FAILURE); }
CVS commit: src/usr.bin/btpin
Module Name:src Committed By: plunky Date: Thu Dec 21 09:02:48 UTC 2017 Modified Files: src/usr.bin/btpin: btpin.1 Log Message: fix width of .Bl list To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/btpin/btpin.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/btpin/btpin.1 diff -u src/usr.bin/btpin/btpin.1:1.10 src/usr.bin/btpin/btpin.1:1.11 --- src/usr.bin/btpin/btpin.1:1.10 Fri Sep 19 16:02:58 2014 +++ src/usr.bin/btpin/btpin.1 Thu Dec 21 09:02:47 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: btpin.1,v 1.10 2014/09/19 16:02:58 wiz Exp $ +.\" $NetBSD: btpin.1,v 1.11 2017/12/21 09:02:47 plunky Exp $ .\" .\" Copyright (c) 2006 Itronix Inc. .\" All rights reserved. @@ -49,7 +49,7 @@ daemon for the purposes of pairing Bluet The PIN will be valid for 5 minutes or until used, whichever comes first. .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width ".Fl a Ar address" .It Fl a Ar address Specify the remote device address. The address can be specified as BD_ADDR or a name.
CVS commit: src/usr.sbin/sdpd
Module Name:src Committed By: plunky Date: Thu Dec 21 08:59:58 UTC 2017 Modified Files: src/usr.sbin/sdpd: sdpd.8 Log Message: fix width of list To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/sdpd/sdpd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sdpd/sdpd.8 diff -u src/usr.sbin/sdpd/sdpd.8:1.11 src/usr.sbin/sdpd/sdpd.8:1.12 --- src/usr.sbin/sdpd/sdpd.8:1.11 Tue Mar 18 18:20:47 2014 +++ src/usr.sbin/sdpd/sdpd.8 Thu Dec 21 08:59:58 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: sdpd.8,v 1.11 2014/03/18 18:20:47 riastradh Exp $ +.\" $NetBSD: sdpd.8,v 1.12 2017/12/21 08:59:58 plunky Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" Copyright (c) 2004 Maksim Yevmenkin@@ -69,7 +69,7 @@ using the option. .Pp The command line options are as follows: -.Bl -tag -width indent +.Bl -tag -width ".Fl g Ar group" .It Fl c Ar path Specify path to the control socket. The default path is
CVS commit: src/usr.sbin/bthcid
Module Name:src Committed By: plunky Date: Thu Dec 21 09:00:19 UTC 2017 Modified Files: src/usr.sbin/bthcid: bthcid.8 Log Message: fix width/indent of list To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/bthcid/bthcid.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/bthcid/bthcid.8 diff -u src/usr.sbin/bthcid/bthcid.8:1.9 src/usr.sbin/bthcid/bthcid.8:1.10 --- src/usr.sbin/bthcid/bthcid.8:1.9 Tue Mar 18 18:20:46 2014 +++ src/usr.sbin/bthcid/bthcid.8 Thu Dec 21 09:00:19 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: bthcid.8,v 1.9 2014/03/18 18:20:46 riastradh Exp $ +.\" $NetBSD: bthcid.8,v 1.10 2017/12/21 09:00:19 plunky Exp $ .\" .\" Copyright (c) 2006 Itronix Inc. .\" All rights reserved. @@ -52,7 +52,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: bthcid.8,v 1.9 2014/03/18 18:20:46 riastradh Exp $ +.\" $Id: bthcid.8,v 1.10 2017/12/21 09:00:19 plunky Exp $ .\" $FreeBSD: src/usr.sbin/bluetooth/hcsecd/hcsecd.8,v 1.6 2006/02/11 15:36:37 markus Exp $ .\" .Dd September 29, 2006 @@ -75,7 +75,7 @@ The daemon handles Link Key and PIN code requests for Bluetooth devices. It opens a raw HCI socket and listens for the following HCI events. .Pp -.Bl -tag -width -compact +.Bl -tag -compact .It Dv Link_Key_Request .Nm scans the @@ -124,7 +124,7 @@ Keys may be examined, deleted or moved t program. .Pp The command line options are as follows: -.Bl -tag -width +.Bl -tag -width ".Fl s Ar socket_name" .It Fl d Ar device Specify the local Bluetooth device address. The default is BDADDR_ANY.
CVS commit: src/usr.bin/rfcomm_sppd
Module Name:src Committed By: plunky Date: Thu Dec 21 08:59:27 UTC 2017 Modified Files: src/usr.bin/rfcomm_sppd: rfcomm_sppd.1 Log Message: fix offset/indent of list To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.12 src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.13 --- src/usr.bin/rfcomm_sppd/rfcomm_sppd.1:1.12 Tue Mar 18 18:20:45 2014 +++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.1 Thu Dec 21 08:59:27 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: rfcomm_sppd.1,v 1.12 2014/03/18 18:20:45 riastradh Exp $ +.\" $NetBSD: rfcomm_sppd.1,v 1.13 2017/12/21 08:59:27 plunky Exp $ .\" .\" Copyright (c) 2006 Itronix Inc. .\" All rights reserved. @@ -122,7 +122,7 @@ is specified, the connection will be set Set connection link mode. Supported modes are: .Pp -.Bl -tag -compact -offset indent +.Bl -tag -compact -width encrypt -offset xx .It auth require devices be paired. .It encrypt @@ -145,7 +145,7 @@ is given, the default service class will be used. Known service classes are: .Pp -.Bl -tag -compact -offset indent +.Bl -tag -compact -width DUN -offset xx .It DUN Dialup Networking .It LAN
CVS commit: src
Module Name:src Committed By: plunky Date: Sat Apr 22 07:48:33 UTC 2017 Modified Files: src: BUILDING Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/BUILDING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/BUILDING diff -u src/BUILDING:1.126 src/BUILDING:1.127 --- src/BUILDING:1.126 Thu Apr 20 09:47:52 2017 +++ src/BUILDING Sat Apr 22 07:48:33 2017 @@ -717,12 +717,11 @@ BUILDING install-image Create a bootable NetBSD installation disk image in the - RELEASEDIR/RELEASEMACHINEDIR/installation/installimage - directory. The installation disk image is suitable for - copying to bootable USB flash memory sticks, etc., for - machines which are able to boot from such devices. The - file system in the bootable disk image will have a layout - as described in release(7). + RELEASEDIR/images directory. The installation disk image + is suitable for copying to bootable USB flash memory + sticks, etc., for machines which are able to boot from such + devices. The file system in the bootable disk image will + have a layout as described in release(7). The installation image is bootable, and will automatically run the sysinst(8) menu-based installation program, which
CVS commit: src/doc
Module Name:src Committed By: plunky Date: Sat Apr 22 07:48:19 UTC 2017 Modified Files: src/doc: BUILDING.mdoc Log Message: state correct location for install-image (RELEASEDIR/images) To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/doc/BUILDING.mdoc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/BUILDING.mdoc diff -u src/doc/BUILDING.mdoc:1.118 src/doc/BUILDING.mdoc:1.119 --- src/doc/BUILDING.mdoc:1.118 Thu Apr 20 09:47:41 2017 +++ src/doc/BUILDING.mdoc Sat Apr 22 07:48:19 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: BUILDING.mdoc,v 1.118 2017/04/20 09:47:41 wiz Exp $ +.\" $NetBSD: BUILDING.mdoc,v 1.119 2017/04/22 07:48:19 plunky Exp $ .\" .\" Copyright (c) 2001-2011 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -1288,7 +1288,7 @@ but which can be installed from Create a bootable .Nx installation disk image in the -.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/installimage +.Sy RELEASEDIR Ns Pa /images directory. The installation disk image is suitable for copying to bootable USB flash memory sticks, etc., for machines which
CVS commit: src/share/man/man4
Module Name:src Committed By: plunky Date: Fri Feb 3 13:23:37 UTC 2017 Modified Files: src/share/man/man4: bluetooth.4 Log Message: update for addition (a while ago) of features2 page To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/bluetooth.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/bluetooth.4 diff -u src/share/man/man4/bluetooth.4:1.18 src/share/man/man4/bluetooth.4:1.19 --- src/share/man/man4/bluetooth.4:1.18 Mon Nov 22 19:59:43 2010 +++ src/share/man/man4/bluetooth.4 Fri Feb 3 13:23:37 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: bluetooth.4,v 1.18 2010/11/22 19:59:43 plunky Exp $ +.\" $NetBSD: bluetooth.4,v 1.19 2017/02/03 13:23:37 plunky Exp $ .\" .\" Copyright (c) 2006 Itronix Inc. .\" All rights reserved. @@ -324,7 +324,8 @@ struct btreq { } btri; struct { uint8_t btrf_page0[HCI_FEATURES_SIZE]; /* basic */ - uint8_t btrf_page1[HCI_FEATURES_SIZE]; /* extended */ + uint8_t btrf_page1[HCI_FEATURES_SIZE]; /* extended page 1 */ + uint8_t btrf_page2[HCI_FEATURES_SIZE]; /* extended page 2 */ } btrf; struct bt_stats btrs; /* unit stats */ } btru; @@ -343,6 +344,7 @@ struct btreq { #define btr_max_sco btru.btri.btri_max_sco #define btr_features0 btru.btrf.btrf_page0 #define btr_features1 btru.btrf.btrf_page1 +#define btr_features2 btru.btrf.btrf_page2 #define btr_stats btru.btrs /* btr_flags */ @@ -385,14 +387,16 @@ btreq structure including the name field .It Dv SIOCNBTINFO Next Bluetooth device Info. If name field is empty, the first device will be returned. -Otherwise, the next device will be returned. +Otherwise, the next device will be returned until no more devices are found +when the call will fail, with error +.Er ENXIO . Thus, you can cycle through all devices in the system. .It Dv SIOCSBTFLAGS Set Bluetooth device Flags. Not all flags are settable. .It Dv SIOCGBTFEAT Get Bluetooth device Features. -This returns the cached basic (page 0) and extended (page 1) features. +This returns the cached basic (page 0) and extended (page 1 & 2) features. .It Dv SIOCSBTPOLICY Set Bluetooth device Link Policy. Link Policy bits are defined in
CVS commit: src/usr.bin/bthset
Module Name:src Committed By: plunky Date: Sun Mar 6 21:12:07 UTC 2016 Modified Files: src/usr.bin/bthset: bthset.c Log Message: use correct offset for channel in SDP record To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/bthset/bthset.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/bthset/bthset.c diff -u src/usr.bin/bthset/bthset.c:1.8 src/usr.bin/bthset/bthset.c:1.9 --- src/usr.bin/bthset/bthset.c:1.8 Thu Mar 15 02:02:23 2012 +++ src/usr.bin/bthset/bthset.c Sun Mar 6 21:12:07 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bthset.c,v 1.8 2012/03/15 02:02:23 joerg Exp $ */ +/* $NetBSD: bthset.c,v 1.9 2016/03/06 21:12:07 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -33,7 +33,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2006 Itronix, Inc. All rights reserved."); -__RCSID("$NetBSD: bthset.c,v 1.8 2012/03/15 02:02:23 joerg Exp $"); +__RCSID("$NetBSD: bthset.c,v 1.9 2016/03/06 21:12:07 plunky Exp $"); #include #include @@ -140,8 +140,8 @@ static uint8_t hset_data[] = { 0x77, 0x61, 0x79 }; -static sdp_data_t hset_record = { hset_data + 0, hset_data + 91 }; -static sdp_data_t hset_channel = { hset_data + 36, hset_data + 37 }; +static sdp_data_t hset_record = { hset_data + 0, hset_data + 89 }; +static sdp_data_t hset_channel = { hset_data + 34, hset_data + 36 }; int main(int ac, char *av[])
CVS commit: src/sys/dev/usb
Module Name:src Committed By: plunky Date: Wed Feb 17 10:52:55 UTC 2016 Modified Files: src/sys/dev/usb: ubt.c Log Message: extend the match function, to match devices from a selection of manufacturers that use modern Broadcom chips, and which represent as a vendor-specific device class. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/dev/usb/ubt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ubt.c diff -u src/sys/dev/usb/ubt.c:1.52 src/sys/dev/usb/ubt.c:1.53 --- src/sys/dev/usb/ubt.c:1.52 Wed Feb 17 00:49:28 2016 +++ src/sys/dev/usb/ubt.c Wed Feb 17 10:52:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ubt.c,v 1.52 2016/02/17 00:49:28 riastradh Exp $ */ +/* $NetBSD: ubt.c,v 1.53 2016/02/17 10:52:55 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.52 2016/02/17 00:49:28 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.53 2016/02/17 10:52:55 plunky Exp $"); #include #include @@ -297,51 +297,167 @@ static int ubt_sysctl_config(SYSCTLFN_PR static void ubt_abortdealloc(struct ubt_softc *); /* - * To match or ignore forcibly, add - * - * { { VendorID, ProductID } , UMATCH_VENDOR_PRODUCT|UMATCH_NONE } - * - * to the ubt_dev list. + * To match or ignore, add details to the ubt_dev list. + * Use value of -1 to indicate a wildcard + * To override another entry, add details earlier */ const struct ubt_devno { - struct usb_devno devno; + int vendor; + int product; + int class; + int subclass; + int proto; int match; } ubt_dev[] = { - { { USB_VENDOR_BROADCOM, USB_PRODUCT_BROADCOM_BCM2033NF }, - UMATCH_NONE }, - { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HOST_1 }, - UMATCH_VENDOR_PRODUCT }, - { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HOST_2 }, - UMATCH_VENDOR_PRODUCT }, - { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HOST_3 }, - UMATCH_VENDOR_PRODUCT }, - { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HOST_4 }, - UMATCH_VENDOR_PRODUCT }, - { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HOST_5 }, - UMATCH_VENDOR_PRODUCT }, - { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HOST_6 }, - UMATCH_VENDOR_PRODUCT }, - { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HOST_7 }, - UMATCH_VENDOR_PRODUCT }, + { /* ignore Broadcom 2033 without firmware */ + USB_VENDOR_BROADCOM, + USB_PRODUCT_BROADCOM_BCM2033NF, + -1, + -1, + -1, + UMATCH_NONE + }, + { /* Apple Bluetooth Host Controller MacbookPro 7,1 */ + USB_VENDOR_APPLE, + USB_PRODUCT_APPLE_BLUETOOTH_HOST_1, + -1, + -1, + -1, + UMATCH_VENDOR_PRODUCT + }, + { /* Apple Bluetooth Host Controller iMac 11,1 */ + USB_VENDOR_APPLE, + USB_PRODUCT_APPLE_BLUETOOTH_HOST_2, + -1, + -1, + -1, + UMATCH_VENDOR_PRODUCT + }, + { /* Apple Bluetooth Host Controller MacBookPro 8,2 */ + USB_VENDOR_APPLE, + USB_PRODUCT_APPLE_BLUETOOTH_HOST_3, + -1, + -1, + -1, + UMATCH_VENDOR_PRODUCT + }, + { /* Apple Bluetooth Host Controller MacBookAir 3,1 3,2*/ + USB_VENDOR_APPLE, + USB_PRODUCT_APPLE_BLUETOOTH_HOST_4, + -1, + -1, + -1, + UMATCH_VENDOR_PRODUCT + }, + { /* Apple Bluetooth Host Controller MacBookAir 4,1 */ + USB_VENDOR_APPLE, + USB_PRODUCT_APPLE_BLUETOOTH_HOST_5, + -1, + -1, + -1, + UMATCH_VENDOR_PRODUCT + }, + { /* Apple Bluetooth Host Controller MacMini 5,1 */ + USB_VENDOR_APPLE, + USB_PRODUCT_APPLE_BLUETOOTH_HOST_6, + -1, + -1, + -1, + UMATCH_VENDOR_PRODUCT + }, + { /* Apple Bluetooth Host Controller MacBookAir 6,1 */ + USB_VENDOR_APPLE, + USB_PRODUCT_APPLE_BLUETOOTH_HOST_7, + -1, + -1, + -1, + UMATCH_VENDOR_PRODUCT + }, + { /* Broadcom chips with PatchRAM support */ + USB_VENDOR_BROADCOM, + -1, + UDCLASS_VENDOR, + UDSUBCLASS_RF, + UDPROTO_BLUETOOTH, + UMATCH_VENDOR_DEVCLASS_DEVPROTO + }, + { /* Broadcom based device with PatchRAM support */ + USB_VENDOR_FOXCONN, + -1, + UDCLASS_VENDOR, + UDSUBCLASS_RF, + UDPROTO_BLUETOOTH, + UMATCH_VENDOR_DEVCLASS_DEVPROTO + }, + { /* Broadcom based device with PatchRAM support */ + USB_VENDOR_LITEON, + -1, + UDCLASS_VENDOR, + UDSUBCLASS_RF, + UDPROTO_BLUETOOTH, + UMATCH_VENDOR_DEVCLASS_DEVPROTO + }, + { /* Broadcom based device with PatchRAM support */ + USB_VENDOR_BELKIN, + -1, + UDCLASS_VENDOR, + UDSUBCLASS_RF, + UDPROTO_BLUETOOTH, + UMATCH_VENDOR_DEVCLASS_DEVPROTO + }, + { /* Broadcom based device with PatchRAM support */ + USB_VENDOR_TOSHIBA, + -1, + UDCLASS_VENDOR, + UDSUBCLASS_RF, + UDPROTO_BLUETOOTH, + UMATCH_VENDOR_DEVCLASS_DEVPROTO + }, + { /* Broadcom based device with PatchRAM support */ + USB_VENDOR_ASUSTEK,
CVS import: src/external/bsd/pcc/dist
Module Name:src Committed By: plunky Date: Tue Feb 9 20:29:22 UTC 2016 Update of /cvsroot/src/external/bsd/pcc/dist In directory ivanova.netbsd.org:/tmp/cvs-serv10263 Log Message: update to pcc snapshot 20160208. Rather than provide the full list of changes, they can be found at http://pcc.ludd.ltu.se/fisheye/changelog/pcc Along with numerous bug fixes, the highlights might be a rewrite of the CPP parser, updated backends for arm, pdp11, m68k, vax and mips along with new backend for 8086. PCC now builds itself as a 2-pass compiler. There have been fixes for use with musl, C11 support added and use of UTF8 internally. PE/COFF target was fixed, and Minix target added. Status: Vendor Tag: ragge Release Tags: pcc-20160208 U src/external/bsd/pcc/dist/pcc/Makefile.in U src/external/bsd/pcc/dist/pcc/config.guess U src/external/bsd/pcc/dist/pcc/config.h.in U src/external/bsd/pcc/dist/pcc/config.sub U src/external/bsd/pcc/dist/pcc/configure C src/external/bsd/pcc/dist/pcc/configure.ac U src/external/bsd/pcc/dist/pcc/install-sh N src/external/bsd/pcc/dist/pcc/TODO U src/external/bsd/pcc/dist/pcc/DATESTAMP C src/external/bsd/pcc/dist/pcc/arch/amd64/local.c C src/external/bsd/pcc/dist/pcc/arch/amd64/code.c C src/external/bsd/pcc/dist/pcc/arch/amd64/local2.c U src/external/bsd/pcc/dist/pcc/arch/amd64/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/amd64/order.c U src/external/bsd/pcc/dist/pcc/arch/amd64/table.c U src/external/bsd/pcc/dist/pcc/arch/arm/local.c U src/external/bsd/pcc/dist/pcc/arch/arm/code.c U src/external/bsd/pcc/dist/pcc/arch/arm/local2.c U src/external/bsd/pcc/dist/pcc/arch/arm/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/arm/order.c U src/external/bsd/pcc/dist/pcc/arch/arm/table.c U src/external/bsd/pcc/dist/pcc/arch/hppa/local.c U src/external/bsd/pcc/dist/pcc/arch/hppa/code.c U src/external/bsd/pcc/dist/pcc/arch/hppa/local2.c U src/external/bsd/pcc/dist/pcc/arch/hppa/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/hppa/order.c U src/external/bsd/pcc/dist/pcc/arch/hppa/table.c U src/external/bsd/pcc/dist/pcc/arch/i386/flocal.c U src/external/bsd/pcc/dist/pcc/arch/i386/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/i386/local2.c U src/external/bsd/pcc/dist/pcc/arch/i386/code.c U src/external/bsd/pcc/dist/pcc/arch/i386/order.c U src/external/bsd/pcc/dist/pcc/arch/i386/table.c U src/external/bsd/pcc/dist/pcc/arch/i386/local.c U src/external/bsd/pcc/dist/pcc/arch/m16c/local.c U src/external/bsd/pcc/dist/pcc/arch/m16c/TODO U src/external/bsd/pcc/dist/pcc/arch/m16c/code.c U src/external/bsd/pcc/dist/pcc/arch/m16c/local2.c U src/external/bsd/pcc/dist/pcc/arch/m16c/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/m16c/order.c U src/external/bsd/pcc/dist/pcc/arch/m16c/table.c U src/external/bsd/pcc/dist/pcc/arch/mips/local.c U src/external/bsd/pcc/dist/pcc/arch/mips/TODO U src/external/bsd/pcc/dist/pcc/arch/mips/code.c U src/external/bsd/pcc/dist/pcc/arch/mips/local2.c U src/external/bsd/pcc/dist/pcc/arch/mips/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/mips/order.c U src/external/bsd/pcc/dist/pcc/arch/mips/table.c U src/external/bsd/pcc/dist/pcc/arch/nova/local.c U src/external/bsd/pcc/dist/pcc/arch/nova/README U src/external/bsd/pcc/dist/pcc/arch/nova/code.c U src/external/bsd/pcc/dist/pcc/arch/nova/local2.c U src/external/bsd/pcc/dist/pcc/arch/nova/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/nova/order.c U src/external/bsd/pcc/dist/pcc/arch/nova/table.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/local.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/README U src/external/bsd/pcc/dist/pcc/arch/pdp10/code.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/local2.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/pdp10/order.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/table.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/local.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/code.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/local2.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/pdp11/order.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/table.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/local.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/README U src/external/bsd/pcc/dist/pcc/arch/powerpc/code.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/local2.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/powerpc/order.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/table.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/local.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/code.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/local2.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/sparc64/order.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/table.c U src/external/bsd/pcc/dist/pcc/arch/m68k/local.c U src/external/bsd/pcc/dist/pcc/arch/m68k/code.c U src/external/bsd/pcc/dist/pcc/arch/m68k/local2.c U
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: plunky Date: Tue Feb 9 20:42:45 UTC 2016 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi Log Message: add pcpp binary, now in pcc-20160208. Also, p++ in debug set To generate a diff of this commit: cvs rdiff -u -r1.2017 -r1.2018 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.142 -r1.143 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2017 src/distrib/sets/lists/comp/mi:1.2018 --- src/distrib/sets/lists/comp/mi:1.2017 Tue Feb 2 12:22:23 2016 +++ src/distrib/sets/lists/comp/mi Tue Feb 9 20:42:44 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2017 2016/02/02 12:22:23 pooka Exp $ +# $NetBSD: mi,v 1.2018 2016/02/09 20:42:44 plunky Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -74,6 +74,7 @@ ./usr/bin/objdumpcomp-util-bin binutils ./usr/bin/p++ comp-cxx-bin pcc,cxx ./usr/bin/pcc comp-c-bin pcc +./usr/bin/pcpp comp-c-bin pcc ./usr/bin/protoizecomp-obsolete obsolete ./usr/bin/ranlibcomp-util-bin binutils ./usr/bin/rcs2logcomp-cvs-bin cvs Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.142 src/distrib/sets/lists/debug/mi:1.143 --- src/distrib/sets/lists/debug/mi:1.142 Mon Jan 25 04:24:24 2016 +++ src/distrib/sets/lists/debug/mi Tue Feb 9 20:42:45 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.142 2016/01/25 04:24:24 christos Exp $ +# $NetBSD: mi,v 1.143 2016/02/09 20:42:45 plunky Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -682,7 +682,9 @@ ./usr/libdata/debug/usr/bin/pathchk.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/pawd.debug comp-amd-debug debug ./usr/libdata/debug/usr/bin/paxctl.debug comp-obsolete obsolete +./usr/libdata/debug/usr/bin/p++.debug comp-c-debug pcc,debug ./usr/libdata/debug/usr/bin/pcc.debug comp-c-debug pcc,debug +./usr/libdata/debug/usr/bin/pcpp.debug comp-c-debug pcc,debug ./usr/libdata/debug/usr/bin/pfbtops.debug comp-groff-debug groff,debug ./usr/libdata/debug/usr/bin/pic.debug comp-groff-debug groff,debug ./usr/libdata/debug/usr/bin/pigz.debug comp-util-debug debug
CVS commit: src/share/mk
Module Name:src Committed By: plunky Date: Tue Feb 9 20:44:26 UTC 2016 Modified Files: src/share/mk: bsd.own.mk Log Message: use pcpp front end rather than libexec/cpp directly, since commandline options may not be handled by the latter To generate a diff of this commit: cvs rdiff -u -r1.899 -r1.900 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.899 src/share/mk/bsd.own.mk:1.900 --- src/share/mk/bsd.own.mk:1.899 Mon Feb 8 10:39:09 2016 +++ src/share/mk/bsd.own.mk Tue Feb 9 20:44:26 2016 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.899 2016/02/08 10:39:09 skrll Exp $ +# $NetBSD: bsd.own.mk,v 1.900 2016/02/09 20:44:26 plunky Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -303,7 +303,7 @@ TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHIN # PCC supports C and Fortran TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc -TOOL_CPP.pcc= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp +TOOL_CPP.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++ # @@ -446,7 +446,7 @@ TOOL_OBJC.gcc= gcc # PCC supports C and Fortran TOOL_CC.pcc= pcc -TOOL_CPP.pcc= /usr/libexec/pcpp +TOOL_CPP.pcc= pcpp TOOL_CXX.pcc= p++ TOOL_AMIGAAOUT2BB= amiga-aout2bb
CVS commit: src/external/bsd/pcc
Module Name:src Committed By: plunky Date: Tue Feb 9 20:40:46 UTC 2016 Modified Files: src/external/bsd/pcc: Makefile.inc src/external/bsd/pcc/include: config.h src/external/bsd/pcc/libexec/ccom: Makefile src/external/bsd/pcc/libexec/cpp: Makefile src/external/bsd/pcc/libexec/cxxcom: Makefile src/external/bsd/pcc/usr.bin/pcc: Makefile Log Message: update build machinery for pcc-20160208 To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/external/bsd/pcc/Makefile.inc cvs rdiff -u -r1.7 -r1.8 src/external/bsd/pcc/include/config.h cvs rdiff -u -r1.13 -r1.14 src/external/bsd/pcc/libexec/ccom/Makefile cvs rdiff -u -r1.10 -r1.11 src/external/bsd/pcc/libexec/cpp/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/libexec/cxxcom/Makefile cvs rdiff -u -r1.10 -r1.11 src/external/bsd/pcc/usr.bin/pcc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/pcc/Makefile.inc diff -u src/external/bsd/pcc/Makefile.inc:1.18 src/external/bsd/pcc/Makefile.inc:1.19 --- src/external/bsd/pcc/Makefile.inc:1.18 Thu Jul 24 20:20:48 2014 +++ src/external/bsd/pcc/Makefile.inc Tue Feb 9 20:40:45 2016 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.18 2014/07/24 20:20:48 plunky Exp $ +# $NetBSD: Makefile.inc,v 1.19 2016/02/09 20:40:45 plunky Exp $ PCC_DIR:=${.PARSEDIR} PCC_DIST=${PCC_DIR}/dist/pcc PCC_LIBS=${PCC_DIR}/dist/pcc-libs # (these strings will be updated by the prepare-import.sh script) -PCC_VERSION=1.1.0.DEVEL -PCC_DATESTAMP=20140706 +PCC_VERSION=1.2.0.DEVEL +PCC_DATESTAMP=20160208 TARGOS = netbsd @@ -22,10 +22,11 @@ TARGMACH = ${MACHINE_ARCH} ERROR!= echo "ERROR: ${TARGMACH} not yet supported - write code!" >&2;echo .endif -VERSSTR="pcc ${PCC_VERSION} ${PCC_DATESTAMP} for ${TARGOS}-${TARGMACH}" +VERSSTR="pcc ${PCC_VERSION} ${PCC_DATESTAMP} for ${TARGMACH}--${TARGOS}" CPPFLAGS+= -DGCC_COMPAT CPPFLAGS+= -DPCC_DEBUG +CPPFLAGS+= -D_ISOC99_SOURCE CPPFLAGS+= -DVERSSTR=${VERSSTR:Q} CPPFLAGS+= -Dos_${TARGOS} CPPFLAGS+= -Dmach_${TARGMACH} Index: src/external/bsd/pcc/include/config.h diff -u src/external/bsd/pcc/include/config.h:1.7 src/external/bsd/pcc/include/config.h:1.8 --- src/external/bsd/pcc/include/config.h:1.7 Thu Jul 24 20:20:49 2014 +++ src/external/bsd/pcc/include/config.h Tue Feb 9 20:40:45 2016 @@ -1,6 +1,9 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + /* Using a.out ABI */ /* #undef AOUTABI */ @@ -22,9 +25,6 @@ /* Using ELF ABI */ #define ELFABI 1 -/* Define to 1 if you have the `basename' function. */ -#define HAVE_BASENAME 1 - /* Define to 1 if printf supports C99 size specifiers */ #define HAVE_C99_FORMAT 1 @@ -106,26 +106,32 @@ /* Using Mach-O ABI */ /* #undef MACHOABI */ +/* Define target Multi-Arch path */ +/* #undef MULTIARCH_PATH */ + /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" +#define PACKAGE_BUGREPORT "p...@lists.ludd.ltu.se" /* Define to the full name of this package. */ -#define PACKAGE_NAME "pcc" +#define PACKAGE_NAME "Portable C Compiler" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "pcc 1.1.0.DEVEL" +#define PACKAGE_STRING "Portable C Compiler 1.2.0.DEVEL" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pcc" +/* Define to the home page for this package. */ +#define PACKAGE_URL "http://pcc.ludd.ltu.se/; + /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1.0.DEVEL" +#define PACKAGE_VERSION "1.2.0.DEVEL" /* Major version no */ #define PCC_MAJOR 1 /* Minor version no */ -#define PCC_MINOR 1 +#define PCC_MINOR 2 /* Minor minor version no */ #define PCC_MINORMINOR 0 @@ -155,7 +161,7 @@ #define TLS 1 /* Version string */ -/* #define VERSSTR "pcc 1.1.0.DEVEL 20140706 for i386-unknown-netbsdelf6.99.40" */ +/* #define VERSSTR "Portable C Compiler 1.2.0.DEVEL 20160208 for i386-unknown-netbsdelf7.99.25" */ /* Size of wide-character type in chars */ #define WCHAR_SIZE 4 @@ -163,6 +169,18 @@ /* Type to use for wide characters */ #define WCHAR_TYPE INT +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1 Index: src/external/bsd/pcc/libexec/ccom/Makefile diff -u
CVS commit: src/lib/libbluetooth
Module Name:src Committed By: plunky Date: Fri Jan 22 08:51:40 UTC 2016 Modified Files: src/lib/libbluetooth: bt_dev.3 Log Message: correct comment in literal section To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libbluetooth/bt_dev.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libbluetooth/bt_dev.3 diff -u src/lib/libbluetooth/bt_dev.3:1.3 src/lib/libbluetooth/bt_dev.3:1.4 --- src/lib/libbluetooth/bt_dev.3:1.3 Tue Oct 25 09:33:55 2011 +++ src/lib/libbluetooth/bt_dev.3 Fri Jan 22 08:51:40 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: bt_dev.3,v 1.3 2011/10/25 09:33:55 plunky Exp $ +.\" $NetBSD: bt_dev.3,v 1.4 2016/01/22 08:51:40 plunky Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -155,7 +155,7 @@ structure contains at least the followin /* flow control */ uint16_tcmd_free; /* available CMD packet buffers */ uint16_tacl_free; /* available ACL packet buffers */ -uint16_tsco_free; /* available ACL packet buffers */ +uint16_tsco_free; /* available SCO packet buffers */ /* statistics */ uint32_tcmd_sent;
CVS commit: src/lib/libc/gen
Module Name:src Committed By: plunky Date: Fri Jan 22 08:50:00 UTC 2016 Modified Files: src/lib/libc/gen: directory.3 Log Message: clarify closing of descriptor returned by dirfd(3) To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/lib/libc/gen/directory.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/directory.3 diff -u src/lib/libc/gen/directory.3:1.38 src/lib/libc/gen/directory.3:1.39 --- src/lib/libc/gen/directory.3:1.38 Mon Oct 8 18:15:09 2012 +++ src/lib/libc/gen/directory.3 Fri Jan 22 08:50:00 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: directory.3,v 1.38 2012/10/08 18:15:09 njoly Exp $ +.\" $NetBSD: directory.3,v 1.39 2016/01/22 08:50:00 plunky Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)directory.3 8.1 (Berkeley) 6/4/93 .\" -.Dd October 15, 2011 +.Dd January 22, 2016 .Dt DIRECTORY 3 .Os .Sh NAME @@ -246,10 +246,12 @@ associated with the directory stream spe Upon failure, .Fn dirfd returns \-1. -The returned file descriptor should be closed by -.Fn closedir -instead of -.Xr close 2 . +The returned file descriptor should not be closed by +.Xr close 2 , +it will be released when +.Fa dirp +is closed with +.Fn closedir . .Pp The rationale of .Fn dirfd
CVS commit: src/lib/libc/sys
Module Name:src Committed By: plunky Date: Wed Dec 30 16:47:24 UTC 2015 Modified Files: src/lib/libc/sys: nanosleep.2 Log Message: point to more information about clock_id To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/sys/nanosleep.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/nanosleep.2 diff -u src/lib/libc/sys/nanosleep.2:1.17 src/lib/libc/sys/nanosleep.2:1.18 --- src/lib/libc/sys/nanosleep.2:1.17 Fri Oct 2 19:52:49 2015 +++ src/lib/libc/sys/nanosleep.2 Wed Dec 30 16:47:24 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: nanosleep.2,v 1.17 2015/10/02 19:52:49 christos Exp $ +.\" $NetBSD: nanosleep.2,v 1.18 2015/12/30 16:47:24 plunky Exp $ .\" .\" Copyright (c) 1986, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)sleep.3 8.1 (Berkeley) 6/4/93 .\" -.Dd October 2, 2015 +.Dd December 30, 2015 .Dt NANOSLEEP 2 .Os .Sh NAME @@ -98,7 +98,8 @@ is described in .Xr timespec 3 . The .Fa clock_id -specified is the time source. +specified is the time source, which is described in +.Xr clock_gettime 3 . .Sh RETURN VALUES If the .Fn clock_nanosleep @@ -157,6 +158,7 @@ the clock specified in the argument is not supported. .El .Sh SEE ALSO +.Xr clock_gettime 3 , .Xr sleep 3 , .Xr timespec 3 .Sh STANDARDS
CVS commit: src/etc/defaults
Module Name:src Committed By: plunky Date: Sat Dec 26 21:05:11 UTC 2015 Modified Files: src/etc/defaults: rc.conf Log Message: "ip6addrctl_enable" is now "ip6addrctl", set the default appropriately To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/etc/defaults/rc.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/defaults/rc.conf diff -u src/etc/defaults/rc.conf:1.134 src/etc/defaults/rc.conf:1.135 --- src/etc/defaults/rc.conf:1.134 Sun Dec 13 02:27:06 2015 +++ src/etc/defaults/rc.conf Sat Dec 26 21:05:11 2015 @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.134 2015/12/13 02:27:06 christos Exp $ +# $NetBSD: rc.conf,v 1.135 2015/12/26 21:05:11 plunky Exp $ # # /etc/defaults/rc.conf -- # default configuration of /etc/rc.conf @@ -376,7 +376,7 @@ makemandb=YES blacklistd=NO # IPv6 address selection policy -ip6addrctl_enable=NO +ip6addrctl=NO # ipv6_prefer, ipv4_prefer, auto ip6addrctl_policy=auto ip6addrctl_verbose=NO
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Tue Dec 22 11:40:07 UTC 2015 Modified Files: src/sys/netbt: hci_socket.c Log Message: there is no longer a reason to have a separate hci_send function now that the hci_usrreq function is disassembled, so merge hci_send_pcb back into hci_send() To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/netbt/hci_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/hci_socket.c diff -u src/sys/netbt/hci_socket.c:1.44 src/sys/netbt/hci_socket.c:1.45 --- src/sys/netbt/hci_socket.c:1.44 Sat May 2 17:18:03 2015 +++ src/sys/netbt/hci_socket.c Tue Dec 22 11:40:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: hci_socket.c,v 1.44 2015/05/02 17:18:03 rtr Exp $ */ +/* $NetBSD: hci_socket.c,v 1.45 2015/12/22 11:40:07 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.44 2015/05/02 17:18:03 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.45 2015/12/22 11:40:07 plunky Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -348,84 +348,6 @@ hci_cmdwait_flush(struct socket *so) } } -/* - * HCI send packet - * This came from userland, so check it out. - */ -static int -hci_send_pcb(struct hci_pcb *pcb, struct mbuf *m, bdaddr_t *addr) -{ - struct hci_unit *unit; - struct mbuf *m0; - hci_cmd_hdr_t hdr; - int err; - - KASSERT(m != NULL); - KASSERT(addr != NULL); - - /* wants at least a header to start with */ - if (m->m_pkthdr.len < sizeof(hdr)) { - err = EMSGSIZE; - goto bad; - } - m_copydata(m, 0, sizeof(hdr), ); - hdr.opcode = le16toh(hdr.opcode); - - /* only allows CMD packets to be sent */ - if (hdr.type != HCI_CMD_PKT) { - err = EINVAL; - goto bad; - } - - /* validates packet length */ - if (m->m_pkthdr.len != sizeof(hdr) + hdr.length) { - err = EMSGSIZE; - goto bad; - } - - /* finds destination */ - unit = hci_unit_lookup(addr); - if (unit == NULL) { - err = ENETDOWN; - goto bad; - } - - /* security checks for unprivileged users */ - if (pcb->hp_cred != NULL - && kauth_authorize_device(pcb->hp_cred, - KAUTH_DEVICE_BLUETOOTH_SEND, - unit, , NULL, NULL) != 0) { - err = EPERM; - goto bad; - } - - /* makess a copy for precious to keep */ - m0 = m_copypacket(m, M_DONTWAIT); - if (m0 == NULL) { - err = ENOMEM; - goto bad; - } - sbappendrecord(>hp_socket->so_snd, m0); - M_SETCTX(m, pcb->hp_socket); /* enable drop callback */ - - DPRINTFN(2, "(%s) opcode (%03x|%04x)\n", device_xname(unit->hci_dev), - HCI_OGF(hdr.opcode), HCI_OCF(hdr.opcode)); - - /* Sendss it */ - if (unit->hci_num_cmd_pkts == 0) - MBUFQ_ENQUEUE(>hci_cmdwait, m); - else - hci_output_cmd(unit, m); - - return 0; - -bad: - DPRINTF("packet (%d bytes) not sent (error %d)\n", - m->m_pkthdr.len, err); - if (m) m_freem(m); - return err; -} - static int hci_attach(struct socket *so, int proto) { @@ -669,30 +591,94 @@ hci_send(struct socket *so, struct mbuf struct mbuf *control, struct lwp *l) { struct hci_pcb *pcb = so->so_pcb; - struct sockaddr_bt * sa = (struct sockaddr_bt *)nam; + struct sockaddr_bt *sa = (struct sockaddr_bt *)nam; + struct hci_unit *unit; + struct mbuf *m0; + hci_cmd_hdr_t hdr; int err = 0; KASSERT(solocked(so)); KASSERT(pcb != NULL); + KASSERT(m != NULL); if (control) /* have no use for this */ m_freem(control); - if (nam) { + if (sa) { if (sa->bt_len != sizeof(struct sockaddr_bt)) { err = EINVAL; - goto release; + goto bad; } if (sa->bt_family != AF_BLUETOOTH) { err = EAFNOSUPPORT; - goto release; + goto bad; } } - return hci_send_pcb(pcb, m, (sa ? >bt_bdaddr : >hp_raddr)); + /* + * this came from userland, so we check it out first + */ + + /* wants at least a header to start with */ + if (m->m_pkthdr.len < sizeof(hdr)) { + err = EMSGSIZE; + goto bad; + } + m_copydata(m, 0, sizeof(hdr), ); + hdr.opcode = le16toh(hdr.opcode); + + /* only allows CMD packets to be sent */ + if (hdr.type != HCI_CMD_PKT) { + err = EINVAL; + goto bad; + } + + /* validates packet length */ + if (m->m_pkthdr.len != sizeof(hdr) + hdr.length) { + err = EMSGSIZE; + goto bad; + } + + /* finds destination */ + unit = hci_unit_lookup((sa ? >bt_bdaddr : >hp_raddr)); + if (unit == NULL) { + err = ENETDOWN; + goto bad; + } + + /* security checks for unprivileged users */ + if (pcb->hp_cred != NULL + && kauth_authorize_device(pcb->hp_cred, + KAUTH_DEVICE_BLUETOOTH_SEND, + unit, , NULL, NULL) != 0) { + err = EPERM; + goto bad; + } + + /* makess a copy for precious to keep */ + m0 = m_copypacket(m, M_DONTWAIT); + if (m0 == NULL) { + err = ENOMEM; + goto bad; + } + sbappendrecord(>hp_socket->so_snd, m0); + M_SETCTX(m, pcb->hp_sock
CVS commit: src/share/man/man9
Module Name:src Committed By: plunky Date: Sun Dec 13 21:53:03 UTC 2015 Modified Files: src/share/man/man9: SET.9 Log Message: Clarify the meaning of this. These macros do not operate on bit numbers as is implied.. the macros are defined as #define SET(t, f) ((t) |= (f)) #define ISSET(t, f) ((t) & (f)) #define CLR(t, f) ((t) &= ~(f)) When the rationale is to provide clarity in the source code, then it is good to have manual pages that are correct. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/SET.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/SET.9 diff -u src/share/man/man9/SET.9:1.3 src/share/man/man9/SET.9:1.4 --- src/share/man/man9/SET.9:1.3 Wed Mar 12 16:37:01 2014 +++ src/share/man/man9/SET.9 Sun Dec 13 21:53:02 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: SET.9,v 1.3 2014/03/12 16:37:01 jruoho Exp $ +.\" $NetBSD: SET.9,v 1.4 2015/12/13 21:53:02 plunky Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 12, 2014 +.Dd December 13, 2015 .Dt SET 9 .Os .Sh NAME @@ -42,26 +42,26 @@ .Ft void .Fn CLR "val" "x" .Sh DESCRIPTION -These macros define three standard bit-operations: +These macros define three standard bit operations: .Bl -enum -offset indent .It .Fn SET -sets the bit +the set bits from .Fa x in .Fa val ; .It .Fn CLR -clears the bit +clears the set bits from .Fa x in .Fa val ; and .It .Fn ISSET -returns 1 if the bit +returns true if any of the set bits from .Fa x -is set in +are set in .Fa val . .El .Sh SEE ALSO
CVS commit: src/sys/dev/bluetooth
Module Name:src Committed By: plunky Date: Sun Dec 13 21:13:00 UTC 2015 Modified Files: src/sys/dev/bluetooth: btmagic.c Log Message: STRENGHT -> STRENGTH and misc spelling/whitespace. no functional change To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/bluetooth/btmagic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/bluetooth/btmagic.c diff -u src/sys/dev/bluetooth/btmagic.c:1.14 src/sys/dev/bluetooth/btmagic.c:1.15 --- src/sys/dev/bluetooth/btmagic.c:1.14 Fri Jul 3 14:18:18 2015 +++ src/sys/dev/bluetooth/btmagic.c Sun Dec 13 21:13:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: btmagic.c,v 1.14 2015/07/03 14:18:18 bouyer Exp $ */ +/* $NetBSD: btmagic.c,v 1.15 2015/12/13 21:13:00 plunky Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -85,7 +85,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.14 2015/07/03 14:18:18 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.15 2015/12/13 21:13:00 plunky Exp $"); #include #include @@ -163,7 +163,7 @@ struct btmagic_softc { int sc_rw; /* previous touches */ - uint32_t sc_smask; /* active(s) IDs */ + uint32_t sc_smask; /* active IDs */ int sc_nfingers; /* number of active IDs */ int sc_ax[16]; int sc_ay[16]; @@ -234,7 +234,7 @@ static void btmagic_tapcallout(void *); #define TRACKPAD_REPORT_ID 0x28 #define MOUSE_REPORT_ID 0x29 #define BATT_STAT_REPORT_ID 0x30 -#define BATT_STRENGHT_REPORT_ID 0x47 +#define BATT_STRENGTH_REPORT_ID 0x47 #define SURFACE_REPORT_ID 0x61 static const struct btproto btmagic_ctl_proto = { @@ -1114,6 +1114,7 @@ btmagic_input(void *arg, struct mbuf *m) case TRACKPAD_REPORT_ID: /* Magic trackpad (input) */ btmagic_input_magict(sc, data + 2, len - 2); break; + case MOUSE_REPORT_ID: /* Magic touch (input) */ btmagic_input_magicm(sc, data + 2, len - 2); break; @@ -1131,7 +1132,7 @@ btmagic_input(void *arg, struct mbuf *m) } break; - case BATT_STRENGHT_REPORT_ID: /* Battery strength (feature) */ + case BATT_STRENGTH_REPORT_ID: /* Battery strength (feature) */ if (len != 3) break; @@ -1529,7 +1530,7 @@ btmagic_input_magict(struct btmagic_soft ay = hid_get_data(data, ); DPRINTF(sc, - "btmagic_input_magicm: id %d ax %d ay %d phase %ld %s\n", + "btmagic_input_magict: id %d ax %d ay %d phase %ld %s\n", id, ax, ay, hid_get_udata(data, ), bpress ? "button pressed" : "");
CVS commit: src/usr.bin/sdpquery
Module Name:src Committed By: plunky Date: Fri Dec 11 21:05:18 UTC 2015 Modified Files: src/usr.bin/sdpquery: print.c Log Message: update several profiles, bringing up to date decoding of all the Bluetooth 1.1->4.2 Service Discovery specifications I could find, namely: Wireless Access Protocol Multi-Profile Specification Calendar, Tasks & Notes Message Access Profile Message Notification Service Global Navigation Satellite System Health Device Profile File Transfer Protocol 3D Display General Access Profile Generic Attribute Server all documentation is on bluetooth.org, under https://www.bluetooth.org/en-us/specification To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/sdpquery/print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/sdpquery/print.c diff -u src/usr.bin/sdpquery/print.c:1.21 src/usr.bin/sdpquery/print.c:1.22 --- src/usr.bin/sdpquery/print.c:1.21 Mon Mar 16 19:10:48 2015 +++ src/usr.bin/sdpquery/print.c Fri Dec 11 21:05:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.21 2015/03/16 19:10:48 plunky Exp $ */ +/* $NetBSD: print.c,v 1.22 2015/12/11 21:05:18 plunky Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: print.c,v 1.21 2015/03/16 19:10:48 plunky Exp $"); +__RCSID("$NetBSD: print.c,v 1.22 2015/12/11 21:05:18 plunky Exp $"); #include #include @@ -103,6 +103,9 @@ static void print_asink_features(sdp_dat static void print_avrcp_features(sdp_data_t *); static void print_supported_data_stores(sdp_data_t *); static void print_supported_formats(sdp_data_t *); +static void print_wap_addr(sdp_data_t *); +static void print_wap_gateway(sdp_data_t *); +static void print_wap_type(sdp_data_t *); static void print_hid_version(sdp_data_t *); static void print_hid_device_subclass(sdp_data_t *); static void print_hid_descriptor_list(sdp_data_t *); @@ -114,15 +117,22 @@ static void print_hfag_features(sdp_data static void print_net_access_type(sdp_data_t *); static void print_pnp_source(sdp_data_t *); static void print_mas_types(sdp_data_t *); -static void print_supported_repositories(sdp_data_t *); +static void print_map_features(sdp_data_t *); +static void print_pse_repositories(sdp_data_t *); +static void print_pse_features(sdp_data_t *); +static void print_hdp_features(sdp_data_t *); +static void print_hdp_specification(sdp_data_t *); +static void print_mcap_procedures(sdp_data_t *); static void print_character_repertoires(sdp_data_t *); static void print_bip_capabilities(sdp_data_t *); static void print_bip_features(sdp_data_t *); static void print_bip_functions(sdp_data_t *); static void print_bip_capacity(sdp_data_t *); static void print_1284id(sdp_data_t *); +static void print_ctn_features(sdp_data_t *); static void print_rfcomm(sdp_data_t *); +static void print_att(sdp_data_t *); static void print_bnep(sdp_data_t *); static void print_avctp(sdp_data_t *); static void print_avdtp(sdp_data_t *); @@ -135,6 +145,7 @@ attr_t protocol_list[] = { { 0x0004, "TCP",NULL }, { 0x0005, "TCS_BIN",NULL }, { 0x0006, "TCS_AT",NULL }, + { 0x0007, "ATT",print_att }, { 0x0008, "OBEX",NULL }, { 0x0009, "IP", NULL }, { 0x000a, "FTP",NULL }, @@ -216,9 +227,14 @@ attr_t irmc_sync_attrs[] = { /* IrMC Syn }; attr_t opush_attrs[] = { /* Object Push */ + { 0x0200, "GeopL2capPSM", print_uint16x }, { 0x0303, "SupportedFormatsList", print_supported_formats }, }; +attr_t ft_attrs[] = { /* File Transfer */ + { 0x0200, "GeopL2capPSM", print_uint16x }, +}; + attr_t hset_attrs[] = { /* Headset */ { 0x0302, "RemoteAudioVolumeControl", print_bool }, }; @@ -230,11 +246,20 @@ attr_t fax_attrs[] = { /* Fax */ { 0x0305, "AudioFeedbackSupport", print_bool }, }; +attr_t wap_attrs[] = { /* WAP Bearer */ + { 0x0306, "NetworkAddress", print_wap_addr }, + { 0x0307, "WAPGateway",print_wap_gateway }, + { 0x0308, "HomePageURL", print_url }, + { 0x0309, "WAPStackType", print_wap_type }, +}; + attr_t panu_attrs[] = { /* Personal Area Networking User */ + { 0x0200, "IpSubnet",print_string }, { 0x030a, "SecurityDescription", print_security_description }, }; attr_t nap_attrs[] = { /* Network Access Point */ + { 0x0200, "IpSubnet",print_string }, { 0x030a, "SecurityDescription", print_security_description }, { 0x030b, "NetAccessType", print_net_access_type }, { 0x030c, "MaxNetAccessRate", print_uint32d }, @@ -243,6 +268,7 @@ attr_t nap_attrs[] = { /* Network Access }; attr_t gn_attrs[] = { /* Group Network */ + { 0x0200, "IpSubnet",print_string }, { 0x030a, "SecurityDescription", print_security_description }, { 0x030d, "IPv4Subnet",print_string }, { 0x030e, "IPv6Subnet",print_string }, @@ -270,6 +296,7 @@ attr_t bp_attrs[] = { /*
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Sat Nov 28 08:57:33 UTC 2015 Modified Files: src/sys/netbt: l2cap_signal.c Log Message: note recent spec additions to L2CAP Info command regarding fixed channels To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/netbt/l2cap_signal.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/l2cap_signal.c diff -u src/sys/netbt/l2cap_signal.c:1.16 src/sys/netbt/l2cap_signal.c:1.17 --- src/sys/netbt/l2cap_signal.c:1.16 Sat Feb 9 01:19:05 2013 +++ src/sys/netbt/l2cap_signal.c Sat Nov 28 08:57:33 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: l2cap_signal.c,v 1.16 2013/02/09 01:19:05 christos Exp $ */ +/* $NetBSD: l2cap_signal.c,v 1.17 2015/11/28 08:57:33 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.16 2013/02/09 01:19:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.17 2015/11/28 08:57:33 plunky Exp $"); #include #include @@ -974,6 +974,8 @@ l2cap_recv_info_req(struct mbuf *m, stru * 0 1 0x0001 L2CAP Signalling Channel (SET) * 0 2 0x0002 Connectionless Reception * 0 3 0x0003 AMP Manager Protocol Channel + * 0 7 0x0007 BR/EDR Security Manager + * 7 7 0x003f AMP Test Manager */ le16enc(rsp + 0, cp.type); le16enc(rsp + 2, L2CAP_SUCCESS);
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Sat Nov 28 09:04:34 UTC 2015 Modified Files: src/sys/netbt: hci.h hci_event.c hci_ioctl.c Log Message: add version and extended feature flags defined in 4.2 specification, add cache for page 2 of extended features and return this in the SIOCGBTFEAT ioctl (no change in size) To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/netbt/hci.h cvs rdiff -u -r1.23 -r1.24 src/sys/netbt/hci_event.c cvs rdiff -u -r1.12 -r1.13 src/sys/netbt/hci_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/hci.h diff -u src/sys/netbt/hci.h:1.40 src/sys/netbt/hci.h:1.41 --- src/sys/netbt/hci.h:1.40 Sun Sep 6 06:01:01 2015 +++ src/sys/netbt/hci.h Sat Nov 28 09:04:34 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: hci.h,v 1.40 2015/09/06 06:01:01 dholland Exp $ */ +/* $NetBSD: hci.h,v 1.41 2015/11/28 09:04:34 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -54,14 +54,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: hci.h,v 1.40 2015/09/06 06:01:01 dholland Exp $ + * $Id: hci.h,v 1.41 2015/11/28 09:04:34 plunky Exp $ * $FreeBSD: src/sys/netgraph/bluetooth/include/ng_hci.h,v 1.6 2005/01/07 01:45:43 imp Exp $ */ /* * This file contains everything that applications need to know from * Host Controller Interface (HCI). Information taken from Bluetooth - * Core Specifications (v1.1, v2.0 and v2.1) + * Core Specifications (v1.1, v2.0, v2.1 + EDR, v3.0 + HS, + * v4.0 and v4.2) * * This file can be included by both kernel and userland applications. * @@ -101,7 +102,10 @@ #define HCI_SPEC_V20 0x03 /* v2.0 + EDR */ #define HCI_SPEC_V21 0x04 /* v2.1 + EDR */ #define HCI_SPEC_V30 0x05 /* v3.0 + HS */ -/* 0x06 - 0xFF - reserved for future use */ +#define HCI_SPEC_V40 0x06 /* v4.0 */ +#define HCI_SPEC_V41 0x07 /* v4.1 */ +#define HCI_SPEC_V42 0x08 /* v4.2 */ +/* 0x09 - 0xFF - reserved for future use */ /* LMP features (and page 0 of extended features) */ /* --- byte 0 */ @@ -146,8 +150,8 @@ /* reserved0x04 */ #define HCI_LMP_AFH_CAPABLE_SLAVE 0x08 #define HCI_LMP_AFH_CLASS_SLAVE 0x10 -/* reserved0x20 */ -/* reserved0x40 */ +#define HCI_LMP_BR_EDR_UNSUPPORTED 0x20 +#define HCI_LMP_LE_CONTROLLER 0x40 #define HCI_LMP_3SLOT_EDR_ACL 0x80 /* --- byte 5 */ #define HCI_LMP_5SLOT_EDR_ACL 0x01 @@ -160,7 +164,7 @@ #define HCI_LMP_3SLOT_EDR_eSCO 0x80 /* --- byte 6 */ #define HCI_LMP_EXTENDED_INQUIRY 0x01 -/* reserved0x02 */ +#define HCI_LMP_LE_BR_EDR_CONTROLLER 0x02 /* reserved0x04 */ #define HCI_LMP_SIMPLE_PAIRING 0x08 #define HCI_LMP_ENCAPSULATED_PDU 0x10 @@ -176,6 +180,25 @@ /* page 1 of extended features */ /* --- byte 0 */ #define HCI_LMP_SSP 0x01 +#define HCI_LMP_LE_HOST 0x02 +#define HCI_LMP_LE_BR_EDR_HOST 0x04 +#define HCI_LMP_SECURE_CONN_HOST 0x08 + +/* page 2 of extended features */ +/* --- byte 0 */ +#define HCI_LMP_CONNLESS_MASTER 0x01 +#define HCI_LMP_CONNLESS_SLAVE 0x02 +#define HCI_LMP_SYNC_TRAIN 0x04 +#define HCI_LMP_SYNC_SCAN 0x08 +#define HCI_LMP_INQ_RSP_NOTIFY 0x10 +#define HCI_LMP_INTERLACE_SCAN 0x20 +#define HCI_LMP_COARSE_CLOCK 0x40 +/* reserved0x80 */ +/* --- byte 0 */ +#define HCI_LMP_SECURE_CONN_CONTROLLER 0x01 +#define HCI_LMP_PING 0x02 +/* reserved0x04 */ +#define HCI_LMP_TRAIN_NUDGING 0x08 /* Link types */ #define HCI_LINK_SCO 0x00 /* Voice */ @@ -2334,6 +2357,7 @@ struct btreq { struct { uint8_t btrf_page0[HCI_FEATURES_SIZE]; /* basic */ uint8_t btrf_page1[HCI_FEATURES_SIZE]; /* extended */ + uint8_t btrf_page2[HCI_FEATURES_SIZE]; /* extended */ } btrf; struct bt_stats btrs; /* unit stats */ } btru; @@ -2352,6 +2376,7 @@ struct btreq { #define btr_max_sco btru.btri.btri_max_sco #define btr_features0 btru.btrf.btrf_page0 #define btr_features1 btru.btrf.btrf_page1 +#define btr_features2 btru.btrf.btrf_page2 #define btr_stats btru.btrs /* hci_unit & btr_flags */ @@ -2496,7 +2521,8 @@ struct hci_unit { uint16_t hci_lmp_mask; /* link policy capabilities */ uint8_t hci_feat0[HCI_FEATURES_SIZE]; /* features mask */ - uint8_t hci_feat1[HCI_FEATURES_SIZE]; /* extended */ + uint8_t hci_feat1[HCI_FEATURES_SIZE]; /* extended page 1 */ + uint8_t hci_feat2[HCI_FEATURES_SIZE]; /* extended page 2 */ uint8_t hci_cmds[HCI_COMMANDS_SIZE]; /* opcode bitmask */ /* flow control */ Index: src/sys/netbt/hci_event.c diff -u src/sys/netbt/hci_event.c:1.23 src/sys/netbt/hci_event.c:1.24 --- src/sys/netbt/hci_event.c:1.23 Wed Jul 27 10:25:09 2011 +++ src/sys/netbt/hci_event.c Sat Nov 28 09:04:34 2015 @@ -1,4
CVS commit: src/usr.sbin/btconfig
Module Name:src Committed By: plunky Date: Sat Nov 28 09:25:45 UTC 2015 Modified Files: src/usr.sbin/btconfig: btconfig.c Log Message: add details of later (to v4.2) specification versions and extended feature flags, To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/btconfig/btconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btconfig/btconfig.c diff -u src/usr.sbin/btconfig/btconfig.c:1.26 src/usr.sbin/btconfig/btconfig.c:1.27 --- src/usr.sbin/btconfig/btconfig.c:1.26 Mon Oct 17 16:37:50 2011 +++ src/usr.sbin/btconfig/btconfig.c Sat Nov 28 09:25:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: btconfig.c,v 1.26 2011/10/17 16:37:50 mbalmer Exp $ */ +/* $NetBSD: btconfig.c,v 1.27 2015/11/28 09:25:45 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -33,7 +33,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2006 Itronix, Inc. All rights reserved."); -__RCSID("$NetBSD: btconfig.c,v 1.26 2011/10/17 16:37:50 mbalmer Exp $"); +__RCSID("$NetBSD: btconfig.c,v 1.27 2015/11/28 09:25:45 plunky Exp $"); #include #include @@ -64,6 +64,7 @@ static void print_voice(int); static void tag(const char *); static void print_features0(uint8_t *); static void print_features1(uint8_t *); +static void print_features2(uint8_t *); static void print_result(int, struct bt_devinquiry *); static void do_inquiry(void); @@ -659,7 +660,10 @@ print_info(int level) case HCI_SPEC_V20: printf("2.0 + EDR\n"); break; case HCI_SPEC_V21: printf("2.1 + EDR\n"); break; case HCI_SPEC_V30: printf("3.0 + HS\n"); break; - default: printf("unknown\n"); break; + case HCI_SPEC_V40: printf("4.0\n"); break; + case HCI_SPEC_V41: printf("4.1\n"); break; + case HCI_SPEC_V42: printf("4.2\n"); break; + default: printf("[%d]\n", version); break; } load_value(HCI_CMD_READ_UNIT_CLASS, buf, HCI_CLASS_SIZE); @@ -741,6 +745,7 @@ print_info(int level) width = printf("\tfeatures:"); print_features0(btr.btr_features0); print_features1(btr.btr_features1); + print_features2(btr.btr_features2); tag(NULL); } @@ -802,9 +807,9 @@ print_features0(uint8_t *f) if (*f & HCI_LMP_PAGISCHEME) tag(""); if (*f & HCI_LMP_POWER_CONTROL) tag(""); if (*f & HCI_LMP_TRANSPARENT_SCO) tag(""); - if (*f & HCI_LMP_FLOW_CONTROL_LAG0) tag(""); - if (*f & HCI_LMP_FLOW_CONTROL_LAG1) tag(""); - if (*f & HCI_LMP_FLOW_CONTROL_LAG2) tag(""); + if (*f & HCI_LMP_FLOW_CONTROL_LAG0) tag(""); + if (*f & HCI_LMP_FLOW_CONTROL_LAG1) tag(""); + if (*f & HCI_LMP_FLOW_CONTROL_LAG2) tag(""); if (*f & HCI_LMP_BC_ENCRYPTION) tag(""); f++; @@ -823,6 +828,8 @@ print_features0(uint8_t *f) if (*f & HCI_LMP_EV5_PKT) tag(""); if (*f & HCI_LMP_AFH_CAPABLE_SLAVE) tag(""); if (*f & HCI_LMP_AFH_CLASS_SLAVE) tag(""); + if (*f & HCI_LMP_BR_EDR_UNSUPPORTED)tag(""); + if (*f & HCI_LMP_LE_CONTROLLER) tag(""); if (*f & HCI_LMP_3SLOT_EDR_ACL) tag("<3 slot EDR ACL>"); f++; @@ -839,6 +846,7 @@ print_features0(uint8_t *f) /* --- byte 6 */ if (*f & HCI_LMP_EXTENDED_INQUIRY) tag(""); + if (*f & HCI_LMP_LE_BR_EDR_CONTROLLER)tag(""); if (*f & HCI_LMP_SIMPLE_PAIRING)tag(""); if (*f & HCI_LMP_ENCAPSULATED_PDU) tag(""); if (*f & HCI_LMP_ERRDATA_REPORTING) tag(""); @@ -857,7 +865,28 @@ print_features1(uint8_t *f) { /* --- byte 0 */ - if (*f & HCI_LMP_SSP) tag(""); + if (*f & HCI_LMP_SSP) tag(""); + if (*f & HCI_LMP_LE_HOST) tag(""); + if (*f & HCI_LMP_LE_BR_EDR_HOST)tag(""); + if (*f & HCI_LMP_SECURE_CONN_HOST) tag(""); +} + +static void +print_features2(uint8_t *f) +{ + /* --- byte 0 */ + if (*f & HCI_LMP_CONNLESS_MASTER) tag(""); + if (*f & HCI_LMP_CONNLESS_SLAVE)tag(""); + if (*f & HCI_LMP_SYNC_TRAIN) tag(""); + if (*f & HCI_LMP_SYNC_SCAN) tag(""); + if (*f & HCI_LMP_INQ_RSP_NOTIFY)tag(""); + if (*f & HCI_LMP_INTERLACE_SCAN)tag(""); + if (*f & HCI_LMP_COARSE_CLOCK) tag(""); + + /* --- byte 1 */ + if (*f & HCI_LMP_SECURE_CONN_CONTROLLER)tag(""); + if (*f & HCI_LMP_PING) tag(""); + if (*f & HCI_LMP_TRAIN_NUDGING) tag(""); } static void
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Sat Nov 28 07:50:37 UTC 2015 Modified Files: src/sys/netbt: l2cap.h Log Message: add in PSMs defined in later versions of specification To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/netbt/l2cap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/l2cap.h diff -u src/sys/netbt/l2cap.h:1.18 src/sys/netbt/l2cap.h:1.19 --- src/sys/netbt/l2cap.h:1.18 Tue Aug 5 07:55:31 2014 +++ src/sys/netbt/l2cap.h Sat Nov 28 07:50:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: l2cap.h,v 1.18 2014/08/05 07:55:31 rtr Exp $ */ +/* $NetBSD: l2cap.h,v 1.19 2015/11/28 07:50:37 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -54,7 +54,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: l2cap.h,v 1.18 2014/08/05 07:55:31 rtr Exp $ + * $Id: l2cap.h,v 1.19 2015/11/28 07:50:37 plunky Exp $ * $FreeBSD: src/sys/netgraph/bluetooth/include/l2cap.h,v 1.4 2005/08/31 18:13:23 emax Exp $ */ @@ -105,7 +105,7 @@ #define L2CAP_REJ_INVALID_CID 0x0002 /* 0x0003 - 0x - reserved for future use */ -/* Protocol/Service Multiplexor (PSM) values */ +/* Protocol/Service Multiplexer (PSM) values */ #define L2CAP_PSM_ANY 0x /* Any/Invalid PSM */ #define L2CAP_PSM_SDP 0x0001 /* Service Discovery Protocol */ #define L2CAP_PSM_RFCOMM 0x0003 /* RFCOMM protocol */ @@ -121,7 +121,13 @@ /* Transport Protocol */ #define L2CAP_PSM_AVDTP 0x0019 /* Audio/Visual Distribution */ /* Transport Protocol */ -/* 0x0019 - 0x1000 - reserved for future use */ +#define L2CAP_PSM_UDI_C_PLANE 0x001d /* Unrestricted Digital */ + /* Information Profile */ +#define L2CAP_PSM_ATT 0x001f /* Attribute Protocol */ +#define L2CAP_PSM_3DSP 0x0021 /* 3D Synchronization Profile */ +#define L2CAP_PSM_IPSP 0x0023 /* Internet Protocol */ + /* Support Profile */ +/* 0x0025 - 0x1000 - reserved for future use */ #define L2CAP_PSM_INVALID(psm) (((psm) & 0x0101) != 0x0001) @@ -220,7 +226,7 @@ typedef struct { /* L2CAP ConnectionLess Traffic (dcid == L2CAP_CLT_CID) */ typedef struct { - uint16_t psm; /* Protocol/Service Multiplexor */ + uint16_t psm; /* Protocol/Service Multiplexer */ } __packed l2cap_clt_hdr_t; #define L2CAP_CLT_MTU_MAXIMUM \ @@ -243,7 +249,7 @@ typedef struct { /* L2CAP Connection Request */ #define L2CAP_CONNECT_REQ 0x02 typedef struct { - uint16_t psm; /* Protocol/Service Multiplexor (PSM) */ + uint16_t psm; /* Protocol/Service Multiplexer */ uint16_t scid; /* source channel ID */ } __packed l2cap_con_req_cp;
CVS commit: src/etc/bluetooth
Module Name:src Committed By: plunky Date: Sat Nov 28 07:46:33 UTC 2015 Modified Files: src/etc/bluetooth: hosts protocols Log Message: clean up: remove FreeBSD cvs tags, update URLS, fix spelling and add in PSMs defined in recent versions of specifications To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/etc/bluetooth/hosts src/etc/bluetooth/protocols Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/bluetooth/hosts diff -u src/etc/bluetooth/hosts:1.1 src/etc/bluetooth/hosts:1.2 --- src/etc/bluetooth/hosts:1.1 Mon Jun 19 15:44:35 2006 +++ src/etc/bluetooth/hosts Sat Nov 28 07:46:33 2015 @@ -1,10 +1,9 @@ -# $NetBSD: hosts,v 1.1 2006/06/19 15:44:35 gdamore Exp $ -# $Id: hosts,v 1.1 2006/06/19 15:44:35 gdamore Exp $ -# $FreeBSD: /repoman/r/ncvs/src/etc/bluetooth/hosts,v 1.2 2005/11/10 19:09:22 emax Exp $ +# $NetBSD: hosts,v 1.2 2015/11/28 07:46:33 plunky Exp $ # # Bluetooth Host Database # -# This file should contain the Bluetooth addresses and aliases for hosts. +# This file should contain the Bluetooth device addresses and +# aliases for devices known to the system # # BD_ADDR Name [ alias0 alias1 ... ] Index: src/etc/bluetooth/protocols diff -u src/etc/bluetooth/protocols:1.1 src/etc/bluetooth/protocols:1.2 --- src/etc/bluetooth/protocols:1.1 Mon Jun 19 15:44:35 2006 +++ src/etc/bluetooth/protocols Sat Nov 28 07:46:33 2015 @@ -1,22 +1,47 @@ -# $NetBSD: protocols,v 1.1 2006/06/19 15:44:35 gdamore Exp $ -# $Id: protocols,v 1.1 2006/06/19 15:44:35 gdamore Exp $ -# $FreeBSD: /repoman/r/ncvs/src/etc/bluetooth/protocols,v 1.2 2005/11/10 19:09:22 emax Exp $ +# $NetBSD: protocols,v 1.2 2015/11/28 07:46:33 plunky Exp $ # -# Bluetooth Protocol/Service Multiplexor (PSM) names and numbers +# Bluetooth Protocol/Service Multiplexer (PSM) names and values # # See also -# https://www.bluetooth.org/foundry/assignnumb/document/assigned_numbers +# https://www.bluetooth.org/en-us/specification/assigned-numbers +# https://www.bluetooth.org/en-us/specification/adopted-specifications # -# Protocol PSM Alias Reference +# Protocol PSM [ Alias ... ] -sdp 1 SDP # Service Discovery Protocol -rfcomm 3 RFCOMM# RFCOMM with TS 07.10 -tcs-bin 5 TCS-BIN # Telephony Control Specification -tcs-bin-cordless 7 TCS-BIN-CORDLESS # Telephony Control Specification -bnep 15 BNEP # Bluetooth Network Encapsulation Protocol -hid-control 17 HID-Control # Human Interface Device (control) -hid-interrupt19 HID-Interrupt # Human Interface Device (interrupt) -upnp 21 UPnP # See ESDP, Bluetooth SIG -avctp23 AVCTP # Audio/Video Control Transport Protocol -avdtp25 AVDTP # Audio/Video Distribution Transport Protocol -udi-c-plane 29 UDI-C-Plane # Unrestricted Digital Information Profile +# Service Discovery Protocol, Bluetooth Core Specification +sdp 0x0001 SDP + +# RFCOMM with TS 07.10, Bluetooth SIG +rfcomm i 0x0003 RFCOMM + +# Telephony Control Specification, Bluetooth SIG +tcs-bin 0x0005 TCS-BIN TCS_BIN +tcs-bin-cordless 0x0007 TCS-BIN-CORDLESS TCS_BIN_CORDLESS + +# Bluetooth Network Encapsulation Protocol, Bluetooth SIG +bnep 0x000f BNEP + +# Human Interface Device Profile, Bluetooth SIG +hid-control 0x0011 HID-Control HID_Control +hid-interrupt 0x0013 HID-Interrupt HID_Interrupt + +# Extended Service Discovery Profile [ESDP] for Universal Plug and Play(tm), Bluetooth SIG +upnp 0x0015 UPnP ESDP + +# Audio/Video Control Transport Protocol, Bluetooth SIG +avctp 0x0017 AVCTP + +# Audio/Video Distribution Transport Protocol, Bluetooth SIG +avdtp 0x0019 AVDTP + +# Unrestricted Digital Information Profile, Bluetooth SIG +udi-c-plane 0x001d UDI-C-Plane UDI_C_Plane + +# Attribute Protocol, Bluetooth Core Specification +att 0x001f ATT + +# 3D Synchronization Profile, Bluetooth SIG +3dsp 0x0021 3DSP + +# Internet Protocol Support Profile [IPSP], Bluetooth SIG +le_psm_ipsp 0x0023 LE_PSM_IPSP
CVS commit: src/lib/libbluetooth
Module Name:src Committed By: plunky Date: Sat Nov 28 07:47:30 UTC 2015 Modified Files: src/lib/libbluetooth: bluetooth.3 Log Message: fix spelling Multiplexor->Multiplexer To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libbluetooth/bluetooth.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libbluetooth/bluetooth.3 diff -u src/lib/libbluetooth/bluetooth.3:1.7 src/lib/libbluetooth/bluetooth.3:1.8 --- src/lib/libbluetooth/bluetooth.3:1.7 Tue Mar 18 18:20:37 2014 +++ src/lib/libbluetooth/bluetooth.3 Sat Nov 28 07:47:30 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: bluetooth.3,v 1.7 2014/03/18 18:20:37 riastradh Exp $ +.\" $NetBSD: bluetooth.3,v 1.8 2015/11/28 07:47:30 plunky Exp $ .\" .\" Copyright (c) 2003 Maksim Yevmenkin.\" All rights reserved. @@ -134,7 +134,7 @@ and .Fn bt_getprotobynumber functions each return a pointer to an object with the .Vt protoent -structure describing a Bluetooth Protocol Service Multiplexor referenced +structure describing a Bluetooth Protocol Service Multiplexer referenced by name or number, respectively. .Pp The @@ -143,13 +143,13 @@ argument passed to .Fn bt_getprotobyname should point to a .Dv NUL Ns -terminated -Bluetooth Protocol Service Multiplexor name. +Bluetooth Protocol Service Multiplexer name. The .Fa proto argument passed to .Fn bt_getprotobynumber should have numeric value of the desired Bluetooth Protocol Service -Multiplexor. +Multiplexer. .Pp The structure returned contains the information obtained from a line in .Pa /etc/bluetooth/protocols
CVS commit: src/usr.sbin/sdpd
Module Name:src Committed By: plunky Date: Tue Nov 24 21:11:39 UTC 2015 Modified Files: src/usr.sbin/sdpd: db.c Log Message: newer versions of the Bluetooth Core specification state that service record number values of 0x0001->0x are reserved, so comply with that here. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sdpd/db.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sdpd/db.c diff -u src/usr.sbin/sdpd/db.c:1.1 src/usr.sbin/sdpd/db.c:1.2 --- src/usr.sbin/sdpd/db.c:1.1 Tue May 12 10:05:06 2009 +++ src/usr.sbin/sdpd/db.c Tue Nov 24 21:11:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: db.c,v 1.1 2009/05/12 10:05:06 plunky Exp $ */ +/* $NetBSD: db.c,v 1.2 2015/11/24 21:11:39 plunky Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: db.c,v 1.1 2009/05/12 10:05:06 plunky Exp $"); +__RCSID("$NetBSD: db.c,v 1.2 2015/11/24 21:11:39 plunky Exp $"); #include #include @@ -96,8 +96,8 @@ static uint8_t sds_data[] = { /* BrowseGroupDescriptor service record */ static uint8_t bgd_data[] = { 0x09, 0x00, 0x00, // uint16 ServiceRecordHandle - 0x0a, 0x00, 0x00, 0x00, // uint32 0x0001 - 0x01, + 0x0a, 0x00, 0x01, 0x00, // uint32 0x0001 + 0x00, 0x09, 0x00, 0x01, // uint16 ServiceClassIDList 0x35, 0x03, // seq8(3) @@ -130,11 +130,11 @@ db_init(server_t *srv) sdp_data_t d; LIST_INIT(>rlist); - srv->handle = 0; + srv->handle = 0x0001; /* values 0x0001->0x are reserved */ d.next = sds_data; d.end = sds_data + sizeof(sds_data); - if (!db_create(srv, -1, BDADDR_ANY, srv->handle++, )) + if (!db_create(srv, -1, BDADDR_ANY, 0x, )) return false; d.next = bgd_data;
CVS commit: src/share/man/man4
Module Name:src Committed By: plunky Date: Sun Nov 15 19:44:31 UTC 2015 Modified Files: src/share/man/man4: iwm.4 Log Message: Antti is Kantee To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/iwm.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/iwm.4 diff -u src/share/man/man4/iwm.4:1.2 src/share/man/man4/iwm.4:1.3 --- src/share/man/man4/iwm.4:1.2 Tue Mar 3 09:59:20 2015 +++ src/share/man/man4/iwm.4 Sun Nov 15 19:44:31 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: iwm.4,v 1.2 2015/03/03 09:59:20 nonaka Exp $ +.\" $NetBSD: iwm.4,v 1.3 2015/11/15 19:44:31 plunky Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -67,4 +67,4 @@ For more information on configuring this The .Nm driver was written by -.An Antti Kantte Aq Mt po...@netbsd.org . +.An Antti Kantee Aq Mt po...@netbsd.org .
CVS commit: src/share/man/man5
Module Name:src Committed By: plunky Date: Fri Oct 9 19:49:25 UTC 2015 Modified Files: src/share/man/man5: rc.conf.5 Log Message: attaching controllers to serial ports is configured using btattach.conf and not btdevctl.conf, so say that To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/share/man/man5/rc.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man5/rc.conf.5 diff -u src/share/man/man5/rc.conf.5:1.161 src/share/man/man5/rc.conf.5:1.162 --- src/share/man/man5/rc.conf.5:1.161 Thu Jul 9 11:38:05 2015 +++ src/share/man/man5/rc.conf.5 Fri Oct 9 19:49:25 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: rc.conf.5,v 1.161 2015/07/09 11:38:05 wiz Exp $ +.\" $NetBSD: rc.conf.5,v 1.162 2015/10/09 19:49:25 plunky Exp $ .\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. @@ -1399,7 +1399,7 @@ Configure Bluetooth support, comprising .Bl -dash -compact .It attach serial Bluetooth controllers as listed in the -.Pa /etc/bluetooth/btdevctl.conf +.Pa /etc/bluetooth/btattach.conf configuration file. .It enable Bluetooth controllers with useful defaults, plus
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: plunky Date: Tue Sep 8 18:33:12 UTC 2015 Modified Files: src/usr.sbin/syslogd: syslogd.h Log Message: according to C99 6.5.15 in a conditional expression, both operands should be of compatible types. So, use ((void)0) here to match `void dbprintf()' To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/syslogd/syslogd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/syslogd/syslogd.h diff -u src/usr.sbin/syslogd/syslogd.h:1.6 src/usr.sbin/syslogd/syslogd.h:1.7 --- src/usr.sbin/syslogd/syslogd.h:1.6 Sun Feb 15 14:51:57 2015 +++ src/usr.sbin/syslogd/syslogd.h Tue Sep 8 18:33:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.h,v 1.6 2015/02/15 14:51:57 joerg Exp $ */ +/* $NetBSD: syslogd.h,v 1.7 2015/09/08 18:33:12 plunky Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -154,7 +154,7 @@ char *strndup(const char *str, size_t n) void dbprintf(const char *, const char *, size_t, const char *, ...) __printflike(4, 5); #define DPRINTF(x, ...) /*LINTED null effect */(void)(Debug & (x) \ -? dbprintf(__FILE__, __func__, __LINE__, __VA_ARGS__) : 0) +? dbprintf(__FILE__, __func__, __LINE__, __VA_ARGS__) : ((void)0)) #endif /* shortcuts for libevent */
CVS commit: src/include/ssp
Module Name:src Committed By: plunky Date: Thu Sep 3 20:43:47 UTC 2015 Modified Files: src/include/ssp: ssp.h Log Message: correct __ssp_overlap() to not trigger for adjacent areas To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/include/ssp/ssp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/ssp/ssp.h diff -u src/include/ssp/ssp.h:1.12 src/include/ssp/ssp.h:1.13 --- src/include/ssp/ssp.h:1.12 Thu Jun 25 18:41:03 2015 +++ src/include/ssp/ssp.h Thu Sep 3 20:43:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ssp.h,v 1.12 2015/06/25 18:41:03 joerg Exp $ */ +/* $NetBSD: ssp.h,v 1.13 2015/09/03 20:43:47 plunky Exp $ */ /*- * Copyright (c) 2006, 2011 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ __ssp_inline rtype fun args { \ __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0) #define __ssp_overlap(a, b, l) \ -(((a) <= (b) && (b) <= (a) + (l)) || ((b) <= (a) && (a) <= (b) + (l))) +(((a) <= (b) && (b) < (a) + (l)) || ((b) <= (a) && (a) < (b) + (l))) __BEGIN_DECLS void __stack_chk_fail(void) __dead;
CVS commit: src/usr.sbin/btdevctl
Module Name:src Committed By: plunky Date: Fri Jun 12 09:43:05 UTC 2015 Modified Files: src/usr.sbin/btdevctl: btdevctl.8 Log Message: the Bluetooth rc.d setup was simplified some time ago, so 'btdevctl' variable is no longer used. change wording to reflect this To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/btdevctl/btdevctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btdevctl/btdevctl.8 diff -u src/usr.sbin/btdevctl/btdevctl.8:1.11 src/usr.sbin/btdevctl/btdevctl.8:1.12 --- src/usr.sbin/btdevctl/btdevctl.8:1.11 Tue Mar 18 18:20:46 2014 +++ src/usr.sbin/btdevctl/btdevctl.8 Fri Jun 12 09:43:05 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: btdevctl.8,v 1.11 2014/03/18 18:20:46 riastradh Exp $ +.\ $NetBSD: btdevctl.8,v 1.12 2015/06/12 09:43:05 plunky Exp $ .\ .\ Copyright (c) 2006 Itronix Inc. .\ All rights reserved. @@ -143,12 +143,11 @@ Be verbose. .Pp For device configurations to persist across boots, add entries to the .Pa /etc/bluetooth/btdevctl.conf -file and -set the +file and ensure the .Xr rc.conf 5 variable -.Sy btdevctl -to YES. +.Sy bluetooth +is set to YES. .Sh FILES .Bl -tag -compact .It Pa /etc/bluetooth/btdevctl.conf
CVS commit: src/usr.bin/man
Module Name:src Committed By: plunky Date: Tue Apr 7 10:17:21 UTC 2015 Modified Files: src/usr.bin/man: man.conf.5 Log Message: change _whatdb = _mandb as that is the correct keyword here, and move it to the correct position in the list. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.bin/man/man.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/man/man.conf.5 diff -u src/usr.bin/man/man.conf.5:1.25 src/usr.bin/man/man.conf.5:1.26 --- src/usr.bin/man/man.conf.5:1.25 Tue Mar 3 17:59:32 2015 +++ src/usr.bin/man/man.conf.5 Tue Apr 7 10:17:21 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: man.conf.5,v 1.25 2015/03/03 17:59:32 christos Exp $ +.\ $NetBSD: man.conf.5,v 1.26 2015/04/07 10:17:21 plunky Exp $ .\ .\ Copyright (c) 1989, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -116,6 +116,20 @@ in the shell command line, and it will be replaced by the name of the output file. .It _default Contains the system-wide default man path used to search for man pages. +.It _mandb +Defines the full pathname (not just a directory path) for a database to +be used +by the +.Xr apropos 1 +and +.Xr whatis 1 +commands. +The pathname may contain the normal shell globbing characters, +including curly braces +.Pq Dq {} ; +to escape a shell globbing character, +precede it with a backslash +.Pq Dq \e . .It _subdir Contains the list (in search order) of section subdirectories which will be searched in any man path directory named with a trailing slash @@ -142,20 +156,6 @@ including curly braces .Pq Dq {} ) . .It _version Contains the version of the configuration file. -.It _whatdb -Defines the full pathname (not just a directory path) for a database to -be used -by the -.Xr apropos 1 -and -.Xr whatis 1 -commands. -The pathname may contain the normal shell globbing characters, -including curly braces -.Pq Dq {} ; -to escape a shell globbing character, -precede it with a backslash -.Pq Dq \e . .It _ Ns Aq machine Defines additional paths to be searched for the particular .Dv machine
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: plunky Date: Tue Apr 7 17:47:10 UTC 2015 Modified Files: src/usr.sbin/makemandb: makemandb.c Log Message: largely apply patch from PR bin/47392 by Abhinav Upadhyay change some comments to reflect reality, a variable name to enhance readability, and adds an assert for safety. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/makemandb/makemandb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/makemandb.c diff -u src/usr.sbin/makemandb/makemandb.c:1.28 src/usr.sbin/makemandb/makemandb.c:1.29 --- src/usr.sbin/makemandb/makemandb.c:1.28 Thu Mar 12 14:57:18 2015 +++ src/usr.sbin/makemandb/makemandb.c Tue Apr 7 17:47:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: makemandb.c,v 1.28 2015/03/12 14:57:18 joerg Exp $ */ +/* $NetBSD: makemandb.c,v 1.29 2015/04/07 17:47:10 plunky Exp $ */ /* * Copyright (c) 2011 Abhinav Upadhyay er.abhinav.upadh...@gmail.com * Copyright (c) 2011 Kristaps Dzonsons krist...@bsd.lv @@ -17,7 +17,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: makemandb.c,v 1.28 2015/03/12 14:57:18 joerg Exp $); +__RCSID($NetBSD: makemandb.c,v 1.29 2015/04/07 17:47:10 plunky Exp $); #include sys/stat.h #include sys/types.h @@ -75,7 +75,7 @@ typedef struct mandb_rec { secbuff errors; // ERRORS char section[2]; - int xr_found; + int xr_found; // To track whether a .Xr was seen when parsing a section /* Fields for mandb_meta table */ char *md5_hash; @@ -973,12 +973,8 @@ pmdoc_Nm(const struct mdoc_node *n, mand static void pmdoc_Nd(const struct mdoc_node *n, mandb_rec *rec) { - /* - * A static variable for keeping track of whether a Xr macro was seen - * previously. - */ char *buf = NULL; - char *temp; + char *name; char *nd_text; if (n == NULL || (n-type != MDOC_TEXT n-tok == MDOC_MAX)) @@ -988,11 +984,12 @@ pmdoc_Nd(const struct mdoc_node *n, mand if (rec-xr_found n-next) { /* * An Xr macro was seen previously, so parse this - * and the next node. + * and the next node, as Name(Section). */ - temp = n-string; + name = n-string; n = n-next; - easprintf(buf, %s(%s), temp, n-string); + assert(n-type == MDOC_TEXT); + easprintf(buf, %s(%s), name, n-string); concat(rec-name_desc, buf); free(buf); } else {
CVS commit: src/usr.sbin/sdpd
Module Name:src Committed By: plunky Date: Tue Mar 31 09:25:41 UTC 2015 Modified Files: src/usr.sbin/sdpd: service.c Log Message: fix typo: sparce-sparse To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sdpd/service.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sdpd/service.c diff -u src/usr.sbin/sdpd/service.c:1.2 src/usr.sbin/sdpd/service.c:1.3 --- src/usr.sbin/sdpd/service.c:1.2 Sun Mar 7 10:58:40 2010 +++ src/usr.sbin/sdpd/service.c Tue Mar 31 09:25:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: service.c,v 1.2 2010/03/07 10:58:40 plunky Exp $ */ +/* $NetBSD: service.c,v 1.3 2015/03/31 09:25:41 plunky Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: service.c,v 1.2 2010/03/07 10:58:40 plunky Exp $); +__RCSID($NetBSD: service.c,v 1.3 2015/03/31 09:25:41 plunky Exp $); #include bluetooth.h #include sdp.h @@ -234,7 +234,7 @@ service_attribute_request(server_t *srv, /* * Match the selected record against AttributeIDList, writing - * the data to the sparce buffer. + * the data to the sparse buffer. */ r = NULL; db_next(srv, fd, r);
CVS commit: src/lib/libbluetooth
Module Name:src Committed By: plunky Date: Tue Mar 31 09:26:45 UTC 2015 Modified Files: src/lib/libbluetooth: sdp_data.3 Log Message: fix typo: sdp_seq_seq-sdp_set_seq To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libbluetooth/sdp_data.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libbluetooth/sdp_data.3 diff -u src/lib/libbluetooth/sdp_data.3:1.8 src/lib/libbluetooth/sdp_data.3:1.9 --- src/lib/libbluetooth/sdp_data.3:1.8 Thu Mar 15 19:04:46 2012 +++ src/lib/libbluetooth/sdp_data.3 Tue Mar 31 09:26:45 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: sdp_data.3,v 1.8 2012/03/15 19:04:46 njoly Exp $ +.\ $NetBSD: sdp_data.3,v 1.9 2015/03/31 09:26:45 plunky Exp $ .\ .\ Copyright (c) 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -375,7 +375,7 @@ But, because the value of is unknown, the overall length of the ProtocolDataList may vary depending if 8, 16 or 32 bits were needed to represent the original buffer size. -.Fn sdp_seq_seq +.Fn sdp_set_seq will only modify the content, not the size of the header. .Sh SEE ALSO .Xr sdpquery 1 ,
CVS commit: src/usr.bin/sdpquery
Module Name:src Committed By: plunky Date: Mon Mar 16 19:10:48 UTC 2015 Modified Files: src/usr.bin/sdpquery: print.c Log Message: parse and print the HIDLANGIDBaseList attribute To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/sdpquery/print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/sdpquery/print.c diff -u src/usr.bin/sdpquery/print.c:1.20 src/usr.bin/sdpquery/print.c:1.21 --- src/usr.bin/sdpquery/print.c:1.20 Fri Oct 18 20:47:06 2013 +++ src/usr.bin/sdpquery/print.c Mon Mar 16 19:10:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.20 2013/10/18 20:47:06 christos Exp $ */ +/* $NetBSD: print.c,v 1.21 2015/03/16 19:10:48 plunky Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: print.c,v 1.20 2013/10/18 20:47:06 christos Exp $); +__RCSID($NetBSD: print.c,v 1.21 2015/03/16 19:10:48 plunky Exp $); #include ctype.h #include iconv.h @@ -106,6 +106,7 @@ static void print_supported_formats(sdp_ static void print_hid_version(sdp_data_t *); static void print_hid_device_subclass(sdp_data_t *); static void print_hid_descriptor_list(sdp_data_t *); +static void print_hid_langid_base_list(sdp_data_t *); static void print_security_description(sdp_data_t *); static void print_hf_features(sdp_data_t *); static void print_hfag_network(sdp_data_t *); @@ -297,7 +298,7 @@ attr_t hid_attrs[] = { /* Human Interfac { 0x0204, HIDVirtualCable, print_bool }, { 0x0205, HIDReconnectInitiate, print_bool }, { 0x0206, HIDDescriptorList, print_hid_descriptor_list }, - { 0x0207, HIDLANGIDBaseList, NULL }, + { 0x0207, HIDLANGIDBaseList, print_hid_langid_base_list }, { 0x0208, HIDSDPDisable, print_bool }, { 0x0209, HIDBatteryPower, print_bool }, { 0x020a, HIDRemoteWake, print_bool }, @@ -1275,7 +1276,6 @@ print_hid_descriptor_list(sdp_data_t *da char *str; size_t len; - if (!sdp_get_seq(data, list)) return; @@ -1301,6 +1301,38 @@ print_hid_descriptor_list(sdp_data_t *da } static void +print_hid_langid_base_list(sdp_data_t *data) +{ + sdp_data_t list, seq; + uint16_t lang, base; + + if (!sdp_get_seq(data, list)) + return; + + while (list.next list.end) { + if (!sdp_get_seq(list, seq) + || !sdp_get_uint16(seq, lang) + || !sdp_get_uint16(seq, base)) + return; + + printf(\n); + /* + * The language is encoded according to the + * Universal Serial Bus Language Identifiers (LANGIDs) + * specification. It does not seem worth listing them all + * here, but feel free to add if you notice any being used. + */ + switch (lang) { + case 0x0409: printf(English (US)); break; + case 0x0809: printf(English (UK)); break; + default: printf(0x%04x, lang); break; + } + + printf( base 0x%04x\n, base); + } +} + +static void print_security_description(sdp_data_t *data) { uint16_t v;
CVS commit: src/share/misc
Module Name:src Committed By: plunky Date: Thu Jan 29 06:53:28 UTC 2015 Modified Files: src/share/misc: acronyms.comp Log Message: IOT To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.145 src/share/misc/acronyms.comp:1.146 --- src/share/misc/acronyms.comp:1.145 Fri Dec 12 23:48:45 2014 +++ src/share/misc/acronyms.comp Thu Jan 29 06:53:28 2015 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.145 2014/12/12 23:48:45 riz Exp $ +$NetBSD: acronyms.comp,v 1.146 2015/01/29 06:53:28 plunky Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -576,6 +576,7 @@ INCITS InterNational Committee for Infor IO input/output IOCTL input/output control IOMMU input/output memory management unit +IOT Internet of Things IP Internet Protocol IP intellectual property IPC interprocess communication
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Sun Nov 16 21:34:27 UTC 2014 Modified Files: src/sys/netbt: rfcomm_upper.c Log Message: since rfcomm_attach_pcb may be called from (soft) interrupt context (for incoming connections), use kmem_intr_() To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/netbt/rfcomm_upper.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/rfcomm_upper.c diff -u src/sys/netbt/rfcomm_upper.c:1.21 src/sys/netbt/rfcomm_upper.c:1.22 --- src/sys/netbt/rfcomm_upper.c:1.21 Fri Aug 8 03:05:45 2014 +++ src/sys/netbt/rfcomm_upper.c Sun Nov 16 21:34:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_upper.c,v 1.21 2014/08/08 03:05:45 rtr Exp $ */ +/* $NetBSD: rfcomm_upper.c,v 1.22 2014/11/16 21:34:27 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rfcomm_upper.c,v 1.21 2014/08/08 03:05:45 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: rfcomm_upper.c,v 1.22 2014/11/16 21:34:27 plunky Exp $); #include sys/param.h #include sys/kernel.h @@ -70,7 +70,9 @@ rfcomm_attach_pcb(struct rfcomm_dlc **ha KASSERT(proto != NULL); KASSERT(upper != NULL); - dlc = kmem_zalloc(sizeof(struct rfcomm_dlc), KM_SLEEP); + dlc = kmem_intr_zalloc(sizeof(struct rfcomm_dlc), KM_NOSLEEP); + if (dlc == NULL) + return ENOMEM; dlc-rd_state = RFCOMM_DLC_CLOSED; dlc-rd_mtu = rfcomm_mtu_default; @@ -296,7 +298,7 @@ rfcomm_detach_pcb(struct rfcomm_dlc **ha dlc-rd_flags |= RFCOMM_DLC_DETACH; else { callout_destroy(dlc-rd_timeout); - kmem_free(dlc, sizeof(*dlc)); + kmem_intr_free(dlc, sizeof(*dlc)); } }
CVS commit: src
Module Name:src Committed By: plunky Date: Mon Aug 18 07:52:40 UTC 2014 Modified Files: src: Makefile Log Message: remove obsolete BUILD_CC_LIB_BASEDIR and BUILD_CC_LIB_BASETARGET vars To generate a diff of this commit: cvs rdiff -u -r1.309 -r1.310 src/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/Makefile diff -u src/Makefile:1.309 src/Makefile:1.310 --- src/Makefile:1.309 Mon Jun 16 09:06:26 2014 +++ src/Makefile Mon Aug 18 07:52:40 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.309 2014/06/16 09:06:26 apb Exp $ +# $NetBSD: Makefile,v 1.310 2014/08/18 07:52:40 plunky Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -205,11 +205,6 @@ postinstall-fix-obsolete_stand: .NOTMAIN # # Targets (in order!) called by make build. # -.if defined(HAVE_GCC) -BUILD_CC_LIB_BASEDIR= external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib -BUILD_CC_LIB_BASETARGET= external-gpl3-gcc-lib -.endif - BUILDTARGETS+= check-tools .if ${MKUPDATE} == no !defined(NOCLEANDIR) BUILDTARGETS+= cleandir
CVS commit: src/external/bsd/pcc/dist/pcc/arch/amd64
Module Name:src Committed By: plunky Date: Wed Aug 13 13:18:08 UTC 2014 Modified Files: src/external/bsd/pcc/dist/pcc/arch/amd64: code.c Log Message: remove unused variable, as reported by Brad Harder To generate a diff of this commit: cvs rdiff -u -r1.1.1.5 -r1.2 src/external/bsd/pcc/dist/pcc/arch/amd64/code.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/pcc/dist/pcc/arch/amd64/code.c diff -u src/external/bsd/pcc/dist/pcc/arch/amd64/code.c:1.1.1.5 src/external/bsd/pcc/dist/pcc/arch/amd64/code.c:1.2 --- src/external/bsd/pcc/dist/pcc/arch/amd64/code.c:1.1.1.5 Thu Jul 24 19:15:26 2014 +++ src/external/bsd/pcc/dist/pcc/arch/amd64/code.c Wed Aug 13 13:18:08 2014 @@ -1,5 +1,5 @@ /* Id: code.c,v 1.74 2014/07/03 14:03:50 ragge Exp */ -/* $NetBSD: code.c,v 1.1.1.5 2014/07/24 19:15:26 plunky Exp $ */ +/* $NetBSD: code.c,v 1.2 2014/08/13 13:18:08 plunky Exp $ */ /* * Copyright (c) 2008 Michael Shalayeff * Copyright (c) 2003 Anders Magnusson (ra...@ludd.luth.se). @@ -619,10 +619,9 @@ mkvacall(char *fun, NODE *a, int typ) NODE * amd64_builtin_va_arg(const struct bitable *bt, NODE *a) { - NODE *ap, *r, *dp; + NODE *r, *dp; int typ, sz; - ap = a-n_left; dp = a-n_right; nsse = ngpr = 0;
CVS commit: src/external/bsd/pcc/dist/pcc/cc/ccom
Module Name:src Committed By: plunky Date: Wed Aug 13 13:37:20 UTC 2014 Modified Files: src/external/bsd/pcc/dist/pcc/cc/ccom: cgram.y Log Message: update to r1.377 from upstream, commit message from ragge: Allow for use of restrict in array declarations (as gcc does). Fixes gnu regex compilation as reported by William D. Jones on NetBSD current-users. To generate a diff of this commit: cvs rdiff -u -r1.1.1.7 -r1.2 src/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y diff -u src/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y:1.1.1.7 src/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y:1.2 --- src/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y:1.1.1.7 Thu Jul 24 19:23:21 2014 +++ src/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y Wed Aug 13 13:37:20 2014 @@ -1,5 +1,5 @@ -/* Id: cgram.y,v 1.376 2014/07/02 15:31:41 ragge Exp */ -/* $NetBSD: cgram.y,v 1.1.1.7 2014/07/24 19:23:21 plunky Exp $ */ +/* Id: cgram.y,v 1.377 2014/07/25 09:30:39 ragge Exp */ +/* $NetBSD: cgram.y,v 1.2 2014/08/13 13:37:20 plunky Exp $ */ /* * Copyright (c) 2003 Anders Magnusson (ra...@ludd.luth.se). @@ -355,7 +355,7 @@ declarator: '*' declarator { $$ = bdt tfree($3); /* XXX - handle */ $$ = biop(LB, $1, $4); } - | declarator '[' ']' { $$ = biop(LB, $1, bcon(NOOFFSET)); } + | declarator '[' maybe_r ']' { $$ = biop(LB, $1, bcon(NOOFFSET)); } | declarator '[' '*' ']' { $$ = biop(LB, $1, bcon(NOOFFSET)); } | declarator '(' parameter_type_list ')' { $$ = bdty(CALL, $1, $3); @@ -441,17 +441,17 @@ abstract_declarator: $$-n_left = $3; } | '(' abstract_declarator ')' { $$ = $2; } - | '[' ']' attr_var { + | '[' maybe_r ']' attr_var { $$ = block(LB, bdty(NAME, NULL), bcon(NOOFFSET), - INT, 0, gcc_attr_wrapper($3)); + INT, 0, gcc_attr_wrapper($4)); } | '[' e ']' attr_var { $$ = block(LB, bdty(NAME, NULL), $2, INT, 0, gcc_attr_wrapper($4)); } - | abstract_declarator '[' ']' attr_var { + | abstract_declarator '[' maybe_r ']' attr_var { $$ = block(LB, $1, bcon(NOOFFSET), - INT, 0, gcc_attr_wrapper($4)); + INT, 0, gcc_attr_wrapper($5)); } | abstract_declarator '[' e ']' attr_var { $$ = block(LB, $1, $3, INT, 0, gcc_attr_wrapper($5)); @@ -472,8 +472,13 @@ abstract_declarator: } ; -ib2: { } +ib2: { } + ; + +maybe_r: { } + | C_QUALIFIER { nfree($1); } ; + /* * KR arg declaration, between ) and { */
CVS commit: src/sys/netipsec
Module Name:src Committed By: plunky Date: Wed Aug 13 19:43:47 UTC 2014 Modified Files: src/sys/netipsec: ipsec.c Log Message: C99 6.5.15 Conditional operator note 3 states that the second and third operators of a ?: operation shoud (amongst other conditions) either both be integer type, or both void type. cast the second to (void) then, as log() is already a void and no result is desired. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/netipsec/ipsec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.63 src/sys/netipsec/ipsec.c:1.64 --- src/sys/netipsec/ipsec.c:1.63 Fri May 30 01:39:03 2014 +++ src/sys/netipsec/ipsec.c Wed Aug 13 19:43:47 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.63 2014/05/30 01:39:03 christos Exp $ */ +/* $NetBSD: ipsec.c,v 1.64 2014/08/13 19:43:47 plunky Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ipsec.c,v 1.63 2014/05/30 01:39:03 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: ipsec.c,v 1.64 2014/08/13 19:43:47 plunky Exp $); /* * IPsec controller part. @@ -1748,7 +1748,7 @@ ipsec_get_reqlevel(const struct ipsecreq (((lev) != IPSEC_LEVEL_USE (lev) != IPSEC_LEVEL_REQUIRE \ (lev) != IPSEC_LEVEL_UNIQUE) ? \ (ipsec_debug ? log(LOG_INFO, fixed system default level #lev \ - :%d-%d\n, (lev), IPSEC_LEVEL_REQUIRE) : 0), \ + :%d-%d\n, (lev), IPSEC_LEVEL_REQUIRE) : (void)0), \ (lev) = IPSEC_LEVEL_REQUIRE, (lev)\ : (lev))
CVS import: src/external/bsd/pcc/dist
Module Name:src Committed By: plunky Date: Thu Jul 24 19:29:38 UTC 2014 Update of /cvsroot/src/external/bsd/pcc/dist In directory ivanova.netbsd.org:/tmp/cvs-serv23983 Log Message: Import latest PCC snapshot 20140706; it has been over two years since the last import, and some build framework has been changed so this makes it easier for people to work with later versions. The full list of changes in the meantime are available at the PCC CVS server, and the bugs fixed are detailed at the PCC bug tracker, but in summary, new features added are a C++ front end, m68k support and unicode support. and bugs fixed in the areas of the register allocator, floating point, attributes, long long arithmetic, PIC support and code sections (for shared libraries) among others. This version compiles the vast majority of the NetBSD sources on i386, and bug reports are welcome at the PCC JIRA server. Status: Vendor Tag: ragge Release Tags: pcc-20140706 U src/external/bsd/pcc/dist/pcc/DATESTAMP U src/external/bsd/pcc/dist/pcc/Makefile.in U src/external/bsd/pcc/dist/pcc/config.guess U src/external/bsd/pcc/dist/pcc/config.h.in U src/external/bsd/pcc/dist/pcc/config.sub U src/external/bsd/pcc/dist/pcc/configure C src/external/bsd/pcc/dist/pcc/configure.ac U src/external/bsd/pcc/dist/pcc/install-sh C src/external/bsd/pcc/dist/pcc/arch/amd64/local.c U src/external/bsd/pcc/dist/pcc/arch/amd64/code.c C src/external/bsd/pcc/dist/pcc/arch/amd64/local2.c U src/external/bsd/pcc/dist/pcc/arch/amd64/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/amd64/order.c U src/external/bsd/pcc/dist/pcc/arch/amd64/table.c U src/external/bsd/pcc/dist/pcc/arch/arm/local.c U src/external/bsd/pcc/dist/pcc/arch/arm/code.c U src/external/bsd/pcc/dist/pcc/arch/arm/local2.c U src/external/bsd/pcc/dist/pcc/arch/arm/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/arm/order.c U src/external/bsd/pcc/dist/pcc/arch/arm/table.c U src/external/bsd/pcc/dist/pcc/arch/hppa/local.c U src/external/bsd/pcc/dist/pcc/arch/hppa/code.c U src/external/bsd/pcc/dist/pcc/arch/hppa/local2.c U src/external/bsd/pcc/dist/pcc/arch/hppa/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/hppa/order.c U src/external/bsd/pcc/dist/pcc/arch/hppa/table.c U src/external/bsd/pcc/dist/pcc/arch/i386/flocal.c U src/external/bsd/pcc/dist/pcc/arch/i386/code.c U src/external/bsd/pcc/dist/pcc/arch/i386/local.c U src/external/bsd/pcc/dist/pcc/arch/i386/local2.c U src/external/bsd/pcc/dist/pcc/arch/i386/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/i386/order.c U src/external/bsd/pcc/dist/pcc/arch/i386/table.c U src/external/bsd/pcc/dist/pcc/arch/m16c/local.c U src/external/bsd/pcc/dist/pcc/arch/m16c/TODO U src/external/bsd/pcc/dist/pcc/arch/m16c/code.c U src/external/bsd/pcc/dist/pcc/arch/m16c/local2.c U src/external/bsd/pcc/dist/pcc/arch/m16c/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/m16c/order.c U src/external/bsd/pcc/dist/pcc/arch/m16c/table.c U src/external/bsd/pcc/dist/pcc/arch/mips/local.c U src/external/bsd/pcc/dist/pcc/arch/mips/TODO U src/external/bsd/pcc/dist/pcc/arch/mips/code.c U src/external/bsd/pcc/dist/pcc/arch/mips/local2.c U src/external/bsd/pcc/dist/pcc/arch/mips/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/mips/order.c U src/external/bsd/pcc/dist/pcc/arch/mips/table.c U src/external/bsd/pcc/dist/pcc/arch/nova/local.c U src/external/bsd/pcc/dist/pcc/arch/nova/README U src/external/bsd/pcc/dist/pcc/arch/nova/code.c U src/external/bsd/pcc/dist/pcc/arch/nova/local2.c U src/external/bsd/pcc/dist/pcc/arch/nova/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/nova/order.c U src/external/bsd/pcc/dist/pcc/arch/nova/table.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/local.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/README U src/external/bsd/pcc/dist/pcc/arch/pdp10/code.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/local2.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/pdp10/order.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/table.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/local.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/code.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/local2.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/pdp11/order.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/table.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/local.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/README U src/external/bsd/pcc/dist/pcc/arch/powerpc/code.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/local2.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/powerpc/order.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/table.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/local.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/code.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/local2.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/sparc64/order.c U
CVS commit: src/external/bsd/pcc
Module Name:src Committed By: plunky Date: Thu Jul 24 20:20:49 UTC 2014 Modified Files: src/external/bsd/pcc: Makefile.inc src/external/bsd/pcc/include: config.h src/external/bsd/pcc/libexec: Makefile src/external/bsd/pcc/libexec/ccom: Makefile src/external/bsd/pcc/libexec/cpp: Makefile src/external/bsd/pcc/usr.bin/pcc: Makefile Added Files: src/external/bsd/pcc/libexec/cxxcom: Makefile Log Message: update build framework for import of pcc-20140706 To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/bsd/pcc/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pcc/include/config.h cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pcc/libexec/Makefile cvs rdiff -u -r1.12 -r1.13 src/external/bsd/pcc/libexec/ccom/Makefile cvs rdiff -u -r1.9 -r1.10 src/external/bsd/pcc/libexec/cpp/Makefile cvs rdiff -u -r0 -r1.1 src/external/bsd/pcc/libexec/cxxcom/Makefile cvs rdiff -u -r1.8 -r1.9 src/external/bsd/pcc/usr.bin/pcc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/pcc/Makefile.inc diff -u src/external/bsd/pcc/Makefile.inc:1.17 src/external/bsd/pcc/Makefile.inc:1.18 --- src/external/bsd/pcc/Makefile.inc:1.17 Mon Mar 26 14:31:12 2012 +++ src/external/bsd/pcc/Makefile.inc Thu Jul 24 20:20:48 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.17 2012/03/26 14:31:12 plunky Exp $ +# $NetBSD: Makefile.inc,v 1.18 2014/07/24 20:20:48 plunky Exp $ PCC_DIR:=${.PARSEDIR} PCC_DIST=${PCC_DIR}/dist/pcc @@ -6,7 +6,7 @@ PCC_LIBS=${PCC_DIR}/dist/pcc-libs # (these strings will be updated by the prepare-import.sh script) PCC_VERSION=1.1.0.DEVEL -PCC_DATESTAMP=20120325 +PCC_DATESTAMP=20140706 TARGOS = netbsd Index: src/external/bsd/pcc/include/config.h diff -u src/external/bsd/pcc/include/config.h:1.6 src/external/bsd/pcc/include/config.h:1.7 --- src/external/bsd/pcc/include/config.h:1.6 Mon Mar 26 14:31:12 2012 +++ src/external/bsd/pcc/include/config.h Thu Jul 24 20:20:49 2014 @@ -20,10 +20,7 @@ /* #undef ECOFFABI */ /* Using ELF ABI */ -#define ELFABI - -/* Enable STABS debugging output */ -#define STABS 1 +#define ELFABI 1 /* Define to 1 if you have the `basename' function. */ #define HAVE_BASENAME 1 @@ -31,9 +28,6 @@ /* Define to 1 if printf supports C99 size specifiers */ #define HAVE_C99_FORMAT 1 -/* Define to 1 if your compiler supports C99 variadic macros */ -#define HAVE_CPP_VARARG_MACRO_GCC 1 - /* Define to 1 if you have the `ffs' function. */ #define HAVE_FFS 1 @@ -101,10 +95,7 @@ /* #undef HOST_BIG_ENDIAN */ /* Define if host is LITTLE endian */ -/* #define HOST_LITTLE_ENDIAN */ - -/* lex is flex */ -#define ISFLEX 1 +/* #define HOST_LITTLE_ENDIAN 1 */ /* Define alternate standard lib directory */ /* #undef LIBDIR */ @@ -145,6 +136,9 @@ /* Define path to alternate preprocessor */ #define PREPROCESSOR pcpp +/* Enable STABS debugging output */ +#define STABS 1 + /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -161,7 +155,7 @@ #define TLS 1 /* Version string */ -/* #define VERSSTR pcc 1.1.0.DEVEL 20120325 for i386-unknown-netbsdelf6.99.3 */ +/* #define VERSSTR pcc 1.1.0.DEVEL 20140706 for i386-unknown-netbsdelf6.99.40 */ /* Size of wide-character type in chars */ #define WCHAR_SIZE 4 Index: src/external/bsd/pcc/libexec/Makefile diff -u src/external/bsd/pcc/libexec/Makefile:1.6 src/external/bsd/pcc/libexec/Makefile:1.7 --- src/external/bsd/pcc/libexec/Makefile:1.6 Fri May 20 16:02:23 2011 +++ src/external/bsd/pcc/libexec/Makefile Thu Jul 24 20:20:49 2014 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.6 2011/05/20 16:02:23 plunky Exp $ +# $NetBSD: Makefile,v 1.7 2014/07/24 20:20:49 plunky Exp $ .include bsd.own.mk -SUBDIR= mkext .WAIT ccom cpp +SUBDIR= mkext .WAIT ccom cpp cxxcom .include bsd.subdir.mk Index: src/external/bsd/pcc/libexec/ccom/Makefile diff -u src/external/bsd/pcc/libexec/ccom/Makefile:1.12 src/external/bsd/pcc/libexec/ccom/Makefile:1.13 --- src/external/bsd/pcc/libexec/ccom/Makefile:1.12 Fri Mar 14 00:06:52 2014 +++ src/external/bsd/pcc/libexec/ccom/Makefile Thu Jul 24 20:20:49 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2014/03/14 00:06:52 christos Exp $ +# $NetBSD: Makefile,v 1.13 2014/07/24 20:20:49 plunky Exp $ WARNS?= 2 @@ -15,7 +15,7 @@ SRCS+= scan.l SRCS+= optim.c pftn.c trees.c inline.c symtabs.c SRCS+= gcc_compat.c init.c local.c code.c stabs.c builtins.c SRCS+= match.c reader.c optim2.c regs.c local2.c order.c table.c -SRCS+= common.c main.c external.c +SRCS+= common.c main.c external.c unicode.c MAN=ccom.1 @@ -28,7 +28,7 @@ CPPFLAGS+= -I${PCC_DIST}/os/${TARGOS} CPPFLAGS+= -I${PCC_DIST}/arch/${TARGMACH} CPPFLAGS+= -I${PCC_DIST}/cc/ccom -COPTS.pftn.c+= -Wno-uninitialized +COPTS.pftn.c+= ${${ACTIVE_CC} == gcc :? -Wno-uninitialized :} DPSRCS= external.c Index:
CVS commit: src/share/mk
Module Name:src Committed By: plunky Date: Thu Jul 24 20:29:19 UTC 2014 Modified Files: src/share/mk: bsd.own.mk Log Message: add p++ tool, for PCC To generate a diff of this commit: cvs rdiff -u -r1.823 -r1.824 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.823 src/share/mk/bsd.own.mk:1.824 --- src/share/mk/bsd.own.mk:1.823 Tue Jul 15 13:27:04 2014 +++ src/share/mk/bsd.own.mk Thu Jul 24 20:29:19 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.823 2014/07/15 13:27:04 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.824 2014/07/24 20:29:19 plunky Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -262,6 +262,7 @@ TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHIN # PCC supports C and Fortran TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc TOOL_CPP.pcc= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp +TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++ # # Make sure DESTDIR is set, so that builds with these tools always @@ -398,6 +399,7 @@ TOOL_OBJC.gcc= gcc # PCC supports C and Fortran TOOL_CC.pcc= pcc TOOL_CPP.pcc= /usr/libexec/pcpp +TOOL_CXX.pcc= p++ TOOL_AMIGAAOUT2BB= amiga-aout2bb TOOL_AMIGAELF2BB= amiga-elf2bb
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: plunky Date: Thu Jul 24 20:31:01 UTC 2014 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi Log Message: add PCC libexec/cxxcom To generate a diff of this commit: cvs rdiff -u -r1.1900 -r1.1901 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.73 -r1.74 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1900 src/distrib/sets/lists/comp/mi:1.1901 --- src/distrib/sets/lists/comp/mi:1.1900 Tue Jul 22 22:35:03 2014 +++ src/distrib/sets/lists/comp/mi Thu Jul 24 20:31:01 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1900 2014/07/22 22:35:03 christos Exp $ +# $NetBSD: mi,v 1.1901 2014/07/24 20:31:01 plunky Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -4087,6 +4087,7 @@ ./usr/libexec/ccomcomp-c-bin pcc ./usr/libexec/collect2comp-obsolete obsolete ./usr/libexec/cppcomp-obsolete pcc,obsolete +./usr/libexec/cxxcomcomp-c-bin pcc ./usr/libexec/f771comp-fortran-bin gcc=3,gcccmds ./usr/libexec/f771comp-obsolete gcc=4,obsolete ./usr/libexec/lint1comp-c-bin Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.73 src/distrib/sets/lists/debug/mi:1.74 --- src/distrib/sets/lists/debug/mi:1.73 Fri Jul 18 12:36:18 2014 +++ src/distrib/sets/lists/debug/mi Thu Jul 24 20:31:01 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.73 2014/07/18 12:36:18 christos Exp $ +# $NetBSD: mi,v 1.74 2014/07/24 20:31:01 plunky Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib @@ -890,6 +890,7 @@ ./usr/libdata/debug/usr/libexec/ching/printching.debug comp-games-debug debug ./usr/libdata/debug/usr/libexec/comsat.debug comp-mail-debug debug ./usr/libdata/debug/usr/libexec/cpp.debug comp-obsolete pcc,obsolete +./usr/libdata/debug/usr/libexec/cxxcom.debug comp-c-debug pcc,debug ./usr/libdata/debug/usr/libexec/digest-service.debug comp-krb5-debug kerberos,debug ./usr/libdata/debug/usr/libexec/f771.debug comp-fortran-debug gcc=3,gcccmds,debug ./usr/libdata/debug/usr/libexec/f771.debug comp-obsolete gcc=4,obsolete
CVS commit: src/external/bsd/pcc
Module Name:src Committed By: plunky Date: Thu Jul 24 20:55:45 UTC 2014 Modified Files: src/external/bsd/pcc/libexec: Makefile src/external/bsd/pcc/usr.bin/pcc: Makefile Log Message: make p++ optional, on MKCXX To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/pcc/libexec/Makefile cvs rdiff -u -r1.9 -r1.10 src/external/bsd/pcc/usr.bin/pcc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/pcc/libexec/Makefile diff -u src/external/bsd/pcc/libexec/Makefile:1.7 src/external/bsd/pcc/libexec/Makefile:1.8 --- src/external/bsd/pcc/libexec/Makefile:1.7 Thu Jul 24 20:20:49 2014 +++ src/external/bsd/pcc/libexec/Makefile Thu Jul 24 20:55:45 2014 @@ -1,7 +1,11 @@ -# $NetBSD: Makefile,v 1.7 2014/07/24 20:20:49 plunky Exp $ +# $NetBSD: Makefile,v 1.8 2014/07/24 20:55:45 plunky Exp $ .include bsd.own.mk -SUBDIR= mkext .WAIT ccom cpp cxxcom +SUBDIR= mkext .WAIT ccom cpp + +.if ${MKCXX} != no +SUBDIR+= cxxcom +.endif .include bsd.subdir.mk Index: src/external/bsd/pcc/usr.bin/pcc/Makefile diff -u src/external/bsd/pcc/usr.bin/pcc/Makefile:1.9 src/external/bsd/pcc/usr.bin/pcc/Makefile:1.10 --- src/external/bsd/pcc/usr.bin/pcc/Makefile:1.9 Thu Jul 24 20:20:49 2014 +++ src/external/bsd/pcc/usr.bin/pcc/Makefile Thu Jul 24 20:55:45 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2014/07/24 20:20:49 plunky Exp $ +# $NetBSD: Makefile,v 1.10 2014/07/24 20:55:45 plunky Exp $ WARNS?= 2 @@ -29,6 +29,10 @@ pcc.1: cc.1 -e s,Xr cpp,Xr pcpp, \ ${.ALLSRC} ${.TARGET} +.if ${MKCXX} != no +SYMLINKS+= ${BINDIR}/pcc /usr/bin/p++ +.endif + CLEANFILES+= pcc.1 .include bsd.prog.mk
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: plunky Date: Thu Jul 24 21:02:55 UTC 2014 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi Log Message: add p++, and move it and cxxcom to comp-cxx-bin To generate a diff of this commit: cvs rdiff -u -r1.1901 -r1.1902 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.74 -r1.75 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1901 src/distrib/sets/lists/comp/mi:1.1902 --- src/distrib/sets/lists/comp/mi:1.1901 Thu Jul 24 20:31:01 2014 +++ src/distrib/sets/lists/comp/mi Thu Jul 24 21:02:55 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1901 2014/07/24 20:31:01 plunky Exp $ +# $NetBSD: mi,v 1.1902 2014/07/24 21:02:55 plunky Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -76,6 +76,7 @@ ./usr/bin/nm comp-util-bin binutils ./usr/bin/objcopycomp-util-bin binutils ./usr/bin/objdumpcomp-util-bin binutils +./usr/bin/p++ comp-cxx-bin pcc ./usr/bin/pcc comp-c-bin pcc ./usr/bin/protoizecomp-c-bin gcc=4,gcccmds ./usr/bin/protoize comp-obsolete gcc=45,obsolete @@ -4087,7 +4088,7 @@ ./usr/libexec/ccomcomp-c-bin pcc ./usr/libexec/collect2comp-obsolete obsolete ./usr/libexec/cppcomp-obsolete pcc,obsolete -./usr/libexec/cxxcomcomp-c-bin pcc +./usr/libexec/cxxcomcomp-cxx-bin pcc ./usr/libexec/f771comp-fortran-bin gcc=3,gcccmds ./usr/libexec/f771comp-obsolete gcc=4,obsolete ./usr/libexec/lint1comp-c-bin Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.74 src/distrib/sets/lists/debug/mi:1.75 --- src/distrib/sets/lists/debug/mi:1.74 Thu Jul 24 20:31:01 2014 +++ src/distrib/sets/lists/debug/mi Thu Jul 24 21:02:55 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.74 2014/07/24 20:31:01 plunky Exp $ +# $NetBSD: mi,v 1.75 2014/07/24 21:02:55 plunky Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib @@ -660,6 +660,7 @@ ./usr/libdata/debug/usr/bin/objdump.debug comp-util-debug binutils,debug ./usr/libdata/debug/usr/bin/openpgp.debug comp-obsolete obsolete ./usr/libdata/debug/usr/bin/openssl.debug comp-crypto-debug crypto,debug +./usr/libdata/debug/usr/bin/p++.debug comp-cxx-debug pcc,debug ./usr/libdata/debug/usr/bin/passwd.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/paste.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/patch.debug comp-util-debug debug @@ -890,7 +891,7 @@ ./usr/libdata/debug/usr/libexec/ching/printching.debug comp-games-debug debug ./usr/libdata/debug/usr/libexec/comsat.debug comp-mail-debug debug ./usr/libdata/debug/usr/libexec/cpp.debug comp-obsolete pcc,obsolete -./usr/libdata/debug/usr/libexec/cxxcom.debug comp-c-debug pcc,debug +./usr/libdata/debug/usr/libexec/cxxcom.debug comp-cxx-debug pcc,debug ./usr/libdata/debug/usr/libexec/digest-service.debug comp-krb5-debug kerberos,debug ./usr/libdata/debug/usr/libexec/f771.debug comp-fortran-debug gcc=3,gcccmds,debug ./usr/libdata/debug/usr/libexec/f771.debug comp-obsolete gcc=4,obsolete
CVS commit: src/share/mk
Module Name:src Committed By: plunky Date: Sat Jul 19 17:19:22 UTC 2014 Modified Files: src/share/mk: bsd.dep.mk Log Message: when calling mkdep, pass any -std=* flags for C and C++ source files to ensure that any definitions this implies are set To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/share/mk/bsd.dep.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.dep.mk diff -u src/share/mk/bsd.dep.mk:1.80 src/share/mk/bsd.dep.mk:1.81 --- src/share/mk/bsd.dep.mk:1.80 Thu Dec 5 22:49:33 2013 +++ src/share/mk/bsd.dep.mk Sat Jul 19 17:19:22 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.dep.mk,v 1.80 2013/12/05 22:49:33 matt Exp $ +# $NetBSD: bsd.dep.mk,v 1.81 2014/07/19 17:19:22 plunky Exp $ # Basic targets realdepend: beforedepend .depend afterdepend @@ -61,7 +61,7 @@ _MKDEP_FILEFLAGS= .c.d: ${_MKTARGET_CREATE} ${MKDEP} -f ${.TARGET}.tmp ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ - ${CFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ + ${CFLAGS:M-std=*} ${CFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} \ ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} \ mv ${.TARGET}.tmp ${.TARGET} @@ -85,7 +85,7 @@ _MKDEP_FILEFLAGS= .C.d .cc.d .cpp.d .cxx.d: ${_MKTARGET_CREATE} ${MKDEPCXX} -f ${.TARGET}.tmp ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ - ${CXXFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ + ${CXXFLAGS:M-std=*} ${CXXFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} \ ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} \ mv ${.TARGET}.tmp ${.TARGET}
CVS commit: src/sys/sys
Module Name:src Committed By: plunky Date: Mon Jul 14 18:50:22 UTC 2014 Modified Files: src/sys/sys: cdefs.h Log Message: remove PCC specific definitions for __packed, __aligned and __section which result in a _Pragma() usage. I don't think this ever worked, as you can't concatenate string literals in this way. A warning would have been produced, but until recently did not result in an error condition so this was overlooked. Use __attribute__ instead as this is supported by PCC. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.119 src/sys/sys/cdefs.h:1.120 --- src/sys/sys/cdefs.h:1.119 Thu Mar 13 20:36:01 2014 +++ src/sys/sys/cdefs.h Mon Jul 14 18:50:22 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.119 2014/03/13 20:36:01 pooka Exp $ */ +/* $NetBSD: cdefs.h,v 1.120 2014/07/14 18:50:22 plunky Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -353,14 +353,10 @@ #define __packed __packed #define __aligned(x) /* delete */ #define __section(x) /* delete */ -#elif __GNUC_PREREQ__(2, 7) +#elif __GNUC_PREREQ__(2, 7) || defined(__PCC__) #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) -#elif defined(__PCC__) -#define __packed _Pragma(packed 1) -#define __aligned(x) _Pragma(aligned __STRING(x)) -#define __section(x) _Pragma(section ## x) #elif defined(_MSC_VER) #define __packed /* ignore */ #else
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: plunky Date: Thu May 29 19:08:30 UTC 2014 Modified Files: src/sys/arch/x86/x86: mtrr_i686.c Log Message: \%s is not an escape sequence, and we want %s To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/x86/x86/mtrr_i686.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/mtrr_i686.c diff -u src/sys/arch/x86/x86/mtrr_i686.c:1.27 src/sys/arch/x86/x86/mtrr_i686.c:1.28 --- src/sys/arch/x86/x86/mtrr_i686.c:1.27 Sun Apr 22 18:59:41 2012 +++ src/sys/arch/x86/x86/mtrr_i686.c Thu May 29 19:08:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mtrr_i686.c,v 1.27 2012/04/22 18:59:41 rmind Exp $ */ +/* $NetBSD: mtrr_i686.c,v 1.28 2014/05/29 19:08:30 plunky Exp $ */ /*- * Copyright (c) 2000, 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mtrr_i686.c,v 1.27 2012/04/22 18:59:41 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: mtrr_i686.c,v 1.28 2014/05/29 19:08:30 plunky Exp $); #include opt_multiprocessor.h @@ -311,7 +311,7 @@ i686_mtrr_init_first(void) i686_mtrr_vcnt = i686_mtrr_cap MTRR_I686_CAP_VCNT_MASK; if (i686_mtrr_vcnt MTRR_I686_NVAR_MAX) - printf(\%s: FIXME: more than %d MTRRs (%d)\n, __FILE__, + printf(%s: FIXME: more than %d MTRRs (%d)\n, __FILE__, MTRR_I686_NVAR_MAX, i686_mtrr_vcnt); else if (i686_mtrr_vcnt MTRR_I686_NVAR_MAX) { for (i = MTRR_I686_NVAR_MAX - i686_mtrr_vcnt; i; i--) {
CVS commit: src/share/mk
Module Name:src Committed By: plunky Date: Tue May 27 16:14:03 UTC 2014 Modified Files: src/share/mk: bsd.sys.mk Log Message: we use C99 syntax but with some GCC extensions, so signal that depending on the compiler in use To generate a diff of this commit: cvs rdiff -u -r1.237 -r1.238 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.sys.mk diff -u src/share/mk/bsd.sys.mk:1.237 src/share/mk/bsd.sys.mk:1.238 --- src/share/mk/bsd.sys.mk:1.237 Tue Jan 28 19:41:52 2014 +++ src/share/mk/bsd.sys.mk Tue May 27 16:14:03 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sys.mk,v 1.237 2014/01/28 19:41:52 martin Exp $ +# $NetBSD: bsd.sys.mk,v 1.238 2014/05/27 16:14:03 plunky Exp $ # # Build definitions used for NetBSD source tree builds. @@ -20,12 +20,10 @@ CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/ CPPFLAGS+= -Wp,-iremap,${X11SRCDIR}:/usr/xsrc .endif -# Enable c99 mode by default. -# This has the side effect of complaining for missing prototypes -# implicit type declarations and missing return statements. -.if defined(HAVE_GCC) || defined(HAVE_LLVM) -CFLAGS+= -std=gnu99 -.endif +# NetBSD sources use C99 style, with some GCC extensions. +CFLAGS+= ${${ACTIVE_CC} == clang:? -std=gnu99 :} +CFLAGS+= ${${ACTIVE_CC} == gcc:? -std=gnu99 :} +CFLAGS+= ${${ACTIVE_CC} == pcc:? -std=gnu99 :} .if defined(WARNS) CFLAGS+= ${${ACTIVE_CC} == clang:? -Wno-sign-compare -Wno-pointer-sign :}
CVS commit: src/share/mk
Module Name:src Committed By: plunky Date: Tue May 27 16:16:01 UTC 2014 Modified Files: src/share/mk: bsd.sys.mk Log Message: use -Wno-traditional only for GCC rather than !CLANG To generate a diff of this commit: cvs rdiff -u -r1.238 -r1.239 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.sys.mk diff -u src/share/mk/bsd.sys.mk:1.238 src/share/mk/bsd.sys.mk:1.239 --- src/share/mk/bsd.sys.mk:1.238 Tue May 27 16:14:03 2014 +++ src/share/mk/bsd.sys.mk Tue May 27 16:16:01 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sys.mk,v 1.238 2014/05/27 16:14:03 plunky Exp $ +# $NetBSD: bsd.sys.mk,v 1.239 2014/05/27 16:16:01 plunky Exp $ # # Build definitions used for NetBSD source tree builds. @@ -37,7 +37,7 @@ CFLAGS+= -Wall -Wstrict-prototypes -Wmis # differently in traditional and ansi environments' which is the warning # we wanted, and now we don't get anymore. CFLAGS+= -Wno-sign-compare -CFLAGS+= ${${ACTIVE_CC} != clang:? -Wno-traditional :} +CFLAGS+= ${${ACTIVE_CC} == gcc :? -Wno-traditional :} .if !defined(NOGCCERROR) # Set assembler warnings to be fatal CFLAGS+= -Wa,--fatal-warnings
CVS commit: src/lib
Module Name:src Committed By: plunky Date: Fri May 9 08:36:09 UTC 2014 Modified Files: src/lib: Makefile Log Message: Move libsjjit and libbpfjit to the pre-dependency section and remove the unnecessary .WAIT. They are both marked LIBISPRIVATE, which does mean no link is performed, and there are no dependencies. To generate a diff of this commit: cvs rdiff -u -r1.213 -r1.214 src/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/Makefile diff -u src/lib/Makefile:1.213 src/lib/Makefile:1.214 --- src/lib/Makefile:1.213 Tue Apr 22 13:20:58 2014 +++ src/lib/Makefile Fri May 9 08:36:09 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.213 2014/04/22 13:20:58 joerg Exp $ +# $NetBSD: Makefile,v 1.214 2014/05/09 08:36:09 plunky Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include bsd.own.mk @@ -62,6 +62,11 @@ SUBDIR+= ../external/bsd/elftoolchain/li SUBDIR+= ../external/bsd/liblzf/lib SUBDIR+= ../external/bsd/libpcap/lib +.if ${MKSLJIT} != no +SUBDIR+= ../external/bsd/sljit/lib +SUBDIR+= libbpfjit +.endif + SUBDIR+= ../external/mit/expat/lib SUBDIR+= ../external/public-domain/sqlite/lib @@ -209,12 +214,6 @@ SUBDIR+= libpam # depends on heimdal SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl .endif -.if ${MKSLJIT} != no -SUBDIR+= ../external/bsd/sljit/lib -SUBDIR+= .WAIT -SUBDIR+= libbpfjit -.endif - SUBDIR+= ../external/bsd/mdocml/lib .if (${MKRUMP} != no)
CVS commit: src/share/mk
Module Name:src Committed By: plunky Date: Thu Apr 10 19:02:18 UTC 2014 Modified Files: src/share/mk: bsd.host.mk bsd.hostlib.mk bsd.hostprog.mk Log Message: the value of HOST_MKDEP previously depended on USETOOLS; make it do so again, and centralise the USETOOLS=no case into bsd.host.mk To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/mk/bsd.host.mk cvs rdiff -u -r1.17 -r1.18 src/share/mk/bsd.hostlib.mk cvs rdiff -u -r1.72 -r1.73 src/share/mk/bsd.hostprog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.host.mk diff -u src/share/mk/bsd.host.mk:1.1 src/share/mk/bsd.host.mk:1.2 --- src/share/mk/bsd.host.mk:1.1 Thu Jan 16 01:19:46 2014 +++ src/share/mk/bsd.host.mk Thu Apr 10 19:02:18 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.host.mk,v 1.1 2014/01/16 01:19:46 christos Exp $ +# $NetBSD: bsd.host.mk,v 1.2 2014/04/10 19:02:18 plunky Exp $ .if !defined(_BSD_HOST_MK_) _BSD_HOST_MK_=1 @@ -46,8 +46,13 @@ HOST_OSTYPE:= ${_HOST_OSNAME}-${_HOST_OS .MAKEOVERRIDES+= HOST_OSTYPE .endif # !defined(HOST_OSTYPE) +.if ${USETOOLS} == yes HOST_MKDEP?= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep HOST_MKDEPCXX?= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep +.else +HOST_MKDEP?= CC=${HOST_CC:Q} mkdep +HOST_MKDEPCXX?= CC=${HOST_CXX:Q} mkdep +.endif .if ${NEED_OWN_INSTALL_TARGET} != no HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME} Index: src/share/mk/bsd.hostlib.mk diff -u src/share/mk/bsd.hostlib.mk:1.17 src/share/mk/bsd.hostlib.mk:1.18 --- src/share/mk/bsd.hostlib.mk:1.17 Tue Oct 29 16:11:46 2013 +++ src/share/mk/bsd.hostlib.mk Thu Apr 10 19:02:18 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.hostlib.mk,v 1.17 2013/10/29 16:11:46 joerg Exp $ +# $NetBSD: bsd.hostlib.mk,v 1.18 2014/04/10 19:02:18 plunky Exp $ .include bsd.init.mk .include bsd.sys.mk @@ -7,8 +7,6 @@ # Default values CFLAGS+= ${COPTS} -HOST_MKDEP?= CC=${HOST_CC:Q} mkdep -HOST_MKDEPCXX?= CC=${HOST_CXX:Q} mkdep MKDEP_SUFFIXES?= .o .lo # Override these: Index: src/share/mk/bsd.hostprog.mk diff -u src/share/mk/bsd.hostprog.mk:1.72 src/share/mk/bsd.hostprog.mk:1.73 --- src/share/mk/bsd.hostprog.mk:1.72 Tue Oct 29 16:11:46 2013 +++ src/share/mk/bsd.hostprog.mk Thu Apr 10 19:02:18 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.hostprog.mk,v 1.72 2013/10/29 16:11:46 joerg Exp $ +# $NetBSD: bsd.hostprog.mk,v 1.73 2014/04/10 19:02:18 plunky Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .include bsd.init.mk @@ -81,8 +81,6 @@ LIBRUMPFS_TMPFS?= /usr/lib/librumpfs_tmp LIBRUMPFS_UDF?= /usr/lib/librumpfs_udf.a LIBRUMPFS_UFS?= /usr/lib/librumpfs_ufs.a -HOST_MKDEP?= CC=${HOST_CC:Q} mkdep -HOST_MKDEPCXX?= CC=${HOST_CXX:Q} mkdep MKDEP_SUFFIXES?= .lo .ln # Override these:
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: plunky Date: Sun Jan 26 08:31:17 UTC 2014 Modified Files: src/usr.sbin/rtadvd: rtadvd.c Log Message: spelling correction - recieved - received To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/rtadvd/rtadvd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/rtadvd/rtadvd.c diff -u src/usr.sbin/rtadvd/rtadvd.c:1.44 src/usr.sbin/rtadvd/rtadvd.c:1.45 --- src/usr.sbin/rtadvd/rtadvd.c:1.44 Tue Jul 9 09:34:59 2013 +++ src/usr.sbin/rtadvd/rtadvd.c Sun Jan 26 08:31:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rtadvd.c,v 1.44 2013/07/09 09:34:59 roy Exp $ */ +/* $NetBSD: rtadvd.c,v 1.45 2014/01/26 08:31:17 plunky Exp $ */ /* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */ /* @@ -1080,7 +1080,7 @@ ra_input(int len, struct nd_router_adver } if (rai-leaving) { syslog(LOG_DEBUG, - %s recieved RA on re-configuring interface (%s), + %s received RA on re-configuring interface (%s), __func__, rai-ifname); goto done; }
CVS commit: src/sys/sys
Module Name:src Committed By: plunky Date: Thu Mar 21 20:05:57 UTC 2013 Modified Files: src/sys/sys: param.h Log Message: Bump minor number for removal of kauth_access_action(), as per http://mail-index.netbsd.org/source-changes/2013/03/18/msg042340.html Welcome to 6.99.18 To generate a diff of this commit: cvs rdiff -u -r1.426 -r1.427 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.426 src/sys/sys/param.h:1.427 --- src/sys/sys/param.h:1.426 Mon Mar 18 13:36:23 2013 +++ src/sys/sys/param.h Thu Mar 21 20:05:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.426 2013/03/18 13:36:23 para Exp $ */ +/* $NetBSD: param.h,v 1.427 2013/03/21 20:05:56 plunky Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 699001700 /* NetBSD 6.99.17 */ +#define __NetBSD_Version__ 699001800 /* NetBSD 6.99.18 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) = __NetBSD_Version__)
CVS commit: src/sys
Module Name:src Committed By: plunky Date: Mon Mar 18 19:35:48 UTC 2013 Modified Files: src/sys/fs/adosfs: advnops.c src/sys/fs/cd9660: cd9660_vnops.c src/sys/fs/efs: efs_vnops.c src/sys/fs/filecorefs: filecore_vnops.c src/sys/fs/hfs: hfs_vnops.c src/sys/fs/msdosfs: msdosfs_vnops.c src/sys/fs/nilfs: nilfs_vnops.c src/sys/fs/ntfs: ntfs_vnops.c src/sys/fs/ptyfs: ptyfs_vnops.c src/sys/fs/smbfs: smbfs_vnops.c src/sys/fs/sysvbfs: sysvbfs_vnops.c src/sys/fs/tmpfs: tmpfs_vnops.c src/sys/fs/udf: udf_vnops.c src/sys/fs/v7fs: v7fs_vnops.c src/sys/kern: kern_auth.c vfs_subr.c src/sys/miscfs/kernfs: kernfs_vnops.c src/sys/miscfs/procfs: procfs_vnops.c src/sys/nfs: nfs_vnops.c src/sys/sys: kauth.h src/sys/ufs/chfs: chfs_vnops.c src/sys/ufs/ext2fs: ext2fs_vnops.c src/sys/ufs/ufs: ufs_vnops.c Log Message: C99 section 6.7.2.3 (Tags) Note 3 states that: A type specifier of the form enum identifier without an enumerator list shall only appear after the type it specifies is complete. which means that we cannot pass an enum vtype argument to kauth_access_action() without fully specifying the type first. Unfortunately there is a complicated include file loop which makes that difficult, so convert this minimal function into a macro (and capitalize it). (ok elad@) To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/fs/adosfs/advnops.c cvs rdiff -u -r1.42 -r1.43 src/sys/fs/cd9660/cd9660_vnops.c cvs rdiff -u -r1.29 -r1.30 src/sys/fs/efs/efs_vnops.c cvs rdiff -u -r1.35 -r1.36 src/sys/fs/filecorefs/filecore_vnops.c cvs rdiff -u -r1.26 -r1.27 src/sys/fs/hfs/hfs_vnops.c cvs rdiff -u -r1.85 -r1.86 src/sys/fs/msdosfs/msdosfs_vnops.c cvs rdiff -u -r1.20 -r1.21 src/sys/fs/nilfs/nilfs_vnops.c cvs rdiff -u -r1.54 -r1.55 src/sys/fs/ntfs/ntfs_vnops.c cvs rdiff -u -r1.40 -r1.41 src/sys/fs/ptyfs/ptyfs_vnops.c cvs rdiff -u -r1.85 -r1.86 src/sys/fs/smbfs/smbfs_vnops.c cvs rdiff -u -r1.46 -r1.47 src/sys/fs/sysvbfs/sysvbfs_vnops.c cvs rdiff -u -r1.100 -r1.101 src/sys/fs/tmpfs/tmpfs_vnops.c cvs rdiff -u -r1.74 -r1.75 src/sys/fs/udf/udf_vnops.c cvs rdiff -u -r1.11 -r1.12 src/sys/fs/v7fs/v7fs_vnops.c cvs rdiff -u -r1.72 -r1.73 src/sys/kern/kern_auth.c cvs rdiff -u -r1.436 -r1.437 src/sys/kern/vfs_subr.c cvs rdiff -u -r1.146 -r1.147 src/sys/miscfs/kernfs/kernfs_vnops.c cvs rdiff -u -r1.185 -r1.186 src/sys/miscfs/procfs/procfs_vnops.c cvs rdiff -u -r1.298 -r1.299 src/sys/nfs/nfs_vnops.c cvs rdiff -u -r1.70 -r1.71 src/sys/sys/kauth.h cvs rdiff -u -r1.14 -r1.15 src/sys/ufs/chfs/chfs_vnops.c cvs rdiff -u -r1.106 -r1.107 src/sys/ufs/ext2fs/ext2fs_vnops.c cvs rdiff -u -r1.211 -r1.212 src/sys/ufs/ufs/ufs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/adosfs/advnops.c diff -u src/sys/fs/adosfs/advnops.c:1.40 src/sys/fs/adosfs/advnops.c:1.41 --- src/sys/fs/adosfs/advnops.c:1.40 Thu Dec 20 08:03:42 2012 +++ src/sys/fs/adosfs/advnops.c Mon Mar 18 19:35:35 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: advnops.c,v 1.40 2012/12/20 08:03:42 hannken Exp $ */ +/* $NetBSD: advnops.c,v 1.41 2013/03/18 19:35:35 plunky Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: advnops.c,v 1.40 2012/12/20 08:03:42 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: advnops.c,v 1.41 2013/03/18 19:35:35 plunky Exp $); #include sys/param.h #include sys/systm.h @@ -776,7 +776,7 @@ adosfs_check_permitted(struct vnode *vp, { mode_t file_mode = adunixprot(ap-adprot) ap-amp-mask; - return kauth_authorize_vnode(cred, kauth_access_action(mode, + return kauth_authorize_vnode(cred, KAUTH_ACCESS_ACTION(mode, vp-v_type, file_mode), vp, NULL, genfs_can_access(vp-v_type, file_mode, ap-uid, ap-gid, mode, cred)); } Index: src/sys/fs/cd9660/cd9660_vnops.c diff -u src/sys/fs/cd9660/cd9660_vnops.c:1.42 src/sys/fs/cd9660/cd9660_vnops.c:1.43 --- src/sys/fs/cd9660/cd9660_vnops.c:1.42 Thu Dec 20 08:03:42 2012 +++ src/sys/fs/cd9660/cd9660_vnops.c Mon Mar 18 19:35:35 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vnops.c,v 1.42 2012/12/20 08:03:42 hannken Exp $ */ +/* $NetBSD: cd9660_vnops.c,v 1.43 2013/03/18 19:35:35 plunky Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cd9660_vnops.c,v 1.42 2012/12/20 08:03:42 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: cd9660_vnops.c,v 1.43 2013/03/18 19:35:35 plunky Exp $); #include sys/param.h #include sys/systm.h @@ -117,7 +117,7 @@ cd9660_check_permitted(struct vnode *vp, kauth_cred_t cred) { - return kauth_authorize_vnode(cred, kauth_access_action(mode, + return kauth_authorize_vnode(cred, KAUTH_ACCESS_ACTION(mode, vp-v_type, ip-inode.iso_mode ALLPERMS), vp, NULL,
CVS commit: src/share/misc
Module Name:src Committed By: plunky Date: Fri Feb 22 08:19:51 UTC 2013 Modified Files: src/share/misc: acronyms.comp Log Message: since /etc/rc.d/network now prints messages about DAD to the console during boot, lets provide a hint what it is: duplicate address detection To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.131 src/share/misc/acronyms.comp:1.132 --- src/share/misc/acronyms.comp:1.131 Wed Jan 23 12:35:06 2013 +++ src/share/misc/acronyms.comp Fri Feb 22 08:19:50 2013 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.131 2013/01/23 12:35:06 wiz Exp $ +$NetBSD: acronyms.comp,v 1.132 2013/02/22 08:19:50 plunky Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -251,6 +251,7 @@ DAA distributed application architecture DAB digital audio broadcasting DAC digital [to] analog converter DAC discretionary access control +DAD duplicate address detection DAO disk at once DAP Directory Access Protocol DAT digital audio tape
CVS commit: src/usr.sbin/btdevctl
Module Name:src Committed By: plunky Date: Wed Dec 26 17:33:09 UTC 2012 Modified Files: src/usr.sbin/btdevctl: btdevctl.8 Log Message: add a comment pointing out that the link-mode may need to be changed manually, for devices which cannot authenticate for PR/47286 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/btdevctl/btdevctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btdevctl/btdevctl.8 diff -u src/usr.sbin/btdevctl/btdevctl.8:1.7 src/usr.sbin/btdevctl/btdevctl.8:1.8 --- src/usr.sbin/btdevctl/btdevctl.8:1.7 Tue Oct 12 21:49:08 2010 +++ src/usr.sbin/btdevctl/btdevctl.8 Wed Dec 26 17:33:09 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: btdevctl.8,v 1.7 2010/10/12 21:49:08 wiz Exp $ +.\ $NetBSD: btdevctl.8,v 1.8 2012/12/26 17:33:09 plunky Exp $ .\ .\ Copyright (c) 2006 Itronix Inc. .\ All rights reserved. @@ -51,7 +51,7 @@ .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\ SUCH DAMAGE. .\ -.Dd October 11, 2010 +.Dd December 26, 2012 .Dt BTDEVCTL 8 .Os .Sh NAME @@ -101,7 +101,7 @@ May be given as BDADDR or device name. Connection link mode. The following modes are supported: .Pp -.Bl -tag -compact +.Bl -tag -width encrypt -compact .It none clear previously set mode. .It auth @@ -120,6 +120,8 @@ will set by default, or .Sq encrypt for keyboard devices. +If the device cannot handle authentication, then the mode will need +to be cleared manually. .It Fl q Ignore any cached data and perform a SDP query for the given .Ar service .
CVS commit: src/usr.sbin/btdevctl
Module Name:src Committed By: plunky Date: Wed Dec 26 17:57:49 UTC 2012 Modified Files: src/usr.sbin/btdevctl: btdevctl.8 Log Message: whitespace ' ' - ' ' To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/btdevctl/btdevctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btdevctl/btdevctl.8 diff -u src/usr.sbin/btdevctl/btdevctl.8:1.8 src/usr.sbin/btdevctl/btdevctl.8:1.9 --- src/usr.sbin/btdevctl/btdevctl.8:1.8 Wed Dec 26 17:33:09 2012 +++ src/usr.sbin/btdevctl/btdevctl.8 Wed Dec 26 17:57:49 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: btdevctl.8,v 1.8 2012/12/26 17:33:09 plunky Exp $ +.\ $NetBSD: btdevctl.8,v 1.9 2012/12/26 17:57:49 plunky Exp $ .\ .\ Copyright (c) 2006 Itronix Inc. .\ All rights reserved. @@ -71,7 +71,7 @@ The utility is used to configure bluetooth devices in the system. Normally, .Nm -will perform an SDP query to the remote device as needed, and +will perform an SDP query to the remote device as needed, and cache the results in the .Pa /var/db/btdevctl.plist file for later use.
CVS commit: src/sys/dev/bluetooth
Module Name:src Committed By: plunky Date: Thu Dec 20 11:13:54 UTC 2012 Modified Files: src/sys/dev/bluetooth: bthidev.c btmagic.c Log Message: when no link-mode is specified, explicitly set a mode of (int)0 otherwise l2cap_setmode() will fail during connection setup for bthidev.c, this fixes a problem with Microsoft Wedge Touch mouse (which may not be able to authenticate) for btmagic.c, include this fix in case somebody tries that related to PR/47286 To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/bluetooth/bthidev.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/bluetooth/btmagic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/bluetooth/bthidev.c diff -u src/sys/dev/bluetooth/bthidev.c:1.22 src/sys/dev/bluetooth/bthidev.c:1.23 --- src/sys/dev/bluetooth/bthidev.c:1.22 Tue Apr 3 09:32:53 2012 +++ src/sys/dev/bluetooth/bthidev.c Thu Dec 20 11:13:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bthidev.c,v 1.22 2012/04/03 09:32:53 plunky Exp $ */ +/* $NetBSD: bthidev.c,v 1.23 2012/12/20 11:13:53 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bthidev.c,v 1.22 2012/04/03 09:32:53 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: bthidev.c,v 1.23 2012/12/20 11:13:53 plunky Exp $); #include sys/param.h #include sys/condvar.h @@ -241,7 +241,8 @@ bthidev_attach(device_t parent, device_t aprint_verbose( %s %s, BTDEVmode, prop_string_cstring_nocopy(obj)); - } + } else + sockopt_setint(sc-sc_mode, 0); obj = prop_dictionary_get(dict, BTHIDEVcontrolpsm); if (prop_object_type(obj) == PROP_TYPE_NUMBER) { Index: src/sys/dev/bluetooth/btmagic.c diff -u src/sys/dev/bluetooth/btmagic.c:1.3 src/sys/dev/bluetooth/btmagic.c:1.4 --- src/sys/dev/bluetooth/btmagic.c:1.3 Sat Jun 2 21:36:43 2012 +++ src/sys/dev/bluetooth/btmagic.c Thu Dec 20 11:13:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: btmagic.c,v 1.3 2012/06/02 21:36:43 dsl Exp $ */ +/* $NetBSD: btmagic.c,v 1.4 2012/12/20 11:13:53 plunky Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -85,7 +85,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: btmagic.c,v 1.3 2012/06/02 21:36:43 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: btmagic.c,v 1.4 2012/12/20 11:13:53 plunky Exp $); #include sys/param.h #include sys/conf.h @@ -306,7 +306,8 @@ btmagic_attach(device_t parent, device_t aprint_verbose( %s %s, BTDEVmode, prop_string_cstring_nocopy(obj)); - } + } else + sockopt_setint(sc-sc_mode, 0); aprint_normal(: 3 buttons, W and Z dirs\n); aprint_naive(\n);
CVS commit: src/sys/dev/bluetooth
Module Name:src Committed By: plunky Date: Thu Dec 20 11:17:48 UTC 2012 Modified Files: src/sys/dev/bluetooth: bthidev.c btmagic.c Log Message: increase some diagnostics To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/bluetooth/bthidev.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/bluetooth/btmagic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/bluetooth/bthidev.c diff -u src/sys/dev/bluetooth/bthidev.c:1.23 src/sys/dev/bluetooth/bthidev.c:1.24 --- src/sys/dev/bluetooth/bthidev.c:1.23 Thu Dec 20 11:13:53 2012 +++ src/sys/dev/bluetooth/bthidev.c Thu Dec 20 11:17:47 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bthidev.c,v 1.23 2012/12/20 11:13:53 plunky Exp $ */ +/* $NetBSD: bthidev.c,v 1.24 2012/12/20 11:17:47 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bthidev.c,v 1.23 2012/12/20 11:13:53 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: bthidev.c,v 1.24 2012/12/20 11:17:47 plunky Exp $); #include sys/param.h #include sys/condvar.h @@ -193,6 +193,7 @@ bthidev_attach(device_t parent, device_t int locs[BTHIDBUSCF_NLOCS]; int maxid, rep, dlen; int vendor, product; + int err; /* * Init softc @@ -337,8 +338,9 @@ bthidev_attach(device_t parent, device_t * start bluetooth connections */ mutex_enter(bt_lock); - if ((sc-sc_flags BTHID_RECONNECT) == 0) - bthidev_listen(sc); + if ((sc-sc_flags BTHID_RECONNECT) == 0 + (err = bthidev_listen(sc)) != 0) + aprint_error_dev(self, failed to listen (%d)\n, err); if (sc-sc_flags BTHID_CONNECTING) bthidev_connect(sc); @@ -561,8 +563,10 @@ bthidev_connect(struct bthidev_softc *sc } err = l2cap_setopt(sc-sc_ctl, sc-sc_mode); - if (err) + if (err) { + aprint_error_dev(sc-sc_dev, l2cap_setopt failed (%d)\n, err); return err; + } bdaddr_copy(sa.bt_bdaddr, sc-sc_laddr); err = l2cap_bind(sc-sc_ctl, sa); @@ -802,7 +806,7 @@ bthidev_ctl_disconnected(void *arg, int sc-sc_state = BTHID_CLOSED; if (sc-sc_int == NULL) { - aprint_normal_dev(sc-sc_dev, disconnected\n); + aprint_normal_dev(sc-sc_dev, disconnected (%d)\n, err); sc-sc_flags = ~BTHID_CONNECTING; if (sc-sc_flags BTHID_RECONNECT) @@ -834,7 +838,7 @@ bthidev_int_disconnected(void *arg, int sc-sc_state = BTHID_CLOSED; if (sc-sc_ctl == NULL) { - aprint_normal_dev(sc-sc_dev, disconnected\n); + aprint_normal_dev(sc-sc_dev, disconnected (%d)\n, err); sc-sc_flags = ~BTHID_CONNECTING; if (sc-sc_flags BTHID_RECONNECT) Index: src/sys/dev/bluetooth/btmagic.c diff -u src/sys/dev/bluetooth/btmagic.c:1.4 src/sys/dev/bluetooth/btmagic.c:1.5 --- src/sys/dev/bluetooth/btmagic.c:1.4 Thu Dec 20 11:13:53 2012 +++ src/sys/dev/bluetooth/btmagic.c Thu Dec 20 11:17:47 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: btmagic.c,v 1.4 2012/12/20 11:13:53 plunky Exp $ */ +/* $NetBSD: btmagic.c,v 1.5 2012/12/20 11:17:47 plunky Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -85,7 +85,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: btmagic.c,v 1.4 2012/12/20 11:13:53 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: btmagic.c,v 1.5 2012/12/20 11:17:47 plunky Exp $); #include sys/param.h #include sys/conf.h @@ -272,6 +272,7 @@ btmagic_attach(device_t parent, device_t struct wsmousedev_attach_args wsma; const struct sysctlnode *node; prop_object_t obj; + int err; /* * Init softc @@ -392,7 +393,8 @@ btmagic_attach(device_t parent, device_t * start bluetooth connections */ mutex_enter(bt_lock); - btmagic_listen(sc); + if ((err = btmagic_listen(sc)) != 0) + aprint_error_dev(self, failed to listen (%d)\n, err); btmagic_connect(sc); mutex_exit(bt_lock); } @@ -533,8 +535,11 @@ btmagic_connect(struct btmagic_softc *sc } err = l2cap_setopt(sc-sc_ctl, sc-sc_mode); - if (err) + if (err) { + printf(%s: l2cap_setopt failed (%d)\n, + device_xname(sc-sc_dev), err); return err; + } bdaddr_copy(sa.bt_bdaddr, sc-sc_laddr); err = l2cap_bind(sc-sc_ctl, sa); @@ -885,7 +890,7 @@ btmagic_ctl_disconnected(void *arg, int } if (sc-sc_int == NULL) { - printf(%s: disconnected\n, device_xname(sc-sc_dev)); + printf(%s: disconnected (%d)\n, device_xname(sc-sc_dev), err); CLR(sc-sc_flags, BTMAGIC_CONNECTING); sc-sc_state = BTMAGIC_WAIT_CTL; } else { @@ -911,7 +916,7 @@ btmagic_int_disconnected(void *arg, int } if (sc-sc_ctl == NULL) { - printf(%s: disconnected\n, device_xname(sc-sc_dev)); + printf(%s: disconnected (%d)\n, device_xname(sc-sc_dev), err); CLR(sc-sc_flags, BTMAGIC_CONNECTING); sc-sc_state = BTMAGIC_WAIT_CTL; } else {
CVS commit: src/usr.sbin/btpand
Module Name:src Committed By: plunky Date: Sun Oct 14 08:31:35 UTC 2012 Modified Files: src/usr.sbin/btpand: client.c server.c Log Message: add code to ensure that SO_SNDBUF is large enough on client connections, as was previously done for server mode To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/btpand/client.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/btpand/server.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btpand/client.c diff -u src/usr.sbin/btpand/client.c:1.6 src/usr.sbin/btpand/client.c:1.7 --- src/usr.sbin/btpand/client.c:1.6 Mon Aug 29 20:38:55 2011 +++ src/usr.sbin/btpand/client.c Sun Oct 14 08:31:35 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: client.c,v 1.6 2011/08/29 20:38:55 joerg Exp $ */ +/* $NetBSD: client.c,v 1.7 2012/10/14 08:31:35 plunky Exp $ */ /*- * Copyright (c) 2008-2009 Iain Hibbert @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: client.c,v 1.6 2011/08/29 20:38:55 joerg Exp $); +__RCSID($NetBSD: client.c,v 1.7 2012/10/14 08:31:35 plunky Exp $); #include bluetooth.h #include errno.h @@ -45,7 +45,7 @@ client_init(void) struct sockaddr_bt sa; channel_t *chan; socklen_t len; - int fd, bufsize; + int fd, n; uint16_t mru, mtu; if (bdaddr_any(remote_bdaddr)) @@ -102,17 +102,15 @@ client_init(void) exit(EXIT_FAILURE); } - len = sizeof(bufsize); - if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, bufsize, len) == -1) { + len = sizeof(n); + if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, n, len) == -1) { log_err(Could not read SO_RCVBUF); exit(EXIT_FAILURE); } - if (bufsize 10 * mru) { - bufsize = 10 * mru; - if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, bufsize, - sizeof(bufsize)) == -1) - log_info(Could not increase SO_RCVBUF (from %d), - bufsize); + if (n 10 * mru) { + n = 10 * mru; + if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, n, sizeof(n)) == -1) + log_info(Could not increase SO_RCVBUF (to %d), n); } len = sizeof(mtu); @@ -125,6 +123,27 @@ client_init(void) exit(EXIT_FAILURE); } + len = sizeof(n); + if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, n, len) == -1) { + log_err(Could not get socket send buffer size: %m); + close(fd); + return; + } + if (n (mtu * 2)) { + n = mtu * 2; + if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, n, sizeof(n)) == -1) { + log_err(Could not set socket send buffer size (%d): %m, n); + close(fd); + return; + } + } + n = mtu; + if (setsockopt(fd, SOL_SOCKET, SO_SNDLOWAT, n, sizeof(n)) == -1) { + log_err(Could not set socket low water mark (%d): %m, n); + close(fd); + return; + } + chan = channel_alloc(); if (chan == NULL) exit(EXIT_FAILURE); Index: src/usr.sbin/btpand/server.c diff -u src/usr.sbin/btpand/server.c:1.7 src/usr.sbin/btpand/server.c:1.8 --- src/usr.sbin/btpand/server.c:1.7 Tue Feb 8 21:59:50 2011 +++ src/usr.sbin/btpand/server.c Sun Oct 14 08:31:35 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: server.c,v 1.7 2011/02/08 21:59:50 plunky Exp $ */ +/* $NetBSD: server.c,v 1.8 2012/10/14 08:31:35 plunky Exp $ */ /*- * Copyright (c) 2008-2009 Iain Hibbert @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: server.c,v 1.7 2011/02/08 21:59:50 plunky Exp $); +__RCSID($NetBSD: server.c,v 1.8 2012/10/14 08:31:35 plunky Exp $); #include sys/ioctl.h @@ -134,7 +134,7 @@ server_read(int s, short ev, void *arg) struct sockaddr_bt ra, la; channel_t *chan; socklen_t len; - int fd, n, bufsize; + int fd, n; uint16_t mru, mtu; assert(server_count server_limit); @@ -163,18 +163,16 @@ server_read(int s, short ev, void *arg) return; } - len = sizeof(bufsize); - if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, bufsize, len) == -1) { + len = sizeof(n); + if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, n, len) == -1) { log_err(Could not read SO_RCVBUF); close(fd); return; } - if (bufsize 10 * mru) { - bufsize = 10 * mru; - if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, bufsize, - sizeof(bufsize)) == -1) - log_info(Could not increase SO_RCVBUF (from %d), - bufsize); + if (n 10 * mru) { + n = 10 * mru; + if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, n, sizeof(n)) == -1) + log_info(Could not increase SO_RCVBUF (to %d), n); } len = sizeof(mtu); @@ -195,7 +193,6 @@ server_read(int s, short ev, void *arg) close(fd); return; } - if (n (mtu * 2)) { n = mtu * 2; if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, n, sizeof(n)) == -1) { @@ -204,7 +201,6 @@ server_read(int s, short ev, void *arg) return; } } - n = mtu; if (setsockopt(fd, SOL_SOCKET, SO_SNDLOWAT, n, sizeof(n)) == -1) { log_err(Could not set socket low water mark (%d): %m, n);
CVS commit: src/usr.sbin/btpand
Module Name:src Committed By: plunky Date: Sun Oct 14 08:35:45 UTC 2012 Modified Files: src/usr.sbin/btpand: btpand.h Log Message: no trailing comma on enum To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/btpand/btpand.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btpand/btpand.h diff -u src/usr.sbin/btpand/btpand.h:1.3 src/usr.sbin/btpand/btpand.h:1.4 --- src/usr.sbin/btpand/btpand.h:1.3 Tue May 12 21:50:38 2009 +++ src/usr.sbin/btpand/btpand.h Sun Oct 14 08:35:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: btpand.h,v 1.3 2009/05/12 21:50:38 plunky Exp $ */ +/* $NetBSD: btpand.h,v 1.4 2012/10/14 08:35:45 plunky Exp $ */ /*- * Copyright (c) 2008-2009 Iain Hibbert @@ -56,7 +56,7 @@ enum channel_state { CHANNEL_CLOSED, CHANNEL_WAIT_CONNECT_REQ, CHANNEL_WAIT_CONNECT_RSP, - CHANNEL_OPEN, + CHANNEL_OPEN }; #define CHANNEL_MAXQLEN 128
CVS commit: src/tests/lib/libc/net
Module Name:src Committed By: plunky Date: Sat Sep 15 16:22:58 UTC 2012 Modified Files: src/tests/lib/libc/net: Makefile Log Message: correct spelling of file to clean To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/net/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/net/Makefile diff -u src/tests/lib/libc/net/Makefile:1.6 src/tests/lib/libc/net/Makefile:1.7 --- src/tests/lib/libc/net/Makefile:1.6 Tue Nov 1 22:36:53 2011 +++ src/tests/lib/libc/net/Makefile Sat Sep 15 16:22:58 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2011/11/01 22:36:53 pgoyette Exp $ +# $NetBSD: Makefile,v 1.7 2012/09/15 16:22:58 plunky Exp $ .include bsd.own.mk @@ -28,6 +28,6 @@ PROGS+= h_servent LDADD.h_nsd_recurse+= -lpthread -CLEANFILES+= aton_ether_subr_.c +CLEANFILES+= aton_ether_subr.c .include bsd.test.mk
CVS commit: src/external/bsd/ipf/dist
Module Name:src Committed By: plunky Date: Sat Sep 15 16:56:06 UTC 2012 Modified Files: src/external/bsd/ipf/dist: opts.h Log Message: the result of the construct #define FOO defined(BAR) #if FOO [conditional code] #endif is undefined, according to C99 6.10.1 note 4. So, change code like that to use the following paradigm #if defined(BAR) #define FOO 1 #else #define FOO 0 #endif #if FOO [conditional code] #endif To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ipf/dist/opts.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ipf/dist/opts.h diff -u src/external/bsd/ipf/dist/opts.h:1.2 src/external/bsd/ipf/dist/opts.h:1.3 --- src/external/bsd/ipf/dist/opts.h:1.2 Sun Jul 22 14:27:35 2012 +++ src/external/bsd/ipf/dist/opts.h Sat Sep 15 16:56:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: opts.h,v 1.2 2012/07/22 14:27:35 darrenr Exp $ */ +/* $NetBSD: opts.h,v 1.3 2012/09/15 16:56:05 plunky Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -12,7 +12,11 @@ #define __OPTS_H__ #ifndef SOLARIS -#define SOLARIS (defined(sun) (defined(__svr4__) || defined(__SVR4))) +# if (defined(sun) (defined(__svr4__) || defined(__SVR4))) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #define OPT_REMOVE 0x01 #define OPT_DEBUG 0x02
CVS commit: src/sys/external/bsd/ipf/netinet
Module Name:src Committed By: plunky Date: Sat Sep 15 16:56:45 UTC 2012 Modified Files: src/sys/external/bsd/ipf/netinet: ip_compat.h ip_fil.h ip_log.c ip_nat.h ip_proxy.h Log Message: the result of the construct #define FOO defined(BAR) #if FOO [conditional code] #endif is undefined, according to C99 6.10.1 note 4. So, change code like that to use the following paradigm #if defined(BAR) #define FOO 1 #else #define FOO 0 #endif #if FOO [conditional code] #endif To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/ipf/netinet/ip_compat.h \ src/sys/external/bsd/ipf/netinet/ip_fil.h \ src/sys/external/bsd/ipf/netinet/ip_log.c \ src/sys/external/bsd/ipf/netinet/ip_nat.h \ src/sys/external/bsd/ipf/netinet/ip_proxy.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/ipf/netinet/ip_compat.h diff -u src/sys/external/bsd/ipf/netinet/ip_compat.h:1.3 src/sys/external/bsd/ipf/netinet/ip_compat.h:1.4 --- src/sys/external/bsd/ipf/netinet/ip_compat.h:1.3 Sun Jul 22 14:27:51 2012 +++ src/sys/external/bsd/ipf/netinet/ip_compat.h Sat Sep 15 16:56:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_compat.h,v 1.3 2012/07/22 14:27:51 darrenr Exp $ */ +/* $NetBSD: ip_compat.h,v 1.4 2012/09/15 16:56:45 plunky Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -27,7 +27,11 @@ #endif #ifndef SOLARIS -#define SOLARIS (defined(sun) (defined(__svr4__) || defined(__SVR4))) +# if (defined(sun) (defined(__svr4__) || defined(__SVR4))) +# define SOLARIS 1 +# else +# define SOLARIS 0 +# endif #endif #if (defined(SOLARIS2) (SOLARIS2 = 8)) # ifndef USE_INET6 @@ -128,30 +132,55 @@ struct file; # endif #endif -#define NETBSD_GE_REV(x) (defined(__NetBSD_Version__) \ - (__NetBSD_Version__ = (x))) -#define NETBSD_GT_REV(x) (defined(__NetBSD_Version__) \ - (__NetBSD_Version__ (x))) -#define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) \ - (__NetBSD_Version__ (x))) -#define FREEBSD_GE_REV(x) (defined(__FreeBSD_version) \ - (__FreeBSD_version = (x))) -#define FREEBSD_GT_REV(x) (defined(__FreeBSD_version) \ - (__FreeBSD_version (x))) -#define FREEBSD_LT_REV(x) (defined(__FreeBSD_version) \ - (__FreeBSD_version (x))) -#define BSDOS_GE_REV(x) (defined(_BSDI_VERSION) \ - (_BSDI_VERSION = (x))) -#define BSDOS_GT_REV(x) (defined(_BSDI_VERSION) \ - (_BSDI_VERSION (x))) -#define BSDOS_LT_REV(x) (defined(_BSDI_VERSION) \ - (_BSDI_VERSION (x))) -#define OPENBSD_GE_REV(x) (defined(OpenBSD) (OpenBSD = (x))) -#define OPENBSD_GT_REV(x) (defined(OpenBSD) (OpenBSD (x))) -#define OPENBSD_LT_REV(x) (defined(OpenBSD) (OpenBSD (x))) -#define BSD_GE_YEAR(x) (defined(BSD) (BSD = (x))) -#define BSD_GT_YEAR(x) (defined(BSD) (BSD (x))) -#define BSD_LT_YEAR(x) (defined(BSD) (BSD (x))) +#if defined(__NetBSD_Version__) +# define NETBSD_GE_REV(x) (__NetBSD_Version__ = (x)) +# define NETBSD_GT_REV(x) (__NetBSD_Version__ (x)) +# define NETBSD_LT_REV(x) (__NetBSD_Version__ (x)) +#else +# define NETBSD_GE_REV(x) 0 +# define NETBSD_GT_REV(x) 0 +# define NETBSD_LT_REV(x) 0 +#endif + +#if defined(__FreeBSD_version) +# define FREEBSD_GE_REV(x) (__FreeBSD_version = (x)) +# define FREEBSD_GT_REV(x) (__FreeBSD_version (x)) +# define FREEBSD_LT_REV(x) (__FreeBSD_version (x)) +#else +# define FREEBSD_GE_REV(x) 0 +# define FREEBSD_GT_REV(x) 0 +# define FREEBSD_LT_REV(x) 0 +#endif + +#if defined(_BSDI_VERSION) +# define BSDOS_GE_REV(x) (_BSDI_VERSION = (x)) +# define BSDOS_GT_REV(x) (_BSDI_VERSION (x)) +# define BSDOS_LT_REV(x) (_BSDI_VERSION (x)) +#else +# define BSDOS_GE_REV(x) 0 +# define BSDOS_GT_REV(x) 0 +# define BSDOS_LT_REV(x) 0 +#endif + +#if defined(OpenBSD) +# define OPENBSD_GE_REV(x) (OpenBSD = (x)) +# define OPENBSD_GT_REV(x) (OpenBSD (x)) +# define OPENBSD_LT_REV(x) (OpenBSD (x)) +#else +# define OPENBSD_GE_REV(x) 0 +# define OPENBSD_GT_REV(x) 0 +# define OPENBSD_LT_REV(x) 0 +#endif + +#if defined(BSD) +# define BSD_GE_YEAR(x) (BSD = (x)) +# define BSD_GT_YEAR(x) (BSD (x)) +# define BSD_LT_YEAR(x) (BSD (x)) +#else +# define BSD_GE_YEAR(x) 0 +# define BSD_GT_YEAR(x) 0 +# define BSD_LT_YEAR(x) 0 +#endif /* --- */ Index: src/sys/external/bsd/ipf/netinet/ip_fil.h diff -u src/sys/external/bsd/ipf/netinet/ip_fil.h:1.3 src/sys/external/bsd/ipf/netinet/ip_fil.h:1.4 --- src/sys/external/bsd/ipf/netinet/ip_fil.h:1.3 Sun Jul 22 14:27:51 2012 +++ src/sys/external/bsd/ipf/netinet/ip_fil.h Sat Sep 15 16:56:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_fil.h,v 1.3 2012/07/22 14:27:51 darrenr Exp $ */ +/* $NetBSD: ip_fil.h,v 1.4 2012/09/15 16:56:45 plunky Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -30,7 +30,11 @@ #endif #ifndef SOLARIS -# define SOLARIS (defined(sun) (defined(__svr4__) || defined(__SVR4))) +#
CVS commit: src
Module Name:src Committed By: plunky Date: Sat Sep 15 17:33:28 UTC 2012 Modified Files: src/distrib/sets/lists/misc: mi src/external/bsd/ipf/rules: Makefile Log Message: install example rules from the 5.1.2 distribution in external/bsd/ipf/dist rather than the old one.. mediaone does not seem to exist though, so mark it obsolete To generate a diff of this commit: cvs rdiff -u -r1.176 -r1.177 src/distrib/sets/lists/misc/mi cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ipf/rules/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/misc/mi diff -u src/distrib/sets/lists/misc/mi:1.176 src/distrib/sets/lists/misc/mi:1.177 --- src/distrib/sets/lists/misc/mi:1.176 Tue Feb 14 17:29:51 2012 +++ src/distrib/sets/lists/misc/mi Sat Sep 15 17:33:28 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.176 2012/02/14 17:29:51 njoly Exp $ +# $NetBSD: mi,v 1.177 2012/09/15 17:33:28 plunky Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -731,7 +731,7 @@ ./usr/share/examples/ipf/firewall misc-ipf-examples ipfilter,share ./usr/share/examples/ipf/ftp-proxy misc-ipf-examples ipfilter,share ./usr/share/examples/ipf/ftppxy misc-ipf-examples ipfilter,share -./usr/share/examples/ipf/mediaone misc-ipf-examples ipfilter,share +./usr/share/examples/ipf/mediaone misc-obsolete obsolete ./usr/share/examples/ipf/mkfilters misc-ipf-examples ipfilter,share ./usr/share/examples/ipf/nat-setup misc-ipf-examples ipfilter,share ./usr/share/examples/ipf/nat.eg misc-ipf-examples ipfilter,share Index: src/external/bsd/ipf/rules/Makefile diff -u src/external/bsd/ipf/rules/Makefile:1.1 src/external/bsd/ipf/rules/Makefile:1.2 --- src/external/bsd/ipf/rules/Makefile:1.1 Fri Mar 23 21:29:46 2012 +++ src/external/bsd/ipf/rules/Makefile Sat Sep 15 17:33:27 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2012/03/23 21:29:46 christos Exp $ +# $NetBSD: Makefile,v 1.2 2012/09/15 17:33:27 plunky Exp $ .include bsd.own.mk @@ -9,9 +9,9 @@ FILESDIR= /usr/share/examples/ipf FILES= BASIC.NAT BASIC_1.FW BASIC_2.FW example.1 example.2 example.3 \ example.4 example.5 example.6 example.7 example.8 example.9 \ example.10 example.11 example.12 example.13 example.sr \ - firewall ftp-proxy ftppxy mediaone nat-setup \ + firewall ftp-proxy ftppxy nat-setup \ nat.eg server tcpstate mkfilters .endif -.PATH: ${NETBSDSRCDIR}/dist/ipf/rules +.PATH: ${NETBSDSRCDIR}/external/bsd/ipf/dist/rules .include bsd.prog.mk
CVS commit: src
Module Name:src Committed By: plunky Date: Sat Sep 15 17:42:01 UTC 2012 Modified Files: src/distrib/sets/lists/comp: mi src/sys/netinet: Makefile Log Message: install header files from IPF 5.1.2 (sys/external/bsd/ipf) instead of older IPF (sys/dist/ipf). This adds ipf_rb.h To generate a diff of this commit: cvs rdiff -u -r1.1779 -r1.1780 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.24 -r1.25 src/sys/netinet/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1779 src/distrib/sets/lists/comp/mi:1.1780 --- src/distrib/sets/lists/comp/mi:1.1779 Thu Sep 13 21:05:20 2012 +++ src/distrib/sets/lists/comp/mi Sat Sep 15 17:41:59 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1779 2012/09/13 21:05:20 martin Exp $ +# $NetBSD: mi,v 1.1780 2012/09/15 17:41:59 plunky Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -1930,7 +1930,7 @@ ./usr/include/netinet/ip_state.h comp-ipf-include ipfilter ./usr/include/netinet/ip_sync.h comp-ipf-include ipfilter ./usr/include/netinet/ip_var.h comp-c-include -./usr/include/netinet/ipf_rb.h comp-obsolete obsolete +./usr/include/netinet/ipf_rb.h comp-ipf-include ipfilter ./usr/include/netinet/ipl.h comp-ipf-include ipfilter ./usr/include/netinet/pim.h comp-c-include ./usr/include/netinet/pim_var.h comp-c-include Index: src/sys/netinet/Makefile diff -u src/sys/netinet/Makefile:1.24 src/sys/netinet/Makefile:1.25 --- src/sys/netinet/Makefile:1.24 Mon Jun 25 15:28:38 2012 +++ src/sys/netinet/Makefile Sat Sep 15 17:41:59 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2012/06/25 15:28:38 christos Exp $ +# $NetBSD: Makefile,v 1.25 2012/09/15 17:41:59 plunky Exp $ INCSDIR= /usr/include/netinet @@ -20,9 +20,9 @@ INCS+= ip_compat.h # always needed by kd .if (${MKIPFILTER} != no) INCS+= ip_auth.h ip_fil.h ip_frag.h ip_htable.h ip_nat.h \ ip_lookup.h ip_pool.h ip_proxy.h ip_scan.h ip_state.h ip_sync.h \ - ipl.h + ipf_rb.h ipl.h .endif .include bsd.kinc.mk -.PATH: ${NETBSDSRCDIR}/sys/dist/ipf/netinet +.PATH: ${NETBSDSRCDIR}/sys/external/bsd/ipf/netinet
CVS commit: src/dist/pf/usr.sbin/ftp-proxy
Module Name:src Committed By: plunky Date: Sat Sep 15 17:42:43 UTC 2012 Modified Files: src/dist/pf/usr.sbin/ftp-proxy: ipf.c Log Message: reinstate Update ftp-proxy for changes to ipnat_t from Darren Reed To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/dist/pf/usr.sbin/ftp-proxy/ipf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/pf/usr.sbin/ftp-proxy/ipf.c diff -u src/dist/pf/usr.sbin/ftp-proxy/ipf.c:1.5 src/dist/pf/usr.sbin/ftp-proxy/ipf.c:1.6 --- src/dist/pf/usr.sbin/ftp-proxy/ipf.c:1.5 Wed Feb 15 17:55:14 2012 +++ src/dist/pf/usr.sbin/ftp-proxy/ipf.c Sat Sep 15 17:42:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ipf.c,v 1.5 2012/02/15 17:55:14 riz Exp $ */ +/* $NetBSD: ipf.c,v 1.6 2012/09/15 17:42:43 plunky Exp $ */ /* * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc. @@ -151,7 +151,7 @@ ftp_proxy_entry_find(u_int32_t id) } static int -ftp_proxy_entry_add_nat(struct ftp_proxy_entry *fpe, ipnat_t ipn) +ftp_proxy_entry_add_nat(struct ftp_proxy_entry *fpe, ipnat_t *ipn) { struct ftp_proxy_nat *fpn; @@ -159,22 +159,22 @@ ftp_proxy_entry_add_nat(struct ftp_proxy if (fpn == NULL) return (-1); - memcpy(fpn-ipn, ipn, sizeof(fpn-ipn)); + memcpy(fpn-ipn, ipn, sizeof(fpn-ipn)); LIST_INSERT_HEAD(fpe-nat_entries, fpn, link); return (0); } static int -ipfilter_add_nat(ipnat_t ipn) +ipfilter_add_nat(ipnat_t *ipn) { ipfobj_t obj; memset(obj, 0, sizeof(obj)); obj.ipfo_rev = IPFILTER_VERSION; - obj.ipfo_size = sizeof(ipn); + obj.ipfo_size = ipn-in_size; obj.ipfo_type = IPFOBJ_IPNAT; - obj.ipfo_ptr = ipn; + obj.ipfo_ptr = ipn; return ioctl(natfd, SIOCADNAT, obj); } @@ -224,7 +224,7 @@ ipf_add_rdr(u_int32_t id, struct sockadd u_int16_t d_port, struct sockaddr *rdr, u_int16_t rdr_port) { struct ftp_proxy_entry *fpe = ftp_proxy_entry_find(id); - ipnat_t ipn; + ipnat_t *ipn; if (fpe == NULL) { errno = ENOENT; @@ -237,98 +237,48 @@ ipf_add_rdr(u_int32_t id, struct sockadd return (-1); } - memset(ipn, 0, sizeof(ipn)); - ipn.in_redir = NAT_REDIRECT; - ipn.in_v = 4; - ipn.in_outip = satosin(dst)-sin_addr.s_addr; - ipn.in_outmsk = 0x; - strlcpy(ipn.in_ifnames[0], netif, sizeof(ipn.in_ifnames[0])); - strlcpy(ipn.in_ifnames[1], netif, sizeof(ipn.in_ifnames[1])); - ipn.in_pmin = htons(d_port); - ipn.in_pmax = htons(d_port); - ipn.in_inip = satosin(rdr)-sin_addr.s_addr; - ipn.in_inmsk = 0x; - ipn.in_pnext = htons(rdr_port); - ipn.in_flags = IPN_FIXEDDPORT | IPN_TCP; - strlcpy(ipn.in_tag.ipt_tag, fpe-proxy_tag, sizeof(ipn.in_tag.ipt_tag)); - - if (ipfilter_add_nat(ipn) == -1) + ipn = calloc(1, sizeof(*ipn) + 2 * IF_NAMESIZE + 2); + if (ipn == NULL) { + errno = ENOMEM; return (-1); + } + ipn-in_redir = NAT_REDIRECT; + ipn-in_v[0] = 4; + ipn-in_v[1] = 4; + ipn-in_odstaddr = satosin(dst)-sin_addr.s_addr; + ipn-in_odstmsk = 0x; + ipn-in_odport = htons(d_port); + ipn-in_dtop = htons(d_port); + ipn-in_ndstaddr = satosin(rdr)-sin_addr.s_addr; + ipn-in_ndstmsk = 0x; + ipn-in_dpnext = htons(rdr_port); + ipn-in_flags = IPN_FIXEDDPORT | IPN_TCP; + strlcpy(ipn-in_tag.ipt_tag, fpe-proxy_tag, + sizeof(ipn-in_tag.ipt_tag)); + + ipn-in_ifnames[0] = 0; + (void) strlcpy(ipn-in_names, netif, IF_NAMESIZE); + ipn-in_namelen = strlen(ipn-in_names) + 1; + ipn-in_ifnames[1] = ipn-in_namelen; + (void) strlcpy(ipn-in_names + ipn-in_namelen, netif, IF_NAMESIZE); + ipn-in_namelen += strlen(ipn-in_names + ipn-in_ifnames[1]) + 1; + ipn-in_size = sizeof(*ipn) + ipn-in_namelen; - if (ftp_proxy_entry_add_nat(fpe, ipn) == -1) + if (ipfilter_add_nat(ipn) == -1) { + free(ipn); return (-1); + } - fpe-status = 1; - - return (0); -} - -#if 0 -int -ipf_add_rdr(u_int32_t id, struct sockaddr *src, struct sockaddr *dst, -u_int16_t d_port, struct sockaddr *rdr, u_int16_t rdr_port) -{ - u_32_t sum1, sum2, sumd; - int onoff, error; - nat_save_t ns; - ipfobj_t obj; - nat_t *nat; - - if (!src || !dst || !d_port || !rdr || !rdr_port || - (src-sa_family != rdr-sa_family)) { - errno = EINVAL; + if (ftp_proxy_entry_add_nat(fpe, ipn) == -1) { + free(ipn); return (-1); } - memset(ns, 0, sizeof(ns)); - - nat = ns.ipn_nat; - nat-nat_p = IPPROTO_TCP; - nat-nat_dir = NAT_OUTBOUND; - nat-nat_redir = NAT_REDIRECT; - strlcpy(nat-nat_ifnames[0], netif, sizeof(nat-nat_ifnames[0])); - strlcpy(nat-nat_ifnames[1], netif, sizeof(nat-nat_ifnames[1])); - - nat-nat_inip = satosin(rdr)-sin_addr; - nat-nat_outip = satosin(dst)-sin_addr; - nat-nat_oip = satosin(src)-sin_addr; - - sum1 = LONG_SUM(ntohl(nat-nat_inip.s_addr)) + rdr_port; - sum2 = LONG_SUM(ntohl(nat-nat_outip.s_addr)) + d_port; - CALC_SUMD(sum1, sum2, sumd); - nat-nat_sumd[0] = (sumd 0x) + (sumd 16); - nat-nat_sumd[1] = nat-nat_sumd[0]; - - sum1 = LONG_SUM(ntohl(nat-nat_inip.s_addr)); - sum2 = LONG_SUM(ntohl(nat-nat_outip.s_addr)); - CALC_SUMD(sum1, sum2, sumd); -
CVS commit: src/libexec/identd
Module Name:src Committed By: plunky Date: Sat Sep 15 17:45:35 UTC 2012 Modified Files: src/libexec/identd: Makefile Log Message: does not need -I${NETBSDSRCDIR}/sys/dist/ipf here, the files are installed in /usr/include/netinet To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/libexec/identd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/identd/Makefile diff -u src/libexec/identd/Makefile:1.12 src/libexec/identd/Makefile:1.13 --- src/libexec/identd/Makefile:1.12 Mon Mar 16 02:24:56 2009 +++ src/libexec/identd/Makefile Sat Sep 15 17:45:35 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2009/03/16 02:24:56 lukem Exp $ +# $NetBSD: Makefile,v 1.13 2012/09/15 17:45:35 plunky Exp $ .include bsd.own.mk @@ -9,7 +9,7 @@ MAN= identd.8 # Build with IP Filter support? .if (${MKIPFILTER} != no) SRCS+= ipf.c -CPPFLAGS+=-I${NETBSDSRCDIR}/sys/dist/ipf -DWITH_IPF +CPPFLAGS+=-DWITH_IPF .endif # Build with pf support?
CVS commit: src/usr.sbin/pf/ftp-proxy
Module Name:src Committed By: plunky Date: Sat Sep 15 17:46:25 UTC 2012 Modified Files: src/usr.sbin/pf/ftp-proxy: Makefile Log Message: does not need -I${NETBSDSRCDIR}/sys/dist/ipf here, the include files are installed in /usr/include/netinet To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/pf/ftp-proxy/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/pf/ftp-proxy/Makefile diff -u src/usr.sbin/pf/ftp-proxy/Makefile:1.6 src/usr.sbin/pf/ftp-proxy/Makefile:1.7 --- src/usr.sbin/pf/ftp-proxy/Makefile:1.6 Fri Feb 4 00:19:52 2011 +++ src/usr.sbin/pf/ftp-proxy/Makefile Sat Sep 15 17:46:25 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2011/02/04 00:19:52 rmind Exp $ +# $NetBSD: Makefile,v 1.7 2012/09/15 17:46:25 plunky Exp $ # $OpenBSD: Makefile,v 1.3 2006/11/26 11:31:13 deraadt Exp $ PROG= ftp-proxy @@ -23,7 +23,7 @@ LDADD+= -lnpf -lprop # IP Filter support .if (${MKIPFILTER} != no) SRCS+= ipf.c -CPPFLAGS+=-I${NETBSDSRCDIR}/sys/dist/ipf -DWITH_IPF +CPPFLAGS+=-DWITH_IPF .endif BINDIR= /usr/sbin
CVS commit: src/external/bsd/wpa/dist/src
Module Name:src Committed By: plunky Date: Sat Sep 15 18:37:28 UTC 2012 Modified Files: src/external/bsd/wpa/dist/src/drivers: driver_test.c src/external/bsd/wpa/dist/src/utils: eloop.c trace.h Log Message: WPA_TRACE_REF() provides optional content, potentially leaving an extra semicolon within the struct declarator list. This is not permitted according to C99 6.7.2.1 Structure and union specifiers, so instead have the macro provide the semicolon as required. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/wpa/dist/src/drivers/driver_test.c cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/wpa/dist/src/utils/eloop.c cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/wpa/dist/src/utils/trace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/wpa/dist/src/drivers/driver_test.c diff -u src/external/bsd/wpa/dist/src/drivers/driver_test.c:1.1.1.1 src/external/bsd/wpa/dist/src/drivers/driver_test.c:1.2 --- src/external/bsd/wpa/dist/src/drivers/driver_test.c:1.1.1.1 Wed Aug 4 10:21:50 2010 +++ src/external/bsd/wpa/dist/src/drivers/driver_test.c Sat Sep 15 18:37:27 2012 @@ -70,7 +70,7 @@ struct wpa_driver_test_global { struct wpa_driver_test_data { struct wpa_driver_test_global *global; void *ctx; - WPA_TRACE_REF(ctx); + WPA_TRACE_REF(ctx) u8 own_addr[ETH_ALEN]; int test_socket; #ifdef DRIVER_TEST_UNIX Index: src/external/bsd/wpa/dist/src/utils/eloop.c diff -u src/external/bsd/wpa/dist/src/utils/eloop.c:1.1.1.2 src/external/bsd/wpa/dist/src/utils/eloop.c:1.2 --- src/external/bsd/wpa/dist/src/utils/eloop.c:1.1.1.2 Sat Sep 10 20:54:05 2011 +++ src/external/bsd/wpa/dist/src/utils/eloop.c Sat Sep 15 18:37:28 2012 @@ -25,8 +25,8 @@ struct eloop_sock { void *eloop_data; void *user_data; eloop_sock_handler handler; - WPA_TRACE_REF(eloop); - WPA_TRACE_REF(user); + WPA_TRACE_REF(eloop) + WPA_TRACE_REF(user) WPA_TRACE_INFO }; @@ -36,8 +36,8 @@ struct eloop_timeout { void *eloop_data; void *user_data; eloop_timeout_handler handler; - WPA_TRACE_REF(eloop); - WPA_TRACE_REF(user); + WPA_TRACE_REF(eloop) + WPA_TRACE_REF(user) WPA_TRACE_INFO }; Index: src/external/bsd/wpa/dist/src/utils/trace.h diff -u src/external/bsd/wpa/dist/src/utils/trace.h:1.1.1.1 src/external/bsd/wpa/dist/src/utils/trace.h:1.2 --- src/external/bsd/wpa/dist/src/utils/trace.h:1.1.1.1 Wed Aug 4 10:18:41 2010 +++ src/external/bsd/wpa/dist/src/utils/trace.h Sat Sep 15 18:37:28 2012 @@ -29,7 +29,7 @@ struct wpa_trace_ref { const void *addr; WPA_TRACE_INFO }; -#define WPA_TRACE_REF(name) struct wpa_trace_ref wpa_trace_ref_##name +#define WPA_TRACE_REF(name) struct wpa_trace_ref wpa_trace_ref_##name; #define wpa_trace_dump(title, ptr) \ wpa_trace_dump_func((title), (ptr)-btrace, (ptr)-btrace_num)
CVS commit: src/sys/dev
Module Name:src Committed By: plunky Date: Mon Apr 9 10:18:17 UTC 2012 Modified Files: src/sys/dev: midi.c midi_if.h midisyn.c midisynvar.h sequencer.c src/sys/dev/ic: opl.c oplvar.h src/sys/dev/isa: cms.c midi_pcppi.c opl_ess.c opl_isa.c opl_sb.c opl_wss.c opl_ym.c src/sys/dev/pci: opl_cmpci.c opl_eso.c opl_fms.c opl_sv.c opl_yds.c Log Message: Tidy up a little, the way that midi attachment code works - change midi_attach() to omit the 'parent' arg (there are only two callers of this and it is not used) - change midisyn_attach() to midisyn_init(), so not needing a midi_softc, and fix the midi_pcppi driver to set hw_if and hw_hdl directly in its midi_softc before calling midi_attach() - add a device_t to opl_softc structure, change opl drivers to store the device 'self' in opl_softc and fix opl_attach() to use this opl_softc-dev field directly rather than a field in an otherwise unused midi_softc - remove unnecessary midi_softc from opl and cms drivers (child device provides that) reviewed by mrg To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/midi.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/midi_if.h cvs rdiff -u -r1.23 -r1.24 src/sys/dev/midisyn.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/midisynvar.h cvs rdiff -u -r1.54 -r1.55 src/sys/dev/sequencer.c cvs rdiff -u -r1.38 -r1.39 src/sys/dev/ic/opl.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/ic/oplvar.h cvs rdiff -u -r1.20 -r1.21 src/sys/dev/isa/cms.c src/sys/dev/isa/opl_isa.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/isa/midi_pcppi.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/isa/opl_ess.c src/sys/dev/isa/opl_ym.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/isa/opl_sb.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/isa/opl_wss.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/opl_cmpci.c \ src/sys/dev/pci/opl_fms.c src/sys/dev/pci/opl_yds.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/opl_eso.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/opl_sv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/midi.c diff -u src/sys/dev/midi.c:1.77 src/sys/dev/midi.c:1.78 --- src/sys/dev/midi.c:1.77 Thu Apr 5 20:25:53 2012 +++ src/sys/dev/midi.c Mon Apr 9 10:18:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.77 2012/04/05 20:25:53 plunky Exp $ */ +/* $NetBSD: midi.c,v 1.78 2012/04/09 10:18:16 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.77 2012/04/05 20:25:53 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.78 2012/04/09 10:18:16 plunky Exp $); #include midi.h #include sequencer.h @@ -137,13 +137,11 @@ midiprobe(device_t parent, cfdata_t matc static void midiattach(device_t parent, device_t self, void *aux) { - struct midi_softc *sc; - struct audio_attach_args *sa; + struct midi_softc *sc = device_private(self); + struct audio_attach_args *sa = aux; const struct midi_hw_if *hwp; void *hdlp; - sc = device_private(self); - sa = aux; hwp = sa-hwif; hdlp = sa-hdl; @@ -165,7 +163,7 @@ midiattach(device_t parent, device_t sel sc-dev = self; sc-hw_if = hwp; sc-hw_hdl = hdlp; - midi_attach(sc, parent); + midi_attach(sc); } static int @@ -235,7 +233,7 @@ mididetach(device_t self, int flags) } void -midi_attach(struct midi_softc *sc, device_t parent) +midi_attach(struct midi_softc *sc) { struct midi_info mi; kmutex_t *dummy; @@ -1769,8 +1767,6 @@ midi_register_hw_if_ext(struct midi_hw_i #if NMIDI 0 || NMIDIBUS 0 -int audioprint(void *, const char *); - device_t midi_attach_mi(const struct midi_hw_if *mhwp, void *hdlp, device_t dev) { Index: src/sys/dev/midi_if.h diff -u src/sys/dev/midi_if.h:1.24 src/sys/dev/midi_if.h:1.25 --- src/sys/dev/midi_if.h:1.24 Thu Nov 24 21:59:35 2011 +++ src/sys/dev/midi_if.h Mon Apr 9 10:18:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: midi_if.h,v 1.24 2011/11/24 21:59:35 mrg Exp $ */ +/* $NetBSD: midi_if.h,v 1.25 2012/04/09 10:18:16 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -102,7 +102,7 @@ struct midi_hw_if_ext { }; void midi_register_hw_if_ext(struct midi_hw_if_ext *); -void midi_attach(struct midi_softc *, device_t); +void midi_attach(struct midi_softc *); int mididetach(device_t, int); device_t midi_attach_mi(const struct midi_hw_if *, void *, device_t); Index: src/sys/dev/midisyn.c diff -u src/sys/dev/midisyn.c:1.23 src/sys/dev/midisyn.c:1.24 --- src/sys/dev/midisyn.c:1.23 Wed Nov 23 23:07:31 2011 +++ src/sys/dev/midisyn.c Mon Apr 9 10:18:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: midisyn.c,v 1.23 2011/11/23 23:07:31 jmcneill Exp $ */ +/* $NetBSD: midisyn.c,v 1.24 2012/04/09 10:18:16 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: midisyn.c,v 1.23 2011/11/23
CVS commit: src/sys/dev/isa
Module Name:src Committed By: plunky Date: Fri Apr 6 20:16:59 UTC 2012 Modified Files: src/sys/dev/isa: spkr.c Log Message: device_pmf_is_registered() is not required To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/dev/isa/spkr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/isa/spkr.c diff -u src/sys/dev/isa/spkr.c:1.32 src/sys/dev/isa/spkr.c:1.33 --- src/sys/dev/isa/spkr.c:1.32 Wed Feb 1 02:01:28 2012 +++ src/sys/dev/isa/spkr.c Fri Apr 6 20:16:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: spkr.c,v 1.32 2012/02/01 02:01:28 matt Exp $ */ +/* $NetBSD: spkr.c,v 1.33 2012/04/06 20:16:58 plunky Exp $ */ /* * Copyright (c) 1990 Eric S. Raymond (e...@snark.thyrsus.com) @@ -43,7 +43,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: spkr.c,v 1.32 2012/02/01 02:01:28 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: spkr.c,v 1.33 2012/04/06 20:16:58 plunky Exp $); #include sys/param.h #include sys/systm.h @@ -409,10 +409,8 @@ spkrattach(device_t parent, device_t sel printf(\n); ppicookie = ((struct pcppi_attach_args *)aux)-pa_cookie; spkr_attached = 1; -if (!device_pmf_is_registered(self) - !pmf_device_register(self, NULL, NULL)) + if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, couldn't establish power handler\n); - } int
CVS commit: src/sys/dev/pci
Module Name:src Committed By: plunky Date: Fri Apr 6 20:24:29 UTC 2012 Modified Files: src/sys/dev/pci: agp.c Log Message: device_pmf_is_registered() is not required To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/dev/pci/agp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp.c diff -u src/sys/dev/pci/agp.c:1.79 src/sys/dev/pci/agp.c:1.80 --- src/sys/dev/pci/agp.c:1.79 Mon Apr 4 20:37:56 2011 +++ src/sys/dev/pci/agp.c Fri Apr 6 20:24:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: agp.c,v 1.79 2011/04/04 20:37:56 dyoung Exp $ */ +/* $NetBSD: agp.c,v 1.80 2012/04/06 20:24:28 plunky Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -65,7 +65,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp.c,v 1.79 2011/04/04 20:37:56 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: agp.c,v 1.80 2012/04/06 20:24:28 plunky Exp $); #include sys/param.h #include sys/systm.h @@ -374,11 +374,8 @@ agpattach(device_t parent, device_t self else sc-as_chipc = NULL; - if (!device_pmf_is_registered(self)) { - if (!pmf_device_register(self, NULL, agp_resume)) - aprint_error_dev(self, couldn't establish power - handler\n); - } + if (!pmf_device_register(self, NULL, agp_resume)) + aprint_error_dev(self, couldn't establish power handler\n); } CFATTACH_DECL_NEW(agp, sizeof(struct agp_softc),
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: plunky Date: Fri Apr 6 20:38:52 UTC 2012 Modified Files: src/sys/arch/x86/pci: pcib.c Log Message: device_pmf_is_registered() is not required To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/x86/pci/pcib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/pcib.c diff -u src/sys/arch/x86/pci/pcib.c:1.14 src/sys/arch/x86/pci/pcib.c:1.15 --- src/sys/arch/x86/pci/pcib.c:1.14 Mon Jan 30 19:41:18 2012 +++ src/sys/arch/x86/pci/pcib.c Fri Apr 6 20:38:52 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pcib.c,v 1.14 2012/01/30 19:41:18 drochner Exp $ */ +/* $NetBSD: pcib.c,v 1.15 2012/04/06 20:38:52 plunky Exp $ */ /*- * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pcib.c,v 1.14 2012/01/30 19:41:18 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: pcib.c,v 1.15 2012/04/06 20:38:52 plunky Exp $); #include sys/types.h #include sys/param.h @@ -195,13 +195,8 @@ pcibattach(device_t parent, device_t sel sc-sc_pc = pa-pa_pc; sc-sc_tag = pa-pa_tag; - /* If a more specific pcib implementation has already registered a - * power handler, don't overwrite it. - */ - if (!device_pmf_is_registered(self)) { - if (!pmf_device_register(self, NULL, NULL)) - aprint_error_dev(self, couldn't establish power handler\n); - } + if (!pmf_device_register(self, NULL, NULL)) + aprint_error_dev(self, couldn't establish power handler\n); config_defer(self, pcib_callback); }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: plunky Date: Thu Apr 5 16:31:53 UTC 2012 Modified Files: src/sys/dev/usb: if_cdce.c ubt.c uhso.c Log Message: no need to device_pmf_is_registered() before unregister To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.45 -r1.46 src/sys/dev/usb/ubt.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/uhso.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_cdce.c diff -u src/sys/dev/usb/if_cdce.c:1.36 src/sys/dev/usb/if_cdce.c:1.37 --- src/sys/dev/usb/if_cdce.c:1.36 Fri Feb 24 06:48:24 2012 +++ src/sys/dev/usb/if_cdce.c Thu Apr 5 16:31:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cdce.c,v 1.36 2012/02/24 06:48:24 mrg Exp $ */ +/* $NetBSD: if_cdce.c,v 1.37 2012/04/05 16:31:53 plunky Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul wp...@windriver.com @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_cdce.c,v 1.36 2012/02/24 06:48:24 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: if_cdce.c,v 1.37 2012/04/05 16:31:53 plunky Exp $); #if defined(_KERNEL_OPT) #include opt_inet.h @@ -309,8 +309,7 @@ cdce_detach(device_t self, int flags) struct ifnet *ifp = GET_IFP(sc); int s; - if (device_pmf_is_registered(self)) - pmf_device_deregister(self); + pmf_device_deregister(self); s = splusb(); Index: src/sys/dev/usb/ubt.c diff -u src/sys/dev/usb/ubt.c:1.45 src/sys/dev/usb/ubt.c:1.46 --- src/sys/dev/usb/ubt.c:1.45 Tue Mar 6 03:35:29 2012 +++ src/sys/dev/usb/ubt.c Thu Apr 5 16:31:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ubt.c,v 1.45 2012/03/06 03:35:29 mrg Exp $ */ +/* $NetBSD: ubt.c,v 1.46 2012/04/05 16:31:53 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ubt.c,v 1.45 2012/03/06 03:35:29 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: ubt.c,v 1.46 2012/04/05 16:31:53 plunky Exp $); #include sys/param.h #include sys/device.h @@ -533,8 +533,10 @@ ubt_attach(device_t parent, device_t sel } sc-sc_ok = 1; + if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, couldn't establish power handler\n); + return; } @@ -546,8 +548,7 @@ ubt_detach(device_t self, int flags) DPRINTF(sc=%p flags=%d\n, sc, flags); - if (device_pmf_is_registered(self)) - pmf_device_deregister(self); + pmf_device_deregister(self); sc-sc_dying = 1; Index: src/sys/dev/usb/uhso.c diff -u src/sys/dev/usb/uhso.c:1.8 src/sys/dev/usb/uhso.c:1.9 --- src/sys/dev/usb/uhso.c:1.8 Tue Mar 6 03:35:29 2012 +++ src/sys/dev/usb/uhso.c Thu Apr 5 16:31:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uhso.c,v 1.8 2012/03/06 03:35:29 mrg Exp $ */ +/* $NetBSD: uhso.c,v 1.9 2012/04/05 16:31:53 plunky Exp $ */ /*- * Copyright (c) 2009 Iain Hibbert @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uhso.c,v 1.8 2012/03/06 03:35:29 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: uhso.c,v 1.9 2012/04/05 16:31:53 plunky Exp $); #include opt_inet.h @@ -537,8 +537,7 @@ uhso_detach(device_t self, int flags) unsigned int i; int s; - if (device_pmf_is_registered(self)) - pmf_device_deregister(self); + pmf_device_deregister(self); for (i = 0; i UHSO_PORT_MAX; i++) { hp = sc-sc_port[i];
CVS commit: src/sys/dev
Module Name:src Committed By: plunky Date: Thu Apr 5 20:13:35 UTC 2012 Modified Files: src/sys/dev: midi.c src/sys/dev/isa: midi_pcppi.c Log Message: move the pmf_device_register() for midi.c and midi_pcppi.c to midi_attach() for symmetry, since it is removed in midi detach code and don't need to call device_pmf_is_registered() before registering it To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/dev/midi.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/isa/midi_pcppi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/midi.c diff -u src/sys/dev/midi.c:1.75 src/sys/dev/midi.c:1.76 --- src/sys/dev/midi.c:1.75 Tue Jan 10 17:53:51 2012 +++ src/sys/dev/midi.c Thu Apr 5 20:13:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.75 2012/01/10 17:53:51 njoly Exp $ */ +/* $NetBSD: midi.c,v 1.76 2012/04/05 20:13:34 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.75 2012/01/10 17:53:51 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.76 2012/04/05 20:13:34 plunky Exp $); #include midi.h #include sequencer.h @@ -166,10 +166,6 @@ midiattach(device_t parent, device_t sel sc-hw_if = hwp; sc-hw_hdl = hdlp; midi_attach(sc, parent); -if (!device_pmf_is_registered(self)) - if (!pmf_device_register(self, NULL, NULL)) - aprint_error_dev(self, - couldn't establish power handler\n); } static int @@ -296,6 +292,9 @@ midi_attach(struct midi_softc *sc, devic aprint_naive(\n); aprint_normal(: %s\n, mi.name); + + if (!pmf_device_register(sc-dev, NULL, NULL)) + aprint_error_dev(sc-dev, couldn't establish power handler\n); } void Index: src/sys/dev/isa/midi_pcppi.c diff -u src/sys/dev/isa/midi_pcppi.c:1.24 src/sys/dev/isa/midi_pcppi.c:1.25 --- src/sys/dev/isa/midi_pcppi.c:1.24 Wed Nov 23 23:07:32 2011 +++ src/sys/dev/isa/midi_pcppi.c Thu Apr 5 20:13:35 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: midi_pcppi.c,v 1.24 2011/11/23 23:07:32 jmcneill Exp $ */ +/* $NetBSD: midi_pcppi.c,v 1.25 2012/04/05 20:13:35 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: midi_pcppi.c,v 1.24 2011/11/23 23:07:32 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: midi_pcppi.c,v 1.25 2012/04/05 20:13:35 plunky Exp $); #include sys/param.h #include sys/systm.h @@ -106,10 +106,6 @@ midi_pcppi_attach(device_t parent, devic midisyn_attach(sc-sc_mididev, ms); midi_attach(sc-sc_mididev, parent); -if (!device_pmf_is_registered(self)) - if (!pmf_device_register(self, NULL, NULL)) - aprint_error_dev(self, - couldn't establish power handler\n); } static int
CVS commit: src/sys/dev
Module Name:src Committed By: plunky Date: Thu Apr 5 20:25:53 UTC 2012 Modified Files: src/sys/dev: midi.c midivar.h Log Message: midi_attach() does not actually ever use the parent device pointer, so no need to store it in sc_dev. Further, remove the sc_dev field entirely since it is easily confused with the dev field, which is the 'self' device pointer. Fix the comment. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/midi.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/midivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/midi.c diff -u src/sys/dev/midi.c:1.76 src/sys/dev/midi.c:1.77 --- src/sys/dev/midi.c:1.76 Thu Apr 5 20:13:34 2012 +++ src/sys/dev/midi.c Thu Apr 5 20:25:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.76 2012/04/05 20:13:34 plunky Exp $ */ +/* $NetBSD: midi.c,v 1.77 2012/04/05 20:25:53 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.76 2012/04/05 20:13:34 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: midi.c,v 1.77 2012/04/05 20:25:53 plunky Exp $); #include midi.h #include sequencer.h @@ -261,7 +261,6 @@ midi_attach(struct midi_softc *sc, devic sc-dying = 0; sc-isopen = 0; - sc-sc_dev = parent; mutex_enter(hwif_softc_lock); mutex_enter(sc-lock); Index: src/sys/dev/midivar.h diff -u src/sys/dev/midivar.h:1.18 src/sys/dev/midivar.h:1.19 --- src/sys/dev/midivar.h:1.18 Wed Nov 23 23:07:31 2011 +++ src/sys/dev/midivar.h Thu Apr 5 20:25:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: midivar.h,v 1.18 2011/11/23 23:07:31 jmcneill Exp $ */ +/* $NetBSD: midivar.h,v 1.19 2012/04/05 20:25:53 plunky Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -179,11 +179,10 @@ struct midi_state { }; struct midi_softc { - device_t dev; + device_t dev; /* Hardware device struct */ void *hw_hdl; /* Hardware driver handle */ const struct midi_hw_if *hw_if; /* Hardware interface */ const struct midi_hw_if_ext *hw_if_ext; /* see midi_if.h */ - device_t sc_dev; /* Hardware device struct */ int isopen; /* Open indicator */ int flags; /* Open flags */ int dying;
CVS commit: src/sys/dev/bluetooth
Module Name:src Committed By: plunky Date: Tue Apr 3 09:32:54 UTC 2012 Modified Files: src/sys/dev/bluetooth: bthidev.c bthub.c btkbd.c btmagic.c btms.c btsco.c Log Message: register/deregister pmf(9) NULL handlers for bthub(4) and bluetooth devices which attach there, to fix PR/39006 To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/bluetooth/bthidev.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/bluetooth/bthub.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/bluetooth/btkbd.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/bluetooth/btmagic.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/bluetooth/btms.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/bluetooth/btsco.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/bluetooth/bthidev.c diff -u src/sys/dev/bluetooth/bthidev.c:1.21 src/sys/dev/bluetooth/bthidev.c:1.22 --- src/sys/dev/bluetooth/bthidev.c:1.21 Wed Jan 11 17:27:45 2012 +++ src/sys/dev/bluetooth/bthidev.c Tue Apr 3 09:32:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bthidev.c,v 1.21 2012/01/11 17:27:45 plunky Exp $ */ +/* $NetBSD: bthidev.c,v 1.22 2012/04/03 09:32:53 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bthidev.c,v 1.21 2012/01/11 17:27:45 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: bthidev.c,v 1.22 2012/04/03 09:32:53 plunky Exp $); #include sys/param.h #include sys/condvar.h @@ -330,6 +330,8 @@ bthidev_attach(device_t parent, device_t } } + pmf_device_register(self, NULL, NULL); + /* * start bluetooth connections */ @@ -382,6 +384,8 @@ bthidev_detach(device_t self, int flags) mutex_exit(bt_lock); + pmf_device_deregister(self); + /* kill off the input processor */ if (sc-sc_lwp != NULL) { mutex_enter(sc-sc_lock); Index: src/sys/dev/bluetooth/bthub.c diff -u src/sys/dev/bluetooth/bthub.c:1.17 src/sys/dev/bluetooth/bthub.c:1.18 --- src/sys/dev/bluetooth/bthub.c:1.17 Sun Jul 31 13:51:53 2011 +++ src/sys/dev/bluetooth/bthub.c Tue Apr 3 09:32:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bthub.c,v 1.17 2011/07/31 13:51:53 uebayasi Exp $ */ +/* $NetBSD: bthub.c,v 1.18 2012/04/03 09:32:53 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bthub.c,v 1.17 2011/07/31 13:51:53 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: bthub.c,v 1.18 2012/04/03 09:32:53 plunky Exp $); #include sys/param.h #include sys/conf.h @@ -110,12 +110,16 @@ bthub_attach(device_t parent, device_t s addr-b[2], addr-b[1], addr-b[0]); aprint_normal(\n); + + pmf_device_register(self, NULL, NULL); } static int bthub_detach(device_t self, int flags) { + pmf_device_deregister(self); + return config_detach_children(self, flags); } Index: src/sys/dev/bluetooth/btkbd.c diff -u src/sys/dev/bluetooth/btkbd.c:1.13 src/sys/dev/bluetooth/btkbd.c:1.14 --- src/sys/dev/bluetooth/btkbd.c:1.13 Wed Jan 11 17:27:45 2012 +++ src/sys/dev/bluetooth/btkbd.c Tue Apr 3 09:32:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: btkbd.c,v 1.13 2012/01/11 17:27:45 plunky Exp $ */ +/* $NetBSD: btkbd.c,v 1.14 2012/04/03 09:32:53 plunky Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: btkbd.c,v 1.13 2012/01/11 17:27:45 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: btkbd.c,v 1.14 2012/04/03 09:32:53 plunky Exp $); #include sys/param.h #include sys/callout.h @@ -237,6 +237,8 @@ btkbd_attach(device_t parent, device_t s wska.accesscookie = sc; sc-sc_wskbd = config_found(self, wska, wskbddevprint); + + pmf_device_register(self, NULL, NULL); } static int @@ -245,6 +247,8 @@ btkbd_detach(device_t self, int flags) struct btkbd_softc *sc = device_private(self); int err = 0; + pmf_device_deregister(self); + #ifdef WSDISPLAY_COMPAT_RAWKBD #ifdef BTKBD_REPEAT callout_stop(sc-sc_repeat); Index: src/sys/dev/bluetooth/btmagic.c diff -u src/sys/dev/bluetooth/btmagic.c:1.1 src/sys/dev/bluetooth/btmagic.c:1.2 --- src/sys/dev/bluetooth/btmagic.c:1.1 Sat May 22 18:56:01 2010 +++ src/sys/dev/bluetooth/btmagic.c Tue Apr 3 09:32:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: btmagic.c,v 1.1 2010/05/22 18:56:01 plunky Exp $ */ +/* $NetBSD: btmagic.c,v 1.2 2012/04/03 09:32:53 plunky Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -85,7 +85,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: btmagic.c,v 1.1 2010/05/22 18:56:01 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: btmagic.c,v 1.2 2012/04/03 09:32:53 plunky Exp $); #include sys/param.h #include sys/conf.h @@ -385,6 +385,8 @@ btmagic_attach(device_t parent, device_t return; } + pmf_device_register(self, NULL, NULL); + /* * start bluetooth connections */ @@ -433,6 +435,8 @@
CVS commit: src/share/man/man9
Module Name:src Committed By: plunky Date: Mon Apr 2 09:56:58 UTC 2012 Modified Files: src/share/man/man9: pmf.9 Log Message: language improvement To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/share/man/man9/pmf.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pmf.9 diff -u src/share/man/man9/pmf.9:1.19 src/share/man/man9/pmf.9:1.20 --- src/share/man/man9/pmf.9:1.19 Thu Dec 2 12:54:13 2010 +++ src/share/man/man9/pmf.9 Mon Apr 2 09:56:58 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: pmf.9,v 1.19 2010/12/02 12:54:13 wiz Exp $ +.\ $NetBSD: pmf.9,v 1.20 2012/04/02 09:56:58 plunky Exp $ .\ .\ Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca .\ All rights reserved. @@ -24,7 +24,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd February 25, 2010 +.Dd April 2, 2012 .Dt PMF 9 .Os .Sh NAME @@ -138,14 +138,16 @@ The following message types are defined: .Bl -tag -width compact .It Fn pmf_device_register dev suspend resume Register a device with the power management framework. +The .Fa suspend and .Fa resume -are passed +functions are passed .Fa dev and a -.Fa pmf_qual_t ; -they return +.Fa pmf_qual_t , +and will be called when the system state changes; +they should return .Dv true on success and .Dv false
CVS commit: src/doc
Module Name:src Committed By: plunky Date: Tue Mar 27 07:07:47 UTC 2012 Modified Files: src/doc: CHANGES Log Message: note pcc upgrade To generate a diff of this commit: cvs rdiff -u -r1.1690 -r1.1691 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1690 src/doc/CHANGES:1.1691 --- src/doc/CHANGES:1.1690 Mon Mar 26 14:50:12 2012 +++ src/doc/CHANGES Tue Mar 27 07:07:46 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1690 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1691 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -37,4 +37,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: urtwn(4): Add a driver for Realtek RTL8188CU/RTL8192CU USB IEEE 802.11b/g/n wireless network device, ported from OpenBSD. [nonaka 20120325] + pcc: upgrade to 1.1.0.DEVEL 20120325 [plunky 20120325] openresolv(8): Import openresolv-3.5.0 [roy 20120326]
CVS commit: src/doc
Module Name:src Committed By: plunky Date: Tue Mar 27 07:09:03 UTC 2012 Modified Files: src/doc: 3RDPARTY Log Message: add details of pcc To generate a diff of this commit: cvs rdiff -u -r1.925 -r1.926 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.925 src/doc/3RDPARTY:1.926 --- src/doc/3RDPARTY:1.925 Mon Mar 26 14:50:12 2012 +++ src/doc/3RDPARTY Tue Mar 27 07:09:03 2012 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.925 2012/03/26 14:50:12 roy Exp $ +# $NetBSD: 3RDPARTY,v 1.926 2012/03/27 07:09:03 plunky Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -873,6 +873,21 @@ Notes: - run make in /usr/src/crypto/external/bsd/openssl/lib/libcrypto/man to regen man pages. +Package: pcc +Version: 1.1.0.DEVEL 20120325 +Current Vers: 1.1.0.DEVEL 20120325 +Maintainer: Anders Magnusson ra...@netbsd.org +Archive Site: ftp://pcc.ludd.ltu.se/pub/pcc/ +Home Page: http://pcc.ludd.ltu.se/ +Mailing List: pcc-l...@ludd.ltu.se +Responsible: plunky +License: BSD +Location: external/bsd/pcc/dist +Notes: +This is a development snapshot. See the src/external/bsd/pcc/prepare-import.sh +file for details about how to get the latest version from the upstream server +and import it. + Package: pdisk Version: 0.8a2 Current Vers: 0.8a2
CVS commit: src/external/bsd/pcc/dist
Module Name:src Committed By: plunky Date: Mon Mar 26 14:27:27 UTC 2012 Update of /cvsroot/src/external/bsd/pcc/dist In directory ivanova.netbsd.org:/tmp/cvs-serv21356 Log Message: Update to pcc-20120325 The full changelog is at http://pcc.ludd.ltu.se/fisheye/changelog/~date=2012-03-25T06%3A00%3A00/pcc and includes some bug and documentation fixes. The siginifcant improvements were that the __returns_twice__ attribute is now accepted, and a problem parsing attributes on parameters of function prototypes was fixed. (both of these issues caused problems compiling with the NetBSD headers) Status: Vendor Tag: ragge Release Tags: pcc-20120325 U src/external/bsd/pcc/dist/pcc/DATESTAMP U src/external/bsd/pcc/dist/pcc/Makefile.in U src/external/bsd/pcc/dist/pcc/config.guess U src/external/bsd/pcc/dist/pcc/config.h.in U src/external/bsd/pcc/dist/pcc/config.sub U src/external/bsd/pcc/dist/pcc/configure U src/external/bsd/pcc/dist/pcc/configure.ac U src/external/bsd/pcc/dist/pcc/install-sh U src/external/bsd/pcc/dist/pcc/arch/amd64/local.c U src/external/bsd/pcc/dist/pcc/arch/amd64/code.c U src/external/bsd/pcc/dist/pcc/arch/amd64/local2.c U src/external/bsd/pcc/dist/pcc/arch/amd64/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/amd64/order.c U src/external/bsd/pcc/dist/pcc/arch/amd64/table.c U src/external/bsd/pcc/dist/pcc/arch/arm/local.c U src/external/bsd/pcc/dist/pcc/arch/arm/code.c U src/external/bsd/pcc/dist/pcc/arch/arm/local2.c U src/external/bsd/pcc/dist/pcc/arch/arm/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/arm/order.c U src/external/bsd/pcc/dist/pcc/arch/arm/table.c U src/external/bsd/pcc/dist/pcc/arch/hppa/local.c U src/external/bsd/pcc/dist/pcc/arch/hppa/code.c U src/external/bsd/pcc/dist/pcc/arch/hppa/local2.c U src/external/bsd/pcc/dist/pcc/arch/hppa/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/hppa/order.c U src/external/bsd/pcc/dist/pcc/arch/hppa/table.c U src/external/bsd/pcc/dist/pcc/arch/i386/flocal.c U src/external/bsd/pcc/dist/pcc/arch/i386/code.c U src/external/bsd/pcc/dist/pcc/arch/i386/local.c U src/external/bsd/pcc/dist/pcc/arch/i386/local2.c U src/external/bsd/pcc/dist/pcc/arch/i386/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/i386/order.c U src/external/bsd/pcc/dist/pcc/arch/i386/table.c U src/external/bsd/pcc/dist/pcc/arch/m16c/local.c U src/external/bsd/pcc/dist/pcc/arch/m16c/TODO U src/external/bsd/pcc/dist/pcc/arch/m16c/code.c U src/external/bsd/pcc/dist/pcc/arch/m16c/local2.c U src/external/bsd/pcc/dist/pcc/arch/m16c/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/m16c/order.c U src/external/bsd/pcc/dist/pcc/arch/m16c/table.c U src/external/bsd/pcc/dist/pcc/arch/mips/local.c U src/external/bsd/pcc/dist/pcc/arch/mips/TODO U src/external/bsd/pcc/dist/pcc/arch/mips/code.c U src/external/bsd/pcc/dist/pcc/arch/mips/local2.c U src/external/bsd/pcc/dist/pcc/arch/mips/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/mips/order.c U src/external/bsd/pcc/dist/pcc/arch/mips/table.c U src/external/bsd/pcc/dist/pcc/arch/nova/local.c U src/external/bsd/pcc/dist/pcc/arch/nova/README U src/external/bsd/pcc/dist/pcc/arch/nova/code.c U src/external/bsd/pcc/dist/pcc/arch/nova/local2.c U src/external/bsd/pcc/dist/pcc/arch/nova/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/nova/order.c U src/external/bsd/pcc/dist/pcc/arch/nova/table.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/local.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/README U src/external/bsd/pcc/dist/pcc/arch/pdp10/code.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/local2.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/pdp10/order.c U src/external/bsd/pcc/dist/pcc/arch/pdp10/table.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/local.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/code.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/local2.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/pdp11/order.c U src/external/bsd/pcc/dist/pcc/arch/pdp11/table.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/local.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/README U src/external/bsd/pcc/dist/pcc/arch/powerpc/code.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/local2.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/powerpc/order.c U src/external/bsd/pcc/dist/pcc/arch/powerpc/table.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/local.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/code.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/local2.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/sparc64/order.c U src/external/bsd/pcc/dist/pcc/arch/sparc64/table.c U src/external/bsd/pcc/dist/pcc/arch/vax/local.c U src/external/bsd/pcc/dist/pcc/arch/vax/code.c U src/external/bsd/pcc/dist/pcc/arch/vax/local2.c U src/external/bsd/pcc/dist/pcc/arch/vax/macdefs.h U src/external/bsd/pcc/dist/pcc/arch/vax/order.c U
CVS commit: src/external/bsd/pcc/dist/pcc
Module Name:src Committed By: plunky Date: Mon Mar 26 14:30:47 UTC 2012 Modified Files: src/external/bsd/pcc/dist/pcc/cc/ccom: ccom.1 gcc_compat.c pass1.h pftn.c src/external/bsd/pcc/dist/pcc/mip: common.c Log Message: resolve merge conflicts To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1 cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c \ src/external/bsd/pcc/dist/pcc/cc/ccom/pass1.h cvs rdiff -u -r1.7 -r1.8 src/external/bsd/pcc/dist/pcc/cc/ccom/pftn.c cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pcc/dist/pcc/mip/common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1 diff -u src/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1:1.5 src/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1:1.6 --- src/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1:1.5 Wed Jan 11 20:46:48 2012 +++ src/external/bsd/pcc/dist/pcc/cc/ccom/ccom.1 Mon Mar 26 14:30:46 2012 @@ -1,5 +1,5 @@ -.\ Id: ccom.1,v 1.24 2011/11/14 16:46:17 plunky Exp -.\ $NetBSD: ccom.1,v 1.5 2012/01/11 20:46:48 plunky Exp $ +.\ Id: ccom.1,v 1.27 2012/03/22 21:09:41 plunky Exp +.\ $NetBSD: ccom.1,v 1.6 2012/03/26 14:30:46 plunky Exp $ .\ .\ Copyright (c) 2007 Jeremy C. Reed r...@reedmedia.net .\ @@ -16,7 +16,7 @@ .\ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF .\ THIS SOFTWARE. .\ -.Dd November 14, 2011 +.Dd March 22, 2012 .Dt CCOM 1 .Os .Sh NAME @@ -222,7 +222,7 @@ Do dead code elimination. Delete redundant jumps and dead code. .It Sy gnu89 .It Sy gnu99 -Use gcc semantics rather than C99 for some things. +Use GNU C semantics rather than C99 for some things. Currently only inline. .It Sy inline Replace calls to functions marked with an inline specifier with a copy @@ -254,6 +254,8 @@ Code printout Trees when entering pass2 .It Sy f Instruction matcher, may provide much output +.It Sy g +Print flow graphs .It Sy n Memory allocation .It Sy o @@ -270,6 +272,167 @@ Sethi-Ullman computations Target-specific flag, used in machine-dependent code .El .El +.Sh PRAGMAS +Input lines starting with a +.Dq #pragma +directive can be used to modify behaviour of +.Nm +during compilation. +All tokens up to the first unescaped newline are considered part +of the pragma command, with the following operations being recognized: +.Bl -tag +.It Sy STDC +Standard C99 operator follows. +Currently no C99 operations are implemented, and any directives starting +with this token will be silently ignored. +.It Sy GCC diagnostic Ar effect Qq Ar option +GNU C compatibility. +Alter the effects of compiler diagnostics. +The required +.Ar effect +should be stated as +.Sy warning , +.Sy error +or +.Sy ignored , +followed by the compiler diagnostic +.Ar option +in double quotes. +For example, to force unknown pragmas to always generate an error, +a standard header might include +.Bd -literal -offset 2n +#pragma GCC diagnostic error -Wunknown-pragmas +.Ed +.It Sy GCC poison Ar identifier ... +GNU C compatibility. +Cause an error if any of the following +.Ar identifier Ns s +subsequently appear in the code +.Pq but not in any macro expansions . +Currently not implemented. +.It Sy GCC visibility +GNU C compatibility. +Currently not implemented. +.It Sy pack Ns Pq Op Ar n +Set the default maximum alignment for structures and unions, such that +members will have their natural alignment requirements clamped at this +value and may be stored misaligned. +If +.Ar n +is not given, the alignment is reset to the target default. +.It Sy pack Ns Pq Sy push Ns Op , Ar n +Push the current pack setting onto an internal stack then, if +.Ar n +is given, change the default alignment for structures and unions. +Currently not implemented. +.It Sy pack Ns Pq Sy pop +Change the pack setting to the most recently pushed value, and remove +that setting from the stack. +Currently not implemented. +.It Sy packed Op Ar n +Set the maximum alignment for the structure or union defined +in the current statement. +If +.Ar n +is not given, the default value of 1 is used. +.Pq Currently this works except Ar n is not used +.It Sy aligned Op Ar n +Set the minimum alignment for the structure or union defined +in the current statement. +.It Sy rename Ar name +Provide an alternative +.Ar name +which will be used to reference the object declared in the current statement. +.It Sy weak Ar name Ns Op = Ns Ar alias +Mark +.Ar name +as a weak rather than a global symbol, to allow its definition to be +overridden at link time. +If an +.Ar alias +is given, this will be used as the default value of +.Ar name. +.It Sy ident +Currently not implemented. +.El +.Lp +and the following target-specific operations are handled by +machine-dependent code: +.Bl -tag +.It Sy tls +For AMD64 and i386 targets, the variable declared in the current statement +will be