CVS commit: [netbsd-9] src/sys/arch/x86
Module Name:src Committed By: martin Date: Mon Oct 10 15:02:51 UTC 2022 Modified Files: src/sys/arch/x86/include [netbsd-9]: i82093reg.h src/sys/arch/x86/x86 [netbsd-9]: ioapic.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1536): sys/arch/x86/x86/ioapic.c: revision 1.66 sys/arch/x86/include/i82093reg.h: revision 1.7 Print detail about misconfigured APIC ID. IOAPIC_ID_MASK is 8 bits these days. Fixes PR kern/54276. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/x86/include/i82093reg.h cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/arch/x86/x86/ioapic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/x86
Module Name:src Committed By: martin Date: Mon Oct 10 15:02:51 UTC 2022 Modified Files: src/sys/arch/x86/include [netbsd-9]: i82093reg.h src/sys/arch/x86/x86 [netbsd-9]: ioapic.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1536): sys/arch/x86/x86/ioapic.c: revision 1.66 sys/arch/x86/include/i82093reg.h: revision 1.7 Print detail about misconfigured APIC ID. IOAPIC_ID_MASK is 8 bits these days. Fixes PR kern/54276. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/x86/include/i82093reg.h cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/arch/x86/x86/ioapic.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/include/i82093reg.h diff -u src/sys/arch/x86/include/i82093reg.h:1.6 src/sys/arch/x86/include/i82093reg.h:1.6.2.1 --- src/sys/arch/x86/include/i82093reg.h:1.6 Wed Jun 19 06:32:46 2019 +++ src/sys/arch/x86/include/i82093reg.h Mon Oct 10 15:02:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: i82093reg.h,v 1.6 2019/06/19 06:32:46 msaitoh Exp $ */ +/* $NetBSD: i82093reg.h,v 1.6.2.1 2022/10/10 15:02:50 martin Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ #define IOAPIC_ID 0x00 #define IOAPIC_ID_SHIFT 24 -#define IOAPIC_ID_MASK 0x0f00 +#define IOAPIC_ID_MASK 0xff00 /* Version, and maximum interrupt pin number. */ Index: src/sys/arch/x86/x86/ioapic.c diff -u src/sys/arch/x86/x86/ioapic.c:1.63 src/sys/arch/x86/x86/ioapic.c:1.63.2.1 --- src/sys/arch/x86/x86/ioapic.c:1.63 Wed Jun 19 06:32:46 2019 +++ src/sys/arch/x86/x86/ioapic.c Mon Oct 10 15:02:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ioapic.c,v 1.63 2019/06/19 06:32:46 msaitoh Exp $ */ +/* $NetBSD: ioapic.c,v 1.63.2.1 2022/10/10 15:02:50 martin Exp $ */ /*- * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.63 2019/06/19 06:32:46 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.63.2.1 2022/10/10 15:02:50 martin Exp $"); #include "opt_ddb.h" @@ -371,8 +371,9 @@ ioapic_attach(device_t parent, device_t * mapping later ... */ if (apic_id != sc->sc_pic.pic_apicid) { - aprint_debug_dev(sc->sc_dev, "misconfigured as apic %d\n", - apic_id); + aprint_debug_dev(sc->sc_dev, + "apid is misconfigured (%d != %d)\n", + apic_id, sc->sc_pic.pic_apicid); ioapic_write(sc, IOAPIC_ID, (ioapic_read(sc, IOAPIC_ID) & ~IOAPIC_ID_MASK) @@ -383,7 +384,8 @@ ioapic_attach(device_t parent, device_t if (apic_id != sc->sc_pic.pic_apicid) aprint_error_dev(sc->sc_dev, - "can't remap to apid %d\n", sc->sc_pic.pic_apicid); + "can't remap apid from %d to %d\n", + apic_id, sc->sc_pic.pic_apicid); else aprint_debug_dev(sc->sc_dev, "remapped to apic %d\n", sc->sc_pic.pic_apicid);
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Mon Oct 10 15:03:40 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.4 Log Message: Ticket #1536 To generate a diff of this commit: cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/CHANGES-9.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Mon Oct 10 15:03:40 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.4 Log Message: Ticket #1536 To generate a diff of this commit: cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/CHANGES-9.4 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-9.4 diff -u src/doc/CHANGES-9.4:1.1.2.22 src/doc/CHANGES-9.4:1.1.2.23 --- src/doc/CHANGES-9.4:1.1.2.22 Tue Oct 4 17:26:46 2022 +++ src/doc/CHANGES-9.4 Mon Oct 10 15:03:40 2022 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.4,v 1.1.2.22 2022/10/04 17:26:46 snj Exp $ +# $NetBSD: CHANGES-9.4,v 1.1.2.23 2022/10/10 15:03:40 martin Exp $ A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4 release: @@ -308,3 +308,11 @@ usr.sbin/sysinst/arch/landisk/md.c 1.16 partition). [martin, ticket #1535] +sys/arch/x86/include/i82093reg.h 1.7 +sys/arch/x86/x86/ioapic.c 1.66 + + - Fix a bug that an IOAPIC ID is tried to remap with a wrong ID. + The bit width is 8 bits these days. Fixes PR kern/54276. + - Print detail about misconfigured APIC ID. + [msaitoh, ticket #1536] +
CVS commit: [netbsd-8] src/sys/arch/x86
Module Name:src Committed By: martin Date: Mon Oct 10 15:04:31 UTC 2022 Modified Files: src/sys/arch/x86/include [netbsd-8]: i82093reg.h src/sys/arch/x86/x86 [netbsd-8]: ioapic.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1769): sys/arch/x86/x86/ioapic.c: revision 1.66 sys/arch/x86/include/i82093reg.h: revision 1.7 Print detail about misconfigured APIC ID. IOAPIC_ID_MASK is 8 bits these days. Fixes PR kern/54276. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/arch/x86/include/i82093reg.h cvs rdiff -u -r1.52.10.1 -r1.52.10.2 src/sys/arch/x86/x86/ioapic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/arch/x86
Module Name:src Committed By: martin Date: Mon Oct 10 15:04:31 UTC 2022 Modified Files: src/sys/arch/x86/include [netbsd-8]: i82093reg.h src/sys/arch/x86/x86 [netbsd-8]: ioapic.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1769): sys/arch/x86/x86/ioapic.c: revision 1.66 sys/arch/x86/include/i82093reg.h: revision 1.7 Print detail about misconfigured APIC ID. IOAPIC_ID_MASK is 8 bits these days. Fixes PR kern/54276. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/arch/x86/include/i82093reg.h cvs rdiff -u -r1.52.10.1 -r1.52.10.2 src/sys/arch/x86/x86/ioapic.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/include/i82093reg.h diff -u src/sys/arch/x86/include/i82093reg.h:1.5 src/sys/arch/x86/include/i82093reg.h:1.5.4.1 --- src/sys/arch/x86/include/i82093reg.h:1.5 Sat Apr 22 04:25:09 2017 +++ src/sys/arch/x86/include/i82093reg.h Mon Oct 10 15:04:31 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: i82093reg.h,v 1.5 2017/04/22 04:25:09 nonaka Exp $ */ +/* $NetBSD: i82093reg.h,v 1.5.4.1 2022/10/10 15:04:31 martin Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ #define IOAPIC_ID 0x00 #define IOAPIC_ID_SHIFT 24 -#define IOAPIC_ID_MASK 0x0f00 +#define IOAPIC_ID_MASK 0xff00 /* Version, and maximum interrupt pin number. */ Index: src/sys/arch/x86/x86/ioapic.c diff -u src/sys/arch/x86/x86/ioapic.c:1.52.10.1 src/sys/arch/x86/x86/ioapic.c:1.52.10.2 --- src/sys/arch/x86/x86/ioapic.c:1.52.10.1 Tue Nov 21 11:01:02 2017 +++ src/sys/arch/x86/x86/ioapic.c Mon Oct 10 15:04:31 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ioapic.c,v 1.52.10.1 2017/11/21 11:01:02 martin Exp $ */ +/* $NetBSD: ioapic.c,v 1.52.10.2 2022/10/10 15:04:31 martin Exp $ */ /*- * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.52.10.1 2017/11/21 11:01:02 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.52.10.2 2022/10/10 15:04:31 martin Exp $"); #include "opt_ddb.h" @@ -373,8 +373,9 @@ ioapic_attach(device_t parent, device_t * mapping later ... */ if (apic_id != sc->sc_pic.pic_apicid) { - aprint_debug_dev(sc->sc_dev, "misconfigured as apic %d\n", - apic_id); + aprint_debug_dev(sc->sc_dev, + "apid is misconfigured (%d != %d)\n", + apic_id, sc->sc_pic.pic_apicid); ioapic_write(sc, IOAPIC_ID, (ioapic_read(sc, IOAPIC_ID) & ~IOAPIC_ID_MASK) @@ -385,7 +386,8 @@ ioapic_attach(device_t parent, device_t if (apic_id != sc->sc_pic.pic_apicid) aprint_error_dev(sc->sc_dev, - "can't remap to apid %d\n", sc->sc_pic.pic_apicid); + "can't remap apid from %d to %d\n", + apic_id, sc->sc_pic.pic_apicid); else aprint_debug_dev(sc->sc_dev, "remapped to apic %d\n", sc->sc_pic.pic_apicid);
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Mon Oct 10 15:11:45 UTC 2022 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Tickets #1769 and #1770 To generate a diff of this commit: cvs rdiff -u -r1.1.2.153 -r1.1.2.154 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Mon Oct 10 15:11:45 UTC 2022 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Tickets #1769 and #1770 To generate a diff of this commit: cvs rdiff -u -r1.1.2.153 -r1.1.2.154 src/doc/CHANGES-8.3 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-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.153 src/doc/CHANGES-8.3:1.1.2.154 --- src/doc/CHANGES-8.3:1.1.2.153 Thu Sep 29 14:43:06 2022 +++ src/doc/CHANGES-8.3 Mon Oct 10 15:11:45 2022 @@ -1,4 +1,4 @@ - $NetBSD: CHANGES-8.3,v 1.1.2.153 2022/09/29 14:43:06 snj Exp $ + $NetBSD: CHANGES-8.3,v 1.1.2.154 2022/10/10 15:11:45 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -2873,3 +2873,16 @@ sys/dev/pci/mfii.c1.28 the driver use MSI/MSI-x when available. [bouyer, ticket #1768] +sys/arch/x86/include/i82093reg.h 1.7 +sys/arch/x86/x86/ioapic.c 1.66 + + - Fix a bug that an IOAPIC ID is tried to remap with a wrong ID. + The bit width is 8 bits these days. Fixes PR kern/54276. + - Print detail about misconfigured APIC ID. + [msaitoh, ticket #1769] + +sys/net/if_ethersubr.c1.254 + + Fix inverted logic dropping wrong sized packets in the VLAN path. + [msaitoh, ticket #1770] +
CVS commit: [netbsd-8] src/sys/net
Module Name:src Committed By: martin Date: Mon Oct 10 16:09:13 UTC 2022 Modified Files: src/sys/net [netbsd-8]: if_ethersubr.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1770): sys/net/if_ethersubr.c: revision 1.254 Fix a bug in the VLAN path: there's an inverted logic, the mbuf needs to be bigger than struct ether_vlan_header, not smaller. Meanwhile add a KASSERT in the LLC path. To generate a diff of this commit: cvs rdiff -u -r1.242.6.9 -r1.242.6.10 src/sys/net/if_ethersubr.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/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.242.6.9 src/sys/net/if_ethersubr.c:1.242.6.10 --- src/sys/net/if_ethersubr.c:1.242.6.9 Wed Oct 27 18:52:51 2021 +++ src/sys/net/if_ethersubr.c Mon Oct 10 16:09:12 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.242.6.9 2021/10/27 18:52:51 martin Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.242.6.10 2022/10/10 16:09:12 martin Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.242.6.9 2021/10/27 18:52:51 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.242.6.10 2022/10/10 16:09:12 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -706,7 +706,7 @@ ether_input(struct ifnet *ifp, struct mb * just being used to store the priority. Extract the ether * type, and if IP or IPV6, let them deal with it. */ - if (m->m_len <= sizeof(*evl) + if (m->m_len >= sizeof(*evl) && EVL_VLANOFTAG((ntohs(evl->evl_tag))) == 0) { etype = ntohs(evl->evl_proto); ehlen = sizeof(*evl); @@ -841,11 +841,13 @@ ether_input(struct ifnet *ifp, struct mb return; } } else { + KASSERT(ehlen == sizeof(*eh)); #if defined (LLC) || defined (NETATALK) - if (m->m_len < ehlen + sizeof(struct llc)) { + if (m->m_len < sizeof(*eh) + sizeof(struct llc)) { goto dropanyway; } l = (struct llc *)(eh+1); + switch (l->llc_dsap) { #ifdef NETATALK case LLC_SNAP_LSAP: @@ -871,10 +873,10 @@ ether_input(struct ifnet *ifp, struct mb sizeof(aarp_org_code)) == 0 && ntohs(l->llc_snap_ether_type) == ETHERTYPE_AARP) { - m_adj( m, sizeof(struct ether_header) + m_adj(m, sizeof(struct ether_header) + sizeof(struct llc)); aarpinput(ifp, m); /* XXX */ -return; + return; } default:
CVS commit: [netbsd-8] src/sys/net
Module Name:src Committed By: martin Date: Mon Oct 10 16:09:13 UTC 2022 Modified Files: src/sys/net [netbsd-8]: if_ethersubr.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1770): sys/net/if_ethersubr.c: revision 1.254 Fix a bug in the VLAN path: there's an inverted logic, the mbuf needs to be bigger than struct ether_vlan_header, not smaller. Meanwhile add a KASSERT in the LLC path. To generate a diff of this commit: cvs rdiff -u -r1.242.6.9 -r1.242.6.10 src/sys/net/if_ethersubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Oct 10 17:33:35 UTC 2022 Modified Files: src/usr.bin/make: main.c Log Message: make: document the guard for directories in unlink_file Document only the POSIX requirement for now, as I didn't find information about _which_ ancient UNIX systems would corrupt the filesystem on unlinking a directory. http://man.cat-v.org/unix-1st/2/sys-unlink (1971) says: > It is also illegal to unlink a directory (except for the super-user). https://mail-index.netbsd.org/tech-toolchain/2022/10/06/msg004147.html To generate a diff of this commit: cvs rdiff -u -r1.583 -r1.584 src/usr.bin/make/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Oct 10 17:33:35 UTC 2022 Modified Files: src/usr.bin/make: main.c Log Message: make: document the guard for directories in unlink_file Document only the POSIX requirement for now, as I didn't find information about _which_ ancient UNIX systems would corrupt the filesystem on unlinking a directory. http://man.cat-v.org/unix-1st/2/sys-unlink (1971) says: > It is also illegal to unlink a directory (except for the super-user). https://mail-index.netbsd.org/tech-toolchain/2022/10/06/msg004147.html To generate a diff of this commit: cvs rdiff -u -r1.583 -r1.584 src/usr.bin/make/main.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/make/main.c diff -u src/usr.bin/make/main.c:1.583 src/usr.bin/make/main.c:1.584 --- src/usr.bin/make/main.c:1.583 Wed Sep 28 16:34:47 2022 +++ src/usr.bin/make/main.c Mon Oct 10 17:33:35 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.583 2022/09/28 16:34:47 sjg Exp $ */ +/* $NetBSD: main.c,v 1.584 2022/10/10 17:33:35 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.583 2022/09/28 16:34:47 sjg Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.584 2022/10/10 17:33:35 rillig Exp $"); #if defined(MAKE_NATIVE) && !defined(lint) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -1890,6 +1890,10 @@ unlink_file(const char *file) return false; if (S_ISDIR(st.st_mode)) { + /* + * POSIX says for unlink: "The path argument shall not name + * a directory unless [...]". + */ errno = EISDIR; return false; }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Mon Oct 10 18:30:28 UTC 2022 Modified Files: src/sys/dev/usb: if_mos.c Log Message: ETHERCAP_VLAN_MTU does not go into ifp->if_capabilities but ethercom ec_capabilities instead. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/usb/if_mos.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Mon Oct 10 18:30:28 UTC 2022 Modified Files: src/sys/dev/usb: if_mos.c Log Message: ETHERCAP_VLAN_MTU does not go into ifp->if_capabilities but ethercom ec_capabilities instead. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/usb/if_mos.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_mos.c diff -u src/sys/dev/usb/if_mos.c:1.23 src/sys/dev/usb/if_mos.c:1.24 --- src/sys/dev/usb/if_mos.c:1.23 Sat Aug 20 14:08:59 2022 +++ src/sys/dev/usb/if_mos.c Mon Oct 10 18:30:28 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mos.c,v 1.23 2022/08/20 14:08:59 riastradh Exp $ */ +/* $NetBSD: if_mos.c,v 1.24 2022/10/10 18:30:28 martin Exp $ */ /* $OpenBSD: if_mos.c,v 1.40 2019/07/07 06:40:10 kevlo Exp $ */ /* @@ -72,7 +72,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.23 2022/08/20 14:08:59 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.24 2022/10/10 18:30:28 martin Exp $"); #include @@ -652,8 +652,8 @@ mos_attach(device_t parent, device_t sel return; } - struct ifnet *ifp = usbnet_ifp(un); - ifp->if_capabilities = ETHERCAP_VLAN_MTU; + struct ethercom *ec = usbnet_ec(un); + ec->ec_capabilities = ETHERCAP_VLAN_MTU; usbnet_attach_ifp(un, IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST, 0, &unm);
Re: CVS commit: src/usr.bin/make
Date:Mon, 10 Oct 2022 17:33:35 + From:"Roland Illig" Message-ID: <20221010173335.c3cccf...@cvs.netbsd.org> | Document only the POSIX requirement for now, as I didn't find | information about _which_ ancient UNIX systems would corrupt the | filesystem on unlinking a directory. Everthinng before the rename() mkdir() and rmdir() sys calls were added, which was about 4.2bsd I think - and as I recall the ability remained for some time after those were added. Not sure when the UTS stream caught up, probably about the time when Sun switched SunOS to being SysV based. | http://man.cat-v.org/unix-1st/2/sys-unlink (1971) says: | > It is also illegal to unlink a directory (except for the super-user). That has always been true ... the function in make is for when make is being run as root - not needed otherwise. kre ps: I agree that sys calls and emulations thereof should always return non-zero (and hence true) in the error case (but not necessarily always 0 when successful). That is simply the way they work and always have.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Oct 10 21:17:26 UTC 2022 Modified Files: src/usr.bin/make: compat.c job.c main.c make.h Log Message: make: change return type of unlink_file back to int As unlink_file is a wrapper around unlink, use the same encoding for the possible return values as in the wrapped function. This consistency is more important than expressing all possible return values in the return type 'bool'. https://mail-index.netbsd.org/tech-toolchain/2022/10/06/msg004155.html No functional change. To generate a diff of this commit: cvs rdiff -u -r1.241 -r1.242 src/usr.bin/make/compat.c cvs rdiff -u -r1.455 -r1.456 src/usr.bin/make/job.c cvs rdiff -u -r1.584 -r1.585 src/usr.bin/make/main.c cvs rdiff -u -r1.307 -r1.308 src/usr.bin/make/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Oct 10 21:17:26 UTC 2022 Modified Files: src/usr.bin/make: compat.c job.c main.c make.h Log Message: make: change return type of unlink_file back to int As unlink_file is a wrapper around unlink, use the same encoding for the possible return values as in the wrapped function. This consistency is more important than expressing all possible return values in the return type 'bool'. https://mail-index.netbsd.org/tech-toolchain/2022/10/06/msg004155.html No functional change. To generate a diff of this commit: cvs rdiff -u -r1.241 -r1.242 src/usr.bin/make/compat.c cvs rdiff -u -r1.455 -r1.456 src/usr.bin/make/job.c cvs rdiff -u -r1.584 -r1.585 src/usr.bin/make/main.c cvs rdiff -u -r1.307 -r1.308 src/usr.bin/make/make.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.bin/make/compat.c diff -u src/usr.bin/make/compat.c:1.241 src/usr.bin/make/compat.c:1.242 --- src/usr.bin/make/compat.c:1.241 Wed Aug 17 20:10:29 2022 +++ src/usr.bin/make/compat.c Mon Oct 10 21:17:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.241 2022/08/17 20:10:29 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.242 2022/10/10 21:17:25 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -91,7 +91,7 @@ #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.241 2022/08/17 20:10:29 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.242 2022/10/10 21:17:25 rillig Exp $"); static GNode *curTarg = NULL; static pid_t compatChild; @@ -107,7 +107,7 @@ CompatDeleteTarget(GNode *gn) if (gn != NULL && !GNode_IsPrecious(gn)) { const char *file = GNode_VarTarget(gn); - if (!opts.noExecute && unlink_file(file)) { + if (!opts.noExecute && unlink_file(file) == 0) { Error("*** %s removed", file); } } Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.455 src/usr.bin/make/job.c:1.456 --- src/usr.bin/make/job.c:1.455 Sat Sep 3 08:41:07 2022 +++ src/usr.bin/make/job.c Mon Oct 10 21:17:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.455 2022/09/03 08:41:07 rillig Exp $ */ +/* $NetBSD: job.c,v 1.456 2022/10/10 21:17:25 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -142,7 +142,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.455 2022/09/03 08:41:07 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.456 2022/10/10 21:17:25 rillig Exp $"); /* * A shell defines how the commands are run. All commands for a target are @@ -512,7 +512,7 @@ JobDeleteTarget(GNode *gn) return; file = GNode_Path(gn); - if (unlink_file(file)) + if (unlink_file(file) == 0) Error("*** %s removed", file); } Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.584 src/usr.bin/make/main.c:1.585 --- src/usr.bin/make/main.c:1.584 Mon Oct 10 17:33:35 2022 +++ src/usr.bin/make/main.c Mon Oct 10 21:17:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.584 2022/10/10 17:33:35 rillig Exp $ */ +/* $NetBSD: main.c,v 1.585 2022/10/10 21:17:25 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.584 2022/10/10 17:33:35 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.585 2022/10/10 21:17:25 rillig Exp $"); #if defined(MAKE_NATIVE) && !defined(lint) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -1881,13 +1881,13 @@ Finish(int errs) Fatal("%d error%s", errs, errs == 1 ? "" : "s"); } -bool +int unlink_file(const char *file) { struct stat st; if (lstat(file, &st) == -1) - return false; + return -1; if (S_ISDIR(st.st_mode)) { /* @@ -1895,9 +1895,9 @@ unlink_file(const char *file) * a directory unless [...]". */ errno = EISDIR; - return false; + return -1; } - return unlink(file) == 0; + return unlink(file); } static void Index: src/usr.bin/make/make.h diff -u src/usr.bin/make/make.h:1.307 src/usr.bin/make/make.h:1.308 --- src/usr.bin/make/make.h:1.307 Sat Sep 24 16:13:48 2022 +++ src/usr.bin/make/make.h Mon Oct 10 21:17:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.307 2022/09/24 16:13:48 rillig Exp $ */ +/* $NetBSD: make.h,v 1.308 2022/10/10 21:17:25 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -842,7 +842,7 @@ void Fatal(const char *, ...) MAKE_ATTR_ void Punt(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD; void DieHorribly(void) MAKE_ATTR_DEAD; void Finish(int) MAKE_ATTR_DEAD; -bool unlink_file(const char *) MAKE_ATTR_USE; +int unlink_file(const char *) MAKE_ATTR_USE; void execDie(const char *, const char *); char *getTmpdir(void) MAKE_ATTR_USE; bool ParseBoolean(const char *, bool) MAKE_ATTR_USE;
CVS commit: src/share/man/man4
Module Name:src Committed By: msaitoh Date: Tue Oct 11 02:54:14 UTC 2022 Modified Files: src/share/man/man4: lm.4 Log Message: Add NCT679[89] to the supported list. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/share/man/man4/lm.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: msaitoh Date: Tue Oct 11 02:54:14 UTC 2022 Modified Files: src/share/man/man4: lm.4 Log Message: Add NCT679[89] to the supported list. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/share/man/man4/lm.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/lm.4 diff -u src/share/man/man4/lm.4:1.36 src/share/man/man4/lm.4:1.37 --- src/share/man/man4/lm.4:1.36 Thu Mar 8 07:39:28 2018 +++ src/share/man/man4/lm.4 Tue Oct 11 02:54:14 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: lm.4,v 1.36 2018/03/08 07:39:28 wiz Exp $ +.\" $NetBSD: lm.4,v 1.37 2022/10/11 02:54:14 msaitoh Exp $ .\" .\" Copyright (c) 2000 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 8, 2018 +.Dd October 11, 2022 .Dt LM 4 .Os .Sh NAME @@ -89,13 +89,9 @@ Nuvoton .Em NCT6102D , .Em NCT6104D , .Em NCT6106D , -.Em NCT6779D , -.Em NCT6791D , -.Em NCT6792D , -.Em NCT6793D , -.Em NCT6795D , +.Em NCT6779D and -.Em NCT6796D . +.Em NCT679[1235689]D . .It Winbond .Em W83627HF* ,
CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Tue Oct 11 02:58:52 UTC 2022 Modified Files: src/doc: CHANGES Log Message: doc: NCT6799D support To generate a diff of this commit: cvs rdiff -u -r1.2917 -r1.2918 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Tue Oct 11 02:58:52 UTC 2022 Modified Files: src/doc: CHANGES Log Message: doc: NCT6799D support To generate a diff of this commit: cvs rdiff -u -r1.2917 -r1.2918 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.2917 src/doc/CHANGES:1.2918 --- src/doc/CHANGES:1.2917 Sun Oct 9 21:43:38 2022 +++ src/doc/CHANGES Tue Oct 11 02:58:52 2022 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2917 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2918 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -693,6 +693,7 @@ Changes from NetBSD 9.0 to NetBSD 10.0: unbound(8): Import 1.16.3. [christos 20220924] file(1): Upgraded to 5.43. [christos 20220924] tzdata: updated to 2022d (using the 2022dgtz fork) [kre 20220928] + wbsio(4),lm(4): Add NCT6799D support. [msaitoh 20221001] dhcp: Patch to version 4.4.3-P1. [christos 20221005] OpenSSH: Import 9.1. [christos 20221005] postfix(1): Import version 3.7.3. [christos 20221008]