CVS commit: src/lib/libcurses
Module Name:src Committed By: mrg Date: Sat May 8 04:29:07 UTC 2021 Modified Files: src/lib/libcurses: refresh.c Log Message: avoid accessing stack garbage. on arm64eb resuming vi(1) would often crash. in makech(), the 'csp' variable is either set to current window data, or a local stack variable's address ''. the window data has many lines of info stored, and 'csp++' is used per line here. unfortunately, a case existed where 'csp++' operated on csp initialised from '' which eventually crashes when, on my display with 160 columns and 'csp + 155' exceeds the mapped stack and crashes. match the '!_cursesi_screen->curwin' conditional that initialises csp, and avoid csp++ here. assert() that csp != in both places that modify csp. thanks to jdc@ and mlelstv@. XXX: possibly also should avoid the putch() here as well. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/lib/libcurses/refresh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/refresh.c diff -u src/lib/libcurses/refresh.c:1.112 src/lib/libcurses/refresh.c:1.113 --- src/lib/libcurses/refresh.c:1.112 Mon Feb 24 12:20:29 2020 +++ src/lib/libcurses/refresh.c Sat May 8 04:29:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.112 2020/02/24 12:20:29 rin Exp $ */ +/* $NetBSD: refresh.c,v 1.113 2021/05/08 04:29:07 mrg Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,13 +34,14 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94"; #else -__RCSID("$NetBSD: refresh.c,v 1.112 2020/02/24 12:20:29 rin Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.113 2021/05/08 04:29:07 mrg Exp $"); #endif #endif/* not lint */ #include #include #include +#include #include "curses.h" #include "curses_private.h" @@ -1322,6 +1323,7 @@ makech(int wy) csp->ch = (wchar_t)btowc((int)' '); SET_WCOL( *csp, 1 ); #endif /* HAVE_WCHAR */ + assert(csp != ); csp++; } return OK; @@ -1368,7 +1370,10 @@ makech(int wy) { if (putch(nsp, csp, wy, wx) == ERR) return ERR; -csp++; +if (!_cursesi_screen->curwin) { + assert(csp != ); + csp++; +} } else { putattr(nsp); putattr_out(nsp);
CVS commit: [thorpej-i2c-spi-conf] src/sys/dev
Module Name:src Committed By: thorpej Date: Sat May 8 02:44:22 UTC 2021 Modified Files: src/sys/dev/fdt [thorpej-i2c-spi-conf]: i2cmux_fdt.c src/sys/dev/i2c [thorpej-i2c-spi-conf]: i2cmux.c i2cmuxvar.h pcai2cmux.c Log Message: Update the i2c mux code for the new enumeration methods. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.4.1 src/sys/dev/fdt/i2cmux_fdt.c cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/dev/i2c/i2cmux.c cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/dev/i2c/i2cmuxvar.h cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/dev/i2c/pcai2cmux.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/fdt/i2cmux_fdt.c diff -u src/sys/dev/fdt/i2cmux_fdt.c:1.10 src/sys/dev/fdt/i2cmux_fdt.c:1.10.4.1 --- src/sys/dev/fdt/i2cmux_fdt.c:1.10 Wed Jan 27 03:10:21 2021 +++ src/sys/dev/fdt/i2cmux_fdt.c Sat May 8 02:44:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: i2cmux_fdt.c,v 1.10 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: i2cmux_fdt.c,v 1.10.4.1 2021/05/08 02:44:22 thorpej Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i2cmux_fdt.c,v 1.10 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2cmux_fdt.c,v 1.10.4.1 2021/05/08 02:44:22 thorpej Exp $"); #include #include @@ -59,11 +59,12 @@ static void * iicmux_gpio_get_mux_info(struct iicmux_softc * const sc) { struct mux_info_gpio *mux_data; + const int phandle = devhandle_to_of(device_handle(sc->sc_dev)); int i; mux_data = kmem_zalloc(sizeof(*mux_data), KM_SLEEP); - mux_data->npins = fdtbus_gpio_count(sc->sc_handle, "mux-gpios"); + mux_data->npins = fdtbus_gpio_count(phandle, "mux-gpios"); if (mux_data->npins == 0) { aprint_error_dev(sc->sc_dev, "unable to get mux-gpios property\n"); @@ -73,7 +74,7 @@ iicmux_gpio_get_mux_info(struct iicmux_s mux_data->pins = kmem_zalloc(sizeof(*mux_data->pins) * mux_data->npins, KM_SLEEP); for (i = 0; i < mux_data->npins; i++) { - mux_data->pins[i] = fdtbus_gpio_acquire_index(sc->sc_handle, + mux_data->pins[i] = fdtbus_gpio_acquire_index(phandle, "mux-gpios", i, GPIO_PIN_OUTPUT); if (mux_data->pins[i] == NULL) { aprint_error_dev(sc->sc_dev, @@ -83,7 +84,7 @@ iicmux_gpio_get_mux_info(struct iicmux_s } mux_data->has_idle_value = - of_getprop_uint32(sc->sc_handle, "idle-state", + of_getprop_uint32(phandle, "idle-state", _data->idle_value) == 0; return mux_data; @@ -102,12 +103,13 @@ static void * iicmux_gpio_get_bus_info(struct iicmux_bus * const bus) { struct iicmux_softc * const sc = bus->mux; + const int phandle = devhandle_to_of(bus->devhandle); struct bus_info_gpio *bus_info; int error; bus_info = kmem_zalloc(sizeof(*bus_info), KM_SLEEP); - error = fdtbus_get_reg(bus->handle, 0, _info->value, NULL); + error = fdtbus_get_reg(phandle, 0, _info->value, NULL); if (error) { aprint_error_dev(sc->sc_dev, "unable to get reg property for bus %d\n", bus->busidx); @@ -172,12 +174,13 @@ struct bus_info_pinctrl { static void * iicmux_pinctrl_get_mux_info(struct iicmux_softc * const sc) { + const int phandle = devhandle_to_of(device_handle(sc->sc_dev)); struct mux_info_pinctrl *mux_info; mux_info = kmem_alloc(sizeof(*mux_info), KM_SLEEP); mux_info->has_idle_idx = - fdtbus_get_index(sc->sc_handle, "pinctrl-names", "idle", + fdtbus_get_index(phandle, "pinctrl-names", "idle", _info->idle_idx) == 0; return mux_info; @@ -187,12 +190,13 @@ static void * iicmux_pinctrl_get_bus_info(struct iicmux_bus * const bus) { struct iicmux_softc * const sc = bus->mux; + const int phandle = devhandle_to_of(bus->devhandle); struct bus_info_pinctrl *bus_info; int error; bus_info = kmem_alloc(sizeof(*bus_info), KM_SLEEP); - error = fdtbus_get_reg(bus->handle, 0, _info->idx, NULL); + error = fdtbus_get_reg(phandle, 0, _info->idx, NULL); if (error) { aprint_error_dev(sc->sc_dev, "unable to get reg property for bus %d\n", bus->busidx); @@ -208,9 +212,10 @@ iicmux_pinctrl_acquire_bus(struct iicmux int const flags __unused) { struct iicmux_softc * const sc = bus->mux; + const int phandle = devhandle_to_of(device_handle(sc->sc_dev)); struct bus_info_pinctrl * const bus_info = bus->bus_data; - return fdtbus_pinctrl_set_config_index(sc->sc_handle, bus_info->idx); + return fdtbus_pinctrl_set_config_index(phandle, bus_info->idx); } static void @@ -218,10 +223,11 @@ iicmux_pinctrl_release_bus(struct iicmux int const flags __unused) { struct iicmux_softc * const sc = bus->mux; + const int phandle = devhandle_to_of(device_handle(sc->sc_dev)); struct mux_info_pinctrl * const mux_info = sc->sc_mux_data; if (mux_info->has_idle_idx) { - (void) fdtbus_pinctrl_set_config_index(sc->sc_handle, + (void) fdtbus_pinctrl_set_config_index(phandle,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sat May 8 00:27:02 UTC 2021 Modified Files: src/sys/dev/pci: if_bwfm_pci.c if_bwi_pci.c if_cas.c if_dge.c if_et.c if_fxp_pci.c if_iwi.c if_iwn.c if_jme.c if_kse.c if_malo_pci.c if_msk.c if_mtd_pci.c if_rge.c if_sk.c if_tlp_pci.c if_vr.c Log Message: Use pci_compatible_match(). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/if_bwfm_pci.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/if_bwi_pci.c cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/if_cas.c cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/if_dge.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/if_et.c cvs rdiff -u -r1.85 -r1.86 src/sys/dev/pci/if_fxp_pci.c cvs rdiff -u -r1.114 -r1.115 src/sys/dev/pci/if_iwi.c cvs rdiff -u -r1.94 -r1.95 src/sys/dev/pci/if_iwn.c cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_jme.c cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/if_kse.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_malo_pci.c cvs rdiff -u -r1.115 -r1.116 src/sys/dev/pci/if_msk.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/if_mtd_pci.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/if_rge.c cvs rdiff -u -r1.107 -r1.108 src/sys/dev/pci/if_sk.c cvs rdiff -u -r1.129 -r1.130 src/sys/dev/pci/if_tlp_pci.c cvs rdiff -u -r1.133 -r1.134 src/sys/dev/pci/if_vr.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/if_bwfm_pci.c diff -u src/sys/dev/pci/if_bwfm_pci.c:1.9 src/sys/dev/pci/if_bwfm_pci.c:1.10 --- src/sys/dev/pci/if_bwfm_pci.c:1.9 Sat May 30 15:55:47 2020 +++ src/sys/dev/pci/if_bwfm_pci.c Sat May 8 00:27:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bwfm_pci.c,v 1.9 2020/05/30 15:55:47 jdolecek Exp $ */ +/* $NetBSD: if_bwfm_pci.c,v 1.10 2021/05/08 00:27:02 thorpej Exp $ */ /* $OpenBSD: if_bwfm_pci.c,v 1.18 2018/02/08 05:00:38 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -366,12 +366,14 @@ static const struct bwfm_firmware_select BWFM_FW_ENTRY_END }; -static const struct bwfm_pci_matchid { - pci_vendor_id_t bwfm_vendor; - pci_product_id_t bwfm_product; -} bwfm_pci_devices[] = { - { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM43602 }, - { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM4350 }, +static const struct device_compatible_entry compat_data[] = { + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM43602), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4350), }, + + PCI_COMPAT_EOL }; static struct mbuf * @@ -397,14 +399,7 @@ bwfm_pci_match(device_t parent, cfdata_t { struct pci_attach_args *pa = aux; - if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_BROADCOM) - return 0; - - for (size_t i = 0; i < __arraycount(bwfm_pci_devices); i++) - if (PCI_PRODUCT(pa->pa_id) == bwfm_pci_devices[i].bwfm_product) - return 1; - - return 0; + return pci_compatible_match(pa, compat_data); } void Index: src/sys/dev/pci/if_bwi_pci.c diff -u src/sys/dev/pci/if_bwi_pci.c:1.16 src/sys/dev/pci/if_bwi_pci.c:1.17 --- src/sys/dev/pci/if_bwi_pci.c:1.16 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/if_bwi_pci.c Sat May 8 00:27:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bwi_pci.c,v 1.16 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: if_bwi_pci.c,v 1.17 2021/05/08 00:27:02 thorpej Exp $ */ /* $OpenBSD: if_bwi_pci.c,v 1.6 2008/02/14 22:10:02 brad Exp $ */ /* @@ -24,7 +24,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: if_bwi_pci.c,v 1.16 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bwi_pci.c,v 1.17 2021/05/08 00:27:02 thorpej Exp $"); #include #include @@ -74,31 +74,52 @@ struct bwi_pci_softc { CFATTACH_DECL_NEW(bwi_pci, sizeof(struct bwi_pci_softc), bwi_pci_match, bwi_pci_attach, bwi_pci_detach, NULL); +static const struct device_compatible_entry compat_data[] = { + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4303), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4306), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4306_2), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4307), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4309), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4311), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4312), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4318), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4319), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4322), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM43XG), }, + + { .id = PCI_ID_CODE(PCI_VENDOR_BROADCOM, + PCI_PRODUCT_BROADCOM_BCM4328), }, + + PCI_COMPAT_EOL +}; + static int bwi_pci_match(device_t parent, cfdata_t match, void *aux) { struct pci_attach_args *pa
CVS commit: src/sys/arch/alpha/pci
Module Name:src Committed By: thorpej Date: Sat May 8 00:08:43 UTC 2021 Modified Files: src/sys/arch/alpha/pci: sio_pic.c ttwoga.c ttwoga_dma.c ttwogavar.h Log Message: More symbol sanitizing. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/alpha/pci/sio_pic.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/alpha/pci/ttwoga.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/alpha/pci/ttwoga_dma.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/alpha/pci/ttwogavar.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/arch/alpha/pci/sio_pic.c diff -u src/sys/arch/alpha/pci/sio_pic.c:1.47 src/sys/arch/alpha/pci/sio_pic.c:1.48 --- src/sys/arch/alpha/pci/sio_pic.c:1.47 Fri May 7 16:58:34 2021 +++ src/sys/arch/alpha/pci/sio_pic.c Sat May 8 00:08:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sio_pic.c,v 1.47 2021/05/07 16:58:34 thorpej Exp $ */ +/* $NetBSD: sio_pic.c,v 1.48 2021/05/08 00:08:43 thorpej Exp $ */ /*- * Copyright (c) 1998, 2000, 2020 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: sio_pic.c,v 1.47 2021/05/07 16:58:34 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sio_pic.c,v 1.48 2021/05/08 00:08:43 thorpej Exp $"); #include #include @@ -102,9 +102,9 @@ __KERNEL_RCSID(0, "$NetBSD: sio_pic.c,v * Private functions and variables. */ -bus_space_tag_t sio_iot; -pci_chipset_tag_t sio_pc; -bus_space_handle_t sio_ioh_icu1, sio_ioh_icu2; +static bus_space_tag_t sio_iot; +static pci_chipset_tag_t sio_pc; +static bus_space_handle_t sio_ioh_icu1, sio_ioh_icu2; #define ICU_LEN 16 /* number of ISA IRQs */ @@ -262,7 +262,7 @@ cy82c693_write_elcr(int elcr, uint8_t va * they should panic. */ -int (*const sio_elcr_setup_funcs[])(void) = { +static int (*const sio_elcr_setup_funcs[])(void) = { cy82c693_setup_elcr, i82378_setup_elcr, NULL, Index: src/sys/arch/alpha/pci/ttwoga.c diff -u src/sys/arch/alpha/pci/ttwoga.c:1.16 src/sys/arch/alpha/pci/ttwoga.c:1.17 --- src/sys/arch/alpha/pci/ttwoga.c:1.16 Sat Apr 24 23:36:23 2021 +++ src/sys/arch/alpha/pci/ttwoga.c Sat May 8 00:08:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ttwoga.c,v 1.16 2021/04/24 23:36:23 thorpej Exp $ */ +/* $NetBSD: ttwoga.c,v 1.17 2021/05/08 00:08:43 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: ttwoga.c,v 1.16 2021/04/24 23:36:23 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ttwoga.c,v 1.17 2021/05/08 00:08:43 thorpej Exp $"); #include #include @@ -62,27 +62,27 @@ __KERNEL_RCSID(0, "$NetBSD: ttwoga.c,v 1 #include "locators.h" -int ttwogamatch(device_t, cfdata_t, void *); -void ttwogaattach(device_t, device_t, void *); +static int ttwogamatch(device_t, cfdata_t, void *); +static void ttwogaattach(device_t, device_t, void *); CFATTACH_DECL_NEW(ttwoga, 0, ttwogamatch, ttwogaattach, NULL, NULL); -int ttwogaprint(void *, const char *); +static int ttwogaprint(void *, const char *); -int ttwopcimatch(device_t, cfdata_t, void *); -void ttwopciattach(device_t, device_t, void *); +static int ttwopcimatch(device_t, cfdata_t, void *); +static void ttwopciattach(device_t, device_t, void *); CFATTACH_DECL_NEW(ttwopci, 0, ttwopcimatch, ttwopciattach, NULL, NULL); -int ttwosableioprint(void *, const char *); +static int ttwosableioprint(void *, const char *); /* * There can be only one, but it might have 2 primary PCI busses. */ -int ttwogafound; -struct ttwoga_config ttwoga_configuration[2]; +static int ttwogafound; +static struct ttwoga_config ttwoga_configuration[2]; /* CBUS address bias for Gamma systems. */ bus_addr_t ttwoga_gamma_cbus_bias; @@ -90,7 +90,7 @@ bus_addr_t ttwoga_gamma_cbus_bias; #define GIGABYTE (1024UL * 1024UL * 1024UL) #define MEGABYTE (1024UL * 1024UL) -const struct ttwoga_sysmap ttwoga_sysmap[2] = { +static const struct ttwoga_sysmap ttwoga_sysmap[2] = { /* Base System size Bus size */ { T2_PCI0_SIO_BASE, 256UL * MEGABYTE, 8UL * MEGABYTE, T2_PCI0_SMEM_BASE, 4UL * GIGABYTE, 128UL * MEGABYTE, @@ -107,7 +107,7 @@ const struct ttwoga_sysmap ttwoga_sysmap #undef GIGABYTE #undef MEGABYTE -int +static int ttwogamatch(device_t parent, cfdata_t match, void *aux) { struct mainbus_attach_args *ma = aux; @@ -122,7 +122,7 @@ ttwogamatch(device_t parent, cfdata_t ma return (1); } -void +static void ttwogaattach(device_t parent, device_t self, void *aux) { struct pcibus_attach_args pba; @@ -149,7 +149,7 @@ ttwogaattach(device_t parent, device_t s } } -int +static int ttwogaprint(void *aux, const char *pnp) { struct pcibus_attach_args *pba = aux; @@ -204,7 +204,7 @@ ttwoga_init(int hose, int mallocsafe) return (tcp); } -int +static int ttwopcimatch(device_t parent, cfdata_t match, void *aux) { struct
CVS commit: src/tools
Module Name:src Committed By: christos Date: Fri May 7 23:00:04 UTC 2021 Modified Files: src/tools/binutils: Makefile src/tools/gcc: Makefile Log Message: enable initfini-array since all platforms support it. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/tools/binutils/Makefile cvs rdiff -u -r1.102 -r1.103 src/tools/gcc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/binutils/Makefile diff -u src/tools/binutils/Makefile:1.31 src/tools/binutils/Makefile:1.32 --- src/tools/binutils/Makefile:1.31 Fri Apr 3 20:47:30 2020 +++ src/tools/binutils/Makefile Fri May 7 19:00:04 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2020/04/04 00:47:30 christos Exp $ +# $NetBSD: Makefile,v 1.32 2021/05/07 23:00:04 christos Exp $ .include @@ -13,7 +13,7 @@ BRANDING?= \ CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} --disable-nls \ --program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \ - --disable-werror --disable-initfini-array \ + --disable-werror --enable-initfini-array=yes \ ${BRANDING} build/gas/m68k-parse.c: ${GNUHOSTDIST}/gas/m68k-parse.c @@ -68,7 +68,7 @@ native-binutils: .native/.configure_done --build=`${GNUHOSTDIST}/config.guess` \ --host=${MACHINE_GNU_PLATFORM} \ --target=${MACHINE_GNU_PLATFORM} \ - --disable-initfini-array \ + --enable-initfini-array=yes \ ${BRANDING} \ ) PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ Index: src/tools/gcc/Makefile diff -u src/tools/gcc/Makefile:1.102 src/tools/gcc/Makefile:1.103 --- src/tools/gcc/Makefile:1.102 Sun Apr 11 19:55:47 2021 +++ src/tools/gcc/Makefile Fri May 7 19:00:04 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.102 2021/04/11 23:55:47 mrg Exp $ +# $NetBSD: Makefile,v 1.103 2021/05/07 23:00:04 christos Exp $ .include @@ -37,6 +37,7 @@ COMMON_CONFIGURE_ARGS= --target=${MACHIN --with-system-zlib \ --without-isl \ --enable-__cxa_atexit \ + --enable-initfini-array=yes \ --enable-libstdcxx-time=rt \ --enable-libstdcxx-threads \ --with-diagnostics-color=auto-if-env
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Fri May 7 22:46:11 UTC 2021 Modified Files: src/sys/arch/alpha/tc: tcasic.c src/sys/arch/alpha/tlsb: gbus.c mcclock_tlsb.c Log Message: Static'ify more symbols. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/alpha/tc/tcasic.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/alpha/tlsb/gbus.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/alpha/tlsb/mcclock_tlsb.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/alpha/tc/tcasic.c diff -u src/sys/arch/alpha/tc/tcasic.c:1.50 src/sys/arch/alpha/tc/tcasic.c:1.51 --- src/sys/arch/alpha/tc/tcasic.c:1.50 Sat Apr 24 23:36:24 2021 +++ src/sys/arch/alpha/tc/tcasic.c Fri May 7 22:46:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tcasic.c,v 1.50 2021/04/24 23:36:24 thorpej Exp $ */ +/* $NetBSD: tcasic.c,v 1.51 2021/05/07 22:46:10 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: tcasic.c,v 1.50 2021/04/24 23:36:24 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcasic.c,v 1.51 2021/05/07 22:46:10 thorpej Exp $"); #include #include @@ -47,20 +47,20 @@ __KERNEL_RCSID(0, "$NetBSD: tcasic.c,v 1 #include /* Definition of the driver for autoconfig. */ -int tcasicmatch(device_t, cfdata_t, void *); -void tcasicattach(device_t, device_t, void *); +static int tcasicmatch(device_t, cfdata_t, void *); +static void tcasicattach(device_t, device_t, void *); CFATTACH_DECL_NEW(tcasic, 0, tcasicmatch, tcasicattach, NULL, NULL); extern struct cfdriver tcasic_cd; -int tcasicprint(void *, const char *); +static int tcasicprint(void *, const char *); /* There can be only one. */ -int tcasicfound; +static int tcasicfound; -int +static int tcasicmatch(device_t parent, cfdata_t cf, void *aux) { struct mainbus_attach_args *ma = aux; @@ -79,7 +79,7 @@ tcasicmatch(device_t parent, cfdata_t cf return (1); } -void +static void tcasicattach(device_t parent, device_t self, void *aux) { struct tcbus_attach_args tba; @@ -153,7 +153,7 @@ tcasicattach(device_t parent, device_t s config_found(self, , tcasicprint, CFARG_EOL); } -int +static int tcasicprint(void *aux, const char *pnp) { Index: src/sys/arch/alpha/tlsb/gbus.c diff -u src/sys/arch/alpha/tlsb/gbus.c:1.23 src/sys/arch/alpha/tlsb/gbus.c:1.24 --- src/sys/arch/alpha/tlsb/gbus.c:1.23 Sat Apr 24 23:36:24 2021 +++ src/sys/arch/alpha/tlsb/gbus.c Fri May 7 22:46:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gbus.c,v 1.23 2021/04/24 23:36:24 thorpej Exp $ */ +/* $NetBSD: gbus.c,v 1.24 2021/05/07 22:46:10 thorpej Exp $ */ /* * Copyright (c) 1997 by Matthew Jacob @@ -37,7 +37,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: gbus.c,v 1.23 2021/04/24 23:36:24 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gbus.c,v 1.24 2021/05/07 22:46:10 thorpej Exp $"); #include #include @@ -69,7 +69,7 @@ CFATTACH_DECL_NEW(gbus, sizeof(struct gb static int gbusprint(void *, const char *); -const struct gbus_attach_args gbus_children[] = { +static const struct gbus_attach_args gbus_children[] = { { "zsc", GBUS_DUART0_OFFSET }, { "zsc", GBUS_DUART1_OFFSET }, { "mcclock", GBUS_CLOCK_OFFSET }, Index: src/sys/arch/alpha/tlsb/mcclock_tlsb.c diff -u src/sys/arch/alpha/tlsb/mcclock_tlsb.c:1.17 src/sys/arch/alpha/tlsb/mcclock_tlsb.c:1.18 --- src/sys/arch/alpha/tlsb/mcclock_tlsb.c:1.17 Fri Jul 1 19:19:51 2011 +++ src/sys/arch/alpha/tlsb/mcclock_tlsb.c Fri May 7 22:46:11 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_tlsb.c,v 1.17 2011/07/01 19:19:51 dyoung Exp $ */ +/* $NetBSD: mcclock_tlsb.c,v 1.18 2021/05/07 22:46:11 thorpej Exp $ */ /* * Copyright (c) 1997 by Matthew Jacob @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcclock_tlsb.c,v 1.17 2011/07/01 19:19:51 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_tlsb.c,v 1.18 2021/05/07 22:46:11 thorpej Exp $"); #include #include @@ -65,8 +65,8 @@ struct mcclock_tlsb_softc { unsigned long regbase; }; -int mcclock_tlsb_match(device_t, cfdata_t, void *); -void mcclock_tlsb_attach(device_t, device_t, void *); +static int mcclock_tlsb_match(device_t, cfdata_t, void *); +static void mcclock_tlsb_attach(device_t, device_t, void *); CFATTACH_DECL_NEW(mcclock_tlsb, sizeof(struct mcclock_tlsb_softc), mcclock_tlsb_match, mcclock_tlsb_attach, NULL, NULL); @@ -75,7 +75,7 @@ static void mcclock_tlsb_write(struct mc static u_int mcclock_tlsb_read(struct mc146818_softc *, u_int); -int +static int mcclock_tlsb_match(device_t parent, cfdata_t cf, void *aux) { struct gbus_attach_args *ga = aux; @@ -85,7 +85,7 @@ mcclock_tlsb_match(device_t parent, cfda return (1); } -void +static void mcclock_tlsb_attach(device_t parent, device_t self, void
CVS commit: src
Module Name:src Committed By: nia Date: Fri May 7 21:51:21 UTC 2021 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/man: mi src/usr.bin: Makefile Log Message: hook up aiomixer To generate a diff of this commit: cvs rdiff -u -r1.1278 -r1.1279 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1718 -r1.1719 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.234 -r1.235 src/usr.bin/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/base/mi diff -u src/distrib/sets/lists/base/mi:1.1278 src/distrib/sets/lists/base/mi:1.1279 --- src/distrib/sets/lists/base/mi:1.1278 Fri Apr 16 01:14:38 2021 +++ src/distrib/sets/lists/base/mi Fri May 7 21:51:21 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1278 2021/04/16 01:14:38 mrg Exp $ +# $NetBSD: mi,v 1.1279 2021/05/07 21:51:21 nia Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -675,6 +675,7 @@ ./usr/bin base-sys-usr ./usr/bin/Mail base-obsolete obsolete ./usr/bin/agrep base-util-bin +./usr/bin/aiomixerbase-audio-bin ./usr/bin/apply base-util-bin ./usr/bin/aproposbase-man-bin ./usr/bin/arpanamebase-bind-bin Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1718 src/distrib/sets/lists/man/mi:1.1719 --- src/distrib/sets/lists/man/mi:1.1718 Tue Apr 27 21:13:38 2021 +++ src/distrib/sets/lists/man/mi Fri May 7 21:51:21 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1718 2021/04/27 21:13:38 nia Exp $ +# $NetBSD: mi,v 1.1719 2021/05/07 21:51:21 nia Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -41,6 +41,7 @@ ./usr/share/man/cat1/Mail.0 man-obsolete obsolete ./usr/share/man/cat1/[.0 man-util-catman .cat ./usr/share/man/cat1/agrep.0 man-util-catman .cat +./usr/share/man/cat1/aiomixer.0 man-audio-catman .cat ./usr/share/man/cat1/alias.0 man-util-catman .cat ./usr/share/man/cat1/altqstat.0 man-router-catman .cat ./usr/share/man/cat1/amq.0 man-obsolete obsolete @@ -3353,6 +3354,7 @@ ./usr/share/man/html1/Mail.html man-obsolete obsolete ./usr/share/man/html1/[.html man-util-htmlman html ./usr/share/man/html1/agrep.html man-util-htmlman html +./usr/share/man/html1/aiomixer.html man-audio-htmlman html ./usr/share/man/html1/alias.html man-util-htmlman html ./usr/share/man/html1/altqstat.html man-router-htmlman html ./usr/share/man/html1/apply.html man-util-htmlman html @@ -6274,6 +6276,7 @@ ./usr/share/man/man1/Mail.1 man-obsolete obsolete ./usr/share/man/man1/[.1 man-util-man .man ./usr/share/man/man1/agrep.1 man-util-man .man +./usr/share/man/man1/aiomixer.1 man-audio-man .man ./usr/share/man/man1/alias.1 man-util-man .man ./usr/share/man/man1/altqstat.1 man-router-man .man ./usr/share/man/man1/amq.1 man-obsolete obsolete Index: src/usr.bin/Makefile diff -u src/usr.bin/Makefile:1.234 src/usr.bin/Makefile:1.235 --- src/usr.bin/Makefile:1.234 Mon Dec 28 03:48:41 2020 +++ src/usr.bin/Makefile Fri May 7 21:51:20 2021 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.234 2020/12/28 03:48:41 htodd Exp $ +# $NetBSD: Makefile,v 1.235 2021/05/07 21:51:20 nia Exp $ # from: @(#)Makefile 8.3 (Berkeley) 1/7/94 .include -SUBDIR= apply asa at audio audiocfg \ +SUBDIR= aiomixer apply asa at audio audiocfg \ banner base64 basename biff bthset btkey btpin \ bzip2 bzip2recover c11 c89 c99 cal calendar cap_mkdb cdplay \ checknr chflags chpass cksum cmp cleantags col colcrt colrm \
CVS commit: src/usr.bin/aiomixer
Module Name:src Committed By: nia Date: Fri May 7 19:37:03 UTC 2021 Modified Files: src/usr.bin/aiomixer: draw.c Log Message: aiomixer: display the unit type for value controls To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/aiomixer/draw.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/aiomixer/draw.c diff -u src/usr.bin/aiomixer/draw.c:1.2 src/usr.bin/aiomixer/draw.c:1.3 --- src/usr.bin/aiomixer/draw.c:1.2 Fri May 7 17:47:30 2021 +++ src/usr.bin/aiomixer/draw.c Fri May 7 19:37:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: draw.c,v 1.2 2021/05/07 17:47:30 nia Exp $ */ +/* $NetBSD: draw.c,v 1.3 2021/05/07 19:37:03 nia Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. * All rights reserved. @@ -93,7 +93,11 @@ draw_control(struct aiomixer *aio, wclear(control->widgetpad); if (selected) wattron(control->widgetpad, A_STANDOUT); - wprintw(control->widgetpad, "%s\n", control->info.label.name); + if (value.type == AUDIO_MIXER_VALUE) + wprintw(control->widgetpad, "%s (%s)\n", + control->info.label.name, control->info.un.v.units.name); + else + wprintw(control->widgetpad, "%s\n", control->info.label.name); if (selected) wattroff(control->widgetpad, A_STANDOUT);
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Fri May 7 17:48:48 UTC 2021 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1678 To generate a diff of this commit: cvs rdiff -u -r1.1.2.87 -r1.1.2.88 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.87 src/doc/CHANGES-8.3:1.1.2.88 --- src/doc/CHANGES-8.3:1.1.2.87 Mon May 3 09:16:00 2021 +++ src/doc/CHANGES-8.3 Fri May 7 17:48:47 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.3,v 1.1.2.87 2021/05/03 09:16:00 bouyer Exp $ +# $NetBSD: CHANGES-8.3,v 1.1.2.88 2021/05/07 17:48:47 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -1898,3 +1898,19 @@ sys/kern/kern_exec.c1.505 via patch Fix copy in handling of POSIX_SPAWN_RESETIDS in posix_spawn(3) [martin, ticket #1677] +bin/pax/extern.h1.60 +bin/pax/options.c1.119 +sbin/newfs_udf/newfs_udf.h 1.7 (patch) +sbin/newfs_udf/udf_create.c 1.27 (patch) +usr.bin/config/defs.h1.106 +usr.bin/config/main.c1.100 +usr.bin/config/scan.l1.32 +usr.bin/make/main.c1.274 +usr.bin/make/make.h1.105 +usr.sbin/installboot/Makefile 1.53,1.54 +usr.sbin/installboot/installboot.h 1.41 +usr.sbin/installboot/machines.c 1.41,1.42 + + Avoid depending on common symbols. + [mrg, ticket #1678] +
CVS commit: src/usr.bin/aiomixer
Module Name:src Committed By: nia Date: Fri May 7 17:47:30 UTC 2021 Modified Files: src/usr.bin/aiomixer: draw.c Log Message: aiomixer: use standout for headings, avoid banding in header fixed a minor rendering problem when compiled against ncurses. based mostly on feedback from uwe. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/aiomixer/draw.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/aiomixer/draw.c diff -u src/usr.bin/aiomixer/draw.c:1.1 src/usr.bin/aiomixer/draw.c:1.2 --- src/usr.bin/aiomixer/draw.c:1.1 Fri May 7 16:29:24 2021 +++ src/usr.bin/aiomixer/draw.c Fri May 7 17:47:30 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: draw.c,v 1.1 2021/05/07 16:29:24 nia Exp $ */ +/* $NetBSD: draw.c,v 1.2 2021/05/07 17:47:30 nia Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,38 +36,12 @@ #include #include "draw.h" -static void bold_on(WINDOW *); -static void bold_off(WINDOW *); static int get_enum_color(const char *); static void draw_enum(struct aiomixer_control *, int, bool); static void draw_set(struct aiomixer_control *, int); static void draw_levels(struct aiomixer_control *, const struct mixer_level *, bool, bool); -static void -bold_on(WINDOW *w) -{ - /* - * Some (XXX: which?) legacy terminals do not support a Bold - * attribute. In this case, we fall back to standout. - */ - if (termattrs() & A_BOLD) - wattron(w, A_BOLD); - else - wattron(w, A_STANDOUT); -} - -static void -bold_off(WINDOW *w) -{ - chtype attrs = getattrs(w); - - if (attrs & A_BOLD) - wattroff(w, A_BOLD); - if (attrs & A_STANDOUT) - wattroff(w, A_STANDOUT); -} - void draw_mixer_select(unsigned int num_mixers, unsigned int selected_mixer) { @@ -90,7 +64,7 @@ draw_mixer_select(unsigned int num_mixer } close(fd); if (selected_mixer == i) { - bold_on(stdscr); + attron(A_STANDOUT); addstr("[*] "); } else { addstr("[ ] "); @@ -98,7 +72,7 @@ draw_mixer_select(unsigned int num_mixer printw("%s: %s %s %s\n", mixer_path, dev.name, dev.version, dev.config); if (selected_mixer == i) - bold_off(stdscr); + attroff(A_STANDOUT); } } @@ -117,21 +91,11 @@ draw_control(struct aiomixer *aio, err(EXIT_FAILURE, "failed to read from mixer device"); wclear(control->widgetpad); - if (selected) { - bold_on(control->widgetpad); - if (has_colors()) { - wattron(control->widgetpad, - COLOR_PAIR(COLOR_CONTROL_SELECTED)); - } - waddch(control->widgetpad, '*'); - if (has_colors()) { - wattroff(control->widgetpad, - COLOR_PAIR(COLOR_CONTROL_SELECTED)); - } - } + if (selected) + wattron(control->widgetpad, A_STANDOUT); wprintw(control->widgetpad, "%s\n", control->info.label.name); if (selected) - bold_off(control->widgetpad); + wattroff(control->widgetpad, A_STANDOUT); switch (value.type) { case AUDIO_MIXER_ENUM: @@ -193,8 +157,12 @@ draw_enum(struct aiomixer_control *contr for (i = 0; i < control->info.un.e.num_mem; ++i) { e = >info.un.e; - if (ord == e->member[i].ord && selected) - bold_on(control->widgetpad); + if (ord == e->member[i].ord && selected) { + if (termattrs() & A_BOLD) +wattron(control->widgetpad, A_BOLD); + else +wattron(control->widgetpad, A_STANDOUT); + } waddch(control->widgetpad, '['); if (ord == e->member[i].ord) { if (has_colors()) { @@ -213,8 +181,12 @@ draw_enum(struct aiomixer_control *contr } } waddch(control->widgetpad, ']'); - if (ord == e->member[i].ord && selected) - bold_off(control->widgetpad); + if (ord == e->member[i].ord && selected) { + if (termattrs() & A_BOLD) +wattroff(control->widgetpad, A_BOLD); + else +wattroff(control->widgetpad, A_STANDOUT); + } if (i != (e->num_mem - 1)) waddstr(control->widgetpad, ", "); } @@ -243,13 +215,19 @@ draw_set(struct aiomixer_control *contro } waddstr(control->widgetpad, "] "); if (control->setindex == i) { - bold_on(control->widgetpad); - waddch(control->widgetpad, '*'); + if (termattrs() & A_BOLD) +wattron(control->widgetpad, A_BOLD); + else +wattron(control->widgetpad, A_STANDOUT); } wprintw(control->widgetpad, "%s", control->info.un.s.member[i].label.name); - if (control->setindex == i) - bold_off(control->widgetpad); + if (control->setindex == i) { + if (termattrs() & A_BOLD) +wattroff(control->widgetpad, A_BOLD); + else +wattroff(control->widgetpad, A_STANDOUT); + } if (i != (control->info.un.s.num_mem - 1)) waddstr(control->widgetpad, ", "); } @@ -265,7 +243,10 @@ draw_levels(struct aiomixer_control *con for (i = 0; i < control->info.un.v.num_channels; ++i) { if ((selected && !channels_unlocked) || (control->setindex == i && channels_unlocked)) { - bold_on(control->widgetpad); + if (termattrs() & A_BOLD) +wattron(control->widgetpad,
CVS commit: [netbsd-8] src
Module Name:src Committed By: martin Date: Fri May 7 17:40:31 UTC 2021 Modified Files: src/bin/pax [netbsd-8]: extern.h options.c src/sbin/newfs_udf [netbsd-8]: newfs_udf.h udf_create.c src/usr.bin/config [netbsd-8]: defs.h main.c scan.l src/usr.bin/make [netbsd-8]: main.c make.h src/usr.sbin/installboot [netbsd-8]: Makefile installboot.h machines.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1678): bin/pax/options.c: revision 1.119 usr.bin/config/scan.l: revision 1.32 usr.bin/make/main.c: revision 1.274 bin/pax/extern.h: revision 1.60 usr.bin/config/defs.h: revision 1.106 usr.bin/make/make.h: revision 1.105 sbin/newfs_udf/udf_create.c: revision 1.27 (patch) sbin/newfs_udf/newfs_udf.h: revision 1.7 (patch) usr.bin/config/main.c: revision 1.100 usr.sbin/installboot/Makefile: revisions 1.53,1.54 (patch) usr.sbin/installboot/installboot.h: revision 1.41 (patch) usr.sbin/installboot/machines.c: revisisons 1.41,1.42 (patch) Avoid depending on common symbols. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.59.26.1 src/bin/pax/extern.h cvs rdiff -u -r1.118 -r1.118.8.1 src/bin/pax/options.c cvs rdiff -u -r1.5 -r1.5.22.1 src/sbin/newfs_udf/newfs_udf.h cvs rdiff -u -r1.25 -r1.25.8.1 src/sbin/newfs_udf/udf_create.c cvs rdiff -u -r1.98.6.1 -r1.98.6.2 src/usr.bin/config/defs.h cvs rdiff -u -r1.91 -r1.91.6.1 src/usr.bin/config/main.c cvs rdiff -u -r1.26 -r1.26.6.1 src/usr.bin/config/scan.l cvs rdiff -u -r1.265.2.1 -r1.265.2.2 src/usr.bin/make/main.c cvs rdiff -u -r1.102 -r1.102.6.1 src/usr.bin/make/make.h cvs rdiff -u -r1.51 -r1.51.6.1 src/usr.sbin/installboot/Makefile cvs rdiff -u -r1.39 -r1.39.18.1 src/usr.sbin/installboot/installboot.h \ src/usr.sbin/installboot/machines.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/pax/extern.h diff -u src/bin/pax/extern.h:1.59 src/bin/pax/extern.h:1.59.26.1 --- src/bin/pax/extern.h:1.59 Thu Aug 9 08:09:21 2012 +++ src/bin/pax/extern.h Fri May 7 17:40:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.59 2012/08/09 08:09:21 christos Exp $ */ +/* $NetBSD: extern.h,v 1.59.26.1 2021/05/07 17:40:31 martin Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -204,9 +204,8 @@ void options(int, char **); OPLIST * opt_next(void); int bad_opt(void); int mkpath(char *); -char *chdname; #if !HAVE_NBTOOL_CONFIG_H -int do_chroot; +extern int do_chroot; #endif /* Index: src/bin/pax/options.c diff -u src/bin/pax/options.c:1.118 src/bin/pax/options.c:1.118.8.1 --- src/bin/pax/options.c:1.118 Sat Dec 19 18:45:52 2015 +++ src/bin/pax/options.c Fri May 7 17:40:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: options.c,v 1.118 2015/12/19 18:45:52 christos Exp $ */ +/* $NetBSD: options.c,v 1.118.8.1 2021/05/07 17:40:31 martin Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; #else -__RCSID("$NetBSD: options.c,v 1.118 2015/12/19 18:45:52 christos Exp $"); +__RCSID("$NetBSD: options.c,v 1.118.8.1 2021/05/07 17:40:31 martin Exp $"); #endif #endif /* not lint */ @@ -74,6 +74,11 @@ __RCSID("$NetBSD: options.c,v 1.118 2015 #include "mtree.h" #endif /* SMALL */ +char *chdname; +#if !HAVE_NBTOOL_CONFIG_H +int do_chroot; +#endif + /* * Routines which handle command line options */ Index: src/sbin/newfs_udf/newfs_udf.h diff -u src/sbin/newfs_udf/newfs_udf.h:1.5 src/sbin/newfs_udf/newfs_udf.h:1.5.22.1 --- src/sbin/newfs_udf/newfs_udf.h:1.5 Fri Aug 9 15:11:08 2013 +++ src/sbin/newfs_udf/newfs_udf.h Fri May 7 17:40:31 2021 @@ -52,10 +52,6 @@ extern int meta_perc; extern float meta_fract; -/* shared structure between udf_create.c users */ -struct udf_create_context context; -struct udf_disclayout layout; - /* prototypes */ int udf_write_sector(void *sector, uint64_t location); int udf_update_trackinfo(struct mmc_discinfo *di, struct mmc_trackinfo *ti); Index: src/sbin/newfs_udf/udf_create.c diff -u src/sbin/newfs_udf/udf_create.c:1.25 src/sbin/newfs_udf/udf_create.c:1.25.8.1 --- src/sbin/newfs_udf/udf_create.c:1.25 Tue Jun 16 23:18:55 2015 +++ src/sbin/newfs_udf/udf_create.c Fri May 7 17:40:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_create.c,v 1.25 2015/06/16 23:18:55 christos Exp $ */ +/* $NetBSD: udf_create.c,v 1.25.8.1 2021/05/07 17:40:31 martin Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: udf_create.c,v 1.25 2015/06/16 23:18:55 christos Exp $"); +__RCSID("$NetBSD: udf_create.c,v 1.25.8.1 2021/05/07 17:40:31 martin Exp $"); #include #include @@ -52,6 +52,10 @@ __RCSID("$NetBSD: udf_create.c,v 1.25 20 # endif #endif +/* shared structure between udf_create.c users */ +struct udf_create_context context; +struct
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Fri May 7 16:58:34 UTC 2021 Modified Files: src/sys/arch/alpha/common: bus_dma.c shared_intr.c src/sys/arch/alpha/isa: isa_machdep.c isadma_bounce.c mcclock_isa.c src/sys/arch/alpha/jensenio: com_jensenio.c jensenio.c jensenio_dma.c jensenio_intr.c lpt_jensenio.c mcclock_jensenio.c pckbc_jensenio.c src/sys/arch/alpha/pci: apecs_pci.c cia_pci.c dwlpx_pci.c irongate_pci.c lca_pci.c mcpcia_pci.c sio.c sio_pic.c tsp_pci.c ttwoga_pci.c src/sys/arch/alpha/sableio: com_sableio.c fdc_sableio.c lpt_sableio.c pckbc_sableio.c sableio.c src/sys/arch/alpha/tc: ioasic.c mcclock_ioasic.c tc_3000_300.c tc_3000_500.c tc_conf.h Log Message: Liberally sprinkle static around to get more symbols out of the global namespace. A small bit of const poisoning in the TC code. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/alpha/common/bus_dma.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/alpha/common/shared_intr.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/alpha/isa/isa_machdep.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/alpha/isa/isadma_bounce.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/alpha/isa/mcclock_isa.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/alpha/jensenio/com_jensenio.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/alpha/jensenio/jensenio.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/alpha/jensenio/jensenio_dma.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/jensenio/jensenio_intr.c \ src/sys/arch/alpha/jensenio/lpt_jensenio.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/alpha/jensenio/mcclock_jensenio.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/alpha/jensenio/pckbc_jensenio.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/alpha/pci/apecs_pci.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/alpha/pci/cia_pci.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/alpha/pci/dwlpx_pci.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/alpha/pci/irongate_pci.c \ src/sys/arch/alpha/pci/tsp_pci.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/alpha/pci/lca_pci.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/alpha/pci/mcpcia_pci.c cvs rdiff -u -r1.55 -r1.56 src/sys/arch/alpha/pci/sio.c cvs rdiff -u -r1.46 -r1.47 src/sys/arch/alpha/pci/sio_pic.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/alpha/pci/ttwoga_pci.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/alpha/sableio/com_sableio.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/alpha/sableio/fdc_sableio.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/alpha/sableio/lpt_sableio.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/alpha/sableio/pckbc_sableio.c \ src/sys/arch/alpha/sableio/sableio.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/tc/ioasic.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/alpha/tc/mcclock_ioasic.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/tc/tc_3000_300.c cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/tc/tc_3000_500.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/alpha/tc/tc_conf.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/arch/alpha/common/bus_dma.c diff -u src/sys/arch/alpha/common/bus_dma.c:1.71 src/sys/arch/alpha/common/bus_dma.c:1.72 --- src/sys/arch/alpha/common/bus_dma.c:1.71 Wed Nov 18 02:04:29 2020 +++ src/sys/arch/alpha/common/bus_dma.c Fri May 7 16:58:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.71 2020/11/18 02:04:29 thorpej Exp $ */ +/* $NetBSD: bus_dma.c,v 1.72 2021/05/07 16:58:33 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71 2020/11/18 02:04:29 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.72 2021/05/07 16:58:33 thorpej Exp $"); #include #include @@ -50,9 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v #include -int _bus_dmamap_load_buffer_direct(bus_dma_tag_t, - bus_dmamap_t, void *, bus_size_t, struct vmspace *, int, - paddr_t *, int *, int); +static int _bus_dmamap_load_buffer_direct(bus_dma_tag_t, + bus_dmamap_t, void *, bus_size_t, struct vmspace *, int, + paddr_t *, int *, int); extern paddr_t avail_start, avail_end; /* from pmap.c */ @@ -129,7 +129,7 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus * the starting segment on entrance, and the ending segment on exit. * first indicates if this is the first invocation of this function. */ -int +static int _bus_dmamap_load_buffer_direct(bus_dma_tag_t t, bus_dmamap_t map, void *buf, size_t buflen, struct vmspace *vm, int flags, paddr_t *lastaddrp, int *segp, int first) Index: src/sys/arch/alpha/common/shared_intr.c diff -u src/sys/arch/alpha/common/shared_intr.c:1.26 src/sys/arch/alpha/common/shared_intr.c:1.27 --- src/sys/arch/alpha/common/shared_intr.c:1.26 Sat Sep 26 02:35:31 2020 +++ src/sys/arch/alpha/common/shared_intr.c Fri May 7 16:58:33 2021 @@ -1,4 +1,4 @@ -/*
CVS commit: src/sys/dev/tc
Module Name:src Committed By: thorpej Date: Fri May 7 16:55:58 UTC 2021 Modified Files: src/sys/dev/tc: ioasic_subr.c ioasicvar.h tc.c tcvar.h Log Message: A small bit of const poisoning. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/tc/ioasic_subr.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/tc/ioasicvar.h cvs rdiff -u -r1.57 -r1.58 src/sys/dev/tc/tc.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/tc/tcvar.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/tc/ioasic_subr.c diff -u src/sys/dev/tc/ioasic_subr.c:1.14 src/sys/dev/tc/ioasic_subr.c:1.15 --- src/sys/dev/tc/ioasic_subr.c:1.14 Sat Apr 24 23:36:59 2021 +++ src/sys/dev/tc/ioasic_subr.c Fri May 7 16:55:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ioasic_subr.c,v 1.14 2021/04/24 23:36:59 thorpej Exp $ */ +/* $NetBSD: ioasic_subr.c,v 1.15 2021/05/07 16:55:58 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: ioasic_subr.c,v 1.14 2021/04/24 23:36:59 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ioasic_subr.c,v 1.15 2021/05/07 16:55:58 thorpej Exp $"); #include #include @@ -53,8 +53,8 @@ ioasicprint(void *aux, const char *pnp) } void -ioasic_attach_devs(struct ioasic_softc *sc, struct ioasic_dev *ioasic_devs, -int ioasic_ndevs) +ioasic_attach_devs(struct ioasic_softc *sc, +const struct ioasic_dev *ioasic_devs, int ioasic_ndevs) { struct ioasicdev_attach_args idev; int i; Index: src/sys/dev/tc/ioasicvar.h diff -u src/sys/dev/tc/ioasicvar.h:1.22 src/sys/dev/tc/ioasicvar.h:1.23 --- src/sys/dev/tc/ioasicvar.h:1.22 Sat Jun 4 01:49:44 2011 +++ src/sys/dev/tc/ioasicvar.h Fri May 7 16:55:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ioasicvar.h,v 1.22 2011/06/04 01:49:44 tsutsui Exp $ */ +/* $NetBSD: ioasicvar.h,v 1.23 2021/05/07 16:55:58 thorpej Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. @@ -67,6 +67,6 @@ voidioasic_intr_establish(device_t, int, int (*)(void *), void *); voidioasic_intr_disestablish(device_t, void *); void ioasic_attach_devs(struct ioasic_softc *, - struct ioasic_dev *, int); + const struct ioasic_dev *, int); #endif /* _DEV_TC_IOASICVAR_ */ Index: src/sys/dev/tc/tc.c diff -u src/sys/dev/tc/tc.c:1.57 src/sys/dev/tc/tc.c:1.58 --- src/sys/dev/tc/tc.c:1.57 Sat Apr 24 23:36:59 2021 +++ src/sys/dev/tc/tc.c Fri May 7 16:55:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tc.c,v 1.57 2021/04/24 23:36:59 thorpej Exp $ */ +/* $NetBSD: tc.c,v 1.58 2021/05/07 16:55:58 thorpej Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.57 2021/04/24 23:36:59 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.58 2021/05/07 16:55:58 thorpej Exp $"); #include "opt_tcverbose.h" @@ -73,7 +73,7 @@ tcattach(device_t parent, device_t self, struct tcbus_attach_args *tba = aux; struct tc_attach_args ta; const struct tc_builtin *builtin; - struct tc_slotdesc *slot; + const struct tc_slotdesc *slot; tc_addr_t tcaddr; int i; int locs[TCCF_NLOCS]; @@ -129,7 +129,8 @@ tcattach(device_t parent, device_t self, /* * Mark the slot as used, so we don't check it later. */ - sc->sc_slots[builtin->tcb_slot].tcs_used = 1; + KASSERT(builtin->tcb_slot >=0 && builtin->tcb_slot <= 31); + sc->sc_slots_used |= __BIT(builtin->tcb_slot); locs[TCCF_SLOT] = builtin->tcb_slot; locs[TCCF_OFFSET] = builtin->tcb_offset; @@ -149,7 +150,7 @@ tcattach(device_t parent, device_t self, slot = >sc_slots[i]; /* If already checked above, don't look again now. */ - if (slot->tcs_used) + if (sc->sc_slots_used & __BIT(i)) continue; /* @@ -175,7 +176,7 @@ tcattach(device_t parent, device_t self, /* * Mark the slot as used. */ - slot->tcs_used = 1; + sc->sc_slots_used |= __BIT(i); locs[TCCF_SLOT] = i; locs[TCCF_OFFSET] = 0; Index: src/sys/dev/tc/tcvar.h diff -u src/sys/dev/tc/tcvar.h:1.27 src/sys/dev/tc/tcvar.h:1.28 --- src/sys/dev/tc/tcvar.h:1.27 Fri Jun 9 17:55:18 2017 +++ src/sys/dev/tc/tcvar.h Fri May 7 16:55:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tcvar.h,v 1.27 2017/06/09 17:55:18 flxd Exp $ */ +/* $NetBSD: tcvar.h,v 1.28 2021/05/07 16:55:58 thorpej Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. @@ -68,7 +68,8 @@ struct tc_softc { int sc_speed; int sc_nslots; - struct tc_slotdesc *sc_slots; + const struct tc_slotdesc *sc_slots; + uint32_t sc_slots_used; const struct evcnt *(*sc_intr_evcnt)(device_t, void *); void (*sc_intr_establish)(device_t, void *, @@ -87,7 +88,7 @@ struct tcbus_attach_args { /* Bus information */ u_int tba_speed; /* see TC_SPEED_* below */ u_int tba_nslots; - struct tc_slotdesc *tba_slots; + const struct tc_slotdesc *tba_slots; u_int tba_nbuiltins; const struct tc_builtin
CVS commit: src/usr.bin/aiomixer
Module Name:src Committed By: nia Date: Fri May 7 16:29:24 UTC 2021 Added Files: src/usr.bin/aiomixer: Makefile aiomixer.1 app.h draw.c draw.h main.c parse.c parse.h Log Message: import aiomixer from git into usr.bin. aiomixer is a graphical (curses-based) mixer for NetBSD audio. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/usr.bin/aiomixer/Makefile \ src/usr.bin/aiomixer/aiomixer.1 src/usr.bin/aiomixer/app.h \ src/usr.bin/aiomixer/draw.c src/usr.bin/aiomixer/draw.h \ src/usr.bin/aiomixer/main.c src/usr.bin/aiomixer/parse.c \ src/usr.bin/aiomixer/parse.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/usr.bin/aiomixer/Makefile diff -u /dev/null src/usr.bin/aiomixer/Makefile:1.1 --- /dev/null Fri May 7 16:29:24 2021 +++ src/usr.bin/aiomixer/Makefile Fri May 7 16:29:24 2021 @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.1 2021/05/07 16:29:24 nia Exp $ + +PROG= aiomixer +SRCS+= main.c draw.c parse.c + +LDADD+= -lcurses +DPADD+= $(LIBCURSES) + +WARNS= 6 + +.include Index: src/usr.bin/aiomixer/aiomixer.1 diff -u /dev/null src/usr.bin/aiomixer/aiomixer.1:1.1 --- /dev/null Fri May 7 16:29:24 2021 +++ src/usr.bin/aiomixer/aiomixer.1 Fri May 7 16:29:24 2021 @@ -0,0 +1,90 @@ +.\" $NetBSD: aiomixer.1,v 1.1 2021/05/07 16:29:24 nia Exp $ +.\" +.\" Copyright (c) 2021 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Nia Alarie. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd April 4, 2019 +.Dt AIOMIXER 1 +.Os +.Sh NAME +.Nm aiomixer +.Nd graphical mixer for +.Nx +audio +.Sh SYNOPSIS +.Nm aiomixer +.Op Fl d Ar device +.Op Fl u +.Sh DESCRIPTION +.Nm +is a graphical frontend for +.Xr mixer 4 +devices that runs in your terminal. +.Pp +.Nm +is primarily controlled using the cursor keys, e.g. to select a +control, or change a control's value. +Movement similar to +.Xr vi 1 +is also supported. +The current class can be changed with the number keys. +The Q or Escape key can be used to return to the previous pane or exit +.Nm . +.Pp +By default, volume levels for individual channels cannot be changed +separately. +The U key can be pressed to toggle changing the volume of individual +channels. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl d Ar device +Used to specify an alternative mixer device. +.It Fl u +Used to unlock channels on start up. +.El +.Sh FILES +.Bl -tag -width /dev/mixer[0-3] -compact +.It Pa /dev/mixer +.It Pa /dev/mixer[0-3] +.El +.Sh SEE ALSO +.Xr mixerctl 1 , +.Xr mixer 4 +.Sh HISTORY +The first version (only available in pkgsrc) didn't support +.Dv AUDIO_MIXER_SET +properly, among other bugs. +.Sh AUTHORS +.Nm +was written by +.An Nia Alarie +.Aq n...@netbsd.org . +.Sh BUGS +.Nm aiomixer +shows whatever mixer nodes the audio device's driver returns. +Some drivers do not provide the most user-friendly control names. Index: src/usr.bin/aiomixer/app.h diff -u /dev/null src/usr.bin/aiomixer/app.h:1.1 --- /dev/null Fri May 7 16:29:24 2021 +++ src/usr.bin/aiomixer/app.h Fri May 7 16:29:24 2021 @@ -0,0 +1,82 @@ +/* $NetBSD: app.h,v 1.1 2021/05/07 16:29:24 nia Exp $ */ +/*- + * Copyright (c) 2021 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Nia Alarie. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code
CVS commit: src/tools/compat
Module Name:src Committed By: cjep Date: Fri May 7 14:52:59 UTC 2021 Modified Files: src/tools/compat: README Log Message: More test notes from using build.sh against non NetBSD platforms. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tools/compat/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/compat/README diff -u src/tools/compat/README:1.14 src/tools/compat/README:1.15 --- src/tools/compat/README:1.14 Thu May 6 07:32:15 2021 +++ src/tools/compat/README Fri May 7 14:52:59 2021 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.14 2021/05/06 07:32:15 cjep Exp $ +$NetBSD: README,v 1.15 2021/05/07 14:52:59 cjep Exp $ Special notes for cross-hosting a NetBSD build on certain platforms. Only those platforms which have been tested to complete a "build.sh" run @@ -16,17 +16,22 @@ In addition all hosts must provide the f FreeBSD === -build.sh was recently tested on FreeBSD 13 with the compiler tools installed. +build.sh was recently tested on: +* FreeBSD 13 (amd64, aarch64) +* FreeBSD 12.2 (amd64, aarch64) +* FreeBSD 11.4 (amd64) +* FreeBSD 10.4 (amd64) Linux = build.sh has been tested on: * Amazon Linux 2 (x86) -* Debian 10 (x86) -* Red Hat Enterprise Linux 8 (x86) +* Debian 10 (x86, aarch64) +* Red Hat Enterprise Linux 8 (x86, aarch64) * SUSE Enterprise Server 15 (x86) -* Ubuntu Server 20.04 (x86) +* Ubuntu Server 20.04 (x86, aarch64) +* Ubuntu Server 18.04 (x86) * The gcc and g++ package must be installed, along with the typical system development packages (glibc-devel, etc.). The g++ package is sometimes @@ -37,12 +42,18 @@ build.sh has been tested on: * The zlib and zlib-devel packages must be installed (these are called zlib1g and zlib1g-dev on Debian and Ubuntu Linux) +* There is a known build problem on Linux/aarch64 with glibc <2.28 + macOS/Darwin -build.sh was recently tested on macOS Big Sur with an APFS filesystem -and the Xcode command line tools. (Previously, there have been issues -building on case-insensitive HFS filesystems.) +build.sh was recently tested on: +* macOS Big Sur +* macOS Catalina + +with up to date Xcode command line tools and APFS filesystems. +(Previously, there have been issues building on case-insensitive +HFS filesystems.) HP-UX =
CVS commit: src/external/gpl3/gdb.old/lib/libgdb
Module Name:src Committed By: rin Date: Fri May 7 12:19:48 UTC 2021 Modified Files: src/external/gpl3/gdb.old/lib/libgdb: Makefile Log Message: For GCC10, add -Wno-unused-result for alloca(0) here and there. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gdb.old/lib/libgdb/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/gpl3/gdb.old/lib/libgdb/Makefile diff -u src/external/gpl3/gdb.old/lib/libgdb/Makefile:1.11 src/external/gpl3/gdb.old/lib/libgdb/Makefile:1.12 --- src/external/gpl3/gdb.old/lib/libgdb/Makefile:1.11 Thu Oct 8 08:31:37 2020 +++ src/external/gpl3/gdb.old/lib/libgdb/Makefile Fri May 7 12:19:48 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2020/10/08 08:31:37 rin Exp $ +# $NetBSD: Makefile,v 1.12 2021/05/07 12:19:48 rin Exp $ NOCTF= HOSTPROG_CXX= 1 @@ -79,3 +79,6 @@ CLEANDIRFILES+= \ # corelow.c CWARNFLAGS.gcc+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=alloca-larger-than= :} + +# for alloca(0) +CWARNFLAGS.gcc+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-unused-result :}
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Fri May 7 11:11:11 UTC 2021 Modified Files: src/external/bsd/tmux/dist: mode-tree.c Log Message: Don't free things twice (Kengo Nakahara) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/tmux/dist/mode-tree.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/tmux/dist/mode-tree.c diff -u src/external/bsd/tmux/dist/mode-tree.c:1.7 src/external/bsd/tmux/dist/mode-tree.c:1.8 --- src/external/bsd/tmux/dist/mode-tree.c:1.7 Sat Apr 17 16:42:09 2021 +++ src/external/bsd/tmux/dist/mode-tree.c Fri May 7 07:11:11 2021 @@ -139,7 +139,7 @@ mode_tree_free_item(struct mode_tree_ite mode_tree_free_items(>children); free(__UNCONST(mti->name)); - free(__UNCONST(mti->name)); + free(__UNCONST(mti->text)); free(__UNCONST(mti->keystr)); free(mti);
CVS commit: src/sys/dev/dm
Module Name:src Committed By: hannken Date: Fri May 7 09:54:43 UTC 2021 Modified Files: src/sys/dev/dm: device-mapper.c Log Message: Track the number of cdev and bdev opens and fail dm_detach() on open devices unless detach is forced. PR kern/54969 (Disk cache is no longer flushed on shutdown) To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/dev/dm/device-mapper.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/dm/device-mapper.c diff -u src/sys/dev/dm/device-mapper.c:1.61 src/sys/dev/dm/device-mapper.c:1.62 --- src/sys/dev/dm/device-mapper.c:1.61 Wed Jul 8 15:07:13 2020 +++ src/sys/dev/dm/device-mapper.c Fri May 7 09:54:43 2021 @@ -1,4 +1,4 @@ -/*$NetBSD: device-mapper.c,v 1.61 2020/07/08 15:07:13 thorpej Exp $ */ +/*$NetBSD: device-mapper.c,v 1.62 2021/05/07 09:54:43 hannken Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -260,8 +260,17 @@ dm_attach(device_t parent, device_t self static int dm_detach(device_t self, int flags) { + bool busy; dm_dev_t *dmv; + dmv = dm_dev_lookup(NULL, NULL, device_unit(self)); + mutex_enter(>diskp->dk_openlock); + busy = (dmv->diskp->dk_openmask != 0 && (flags & DETACH_FORCE) == 0); + mutex_exit(>diskp->dk_openlock); + dm_dev_unbusy(dmv); + if (busy) + return EBUSY; + pmf_device_deregister(self); /* Detach device from global device list */ @@ -334,6 +343,25 @@ dmdestroy(void) static int dmopen(dev_t dev, int flags, int mode, struct lwp *l) { + dm_dev_t *dmv; + struct disk *dk; + + dmv = dm_dev_lookup(NULL, NULL, minor(dev)); + if (dmv) { + dk = dmv->diskp; + mutex_enter(>dk_openlock); + switch (mode) { + case S_IFCHR: + dk->dk_copenmask |= 1; + break; + case S_IFBLK: + dk->dk_bopenmask |= 1; + break; + } + dk->dk_openmask = dk->dk_copenmask | dk->dk_bopenmask; + mutex_exit(>dk_openlock); + dm_dev_unbusy(dmv); + } aprint_debug("dm open routine called %" PRIu32 "\n", minor(dev)); return 0; @@ -342,8 +370,27 @@ dmopen(dev_t dev, int flags, int mode, s static int dmclose(dev_t dev, int flags, int mode, struct lwp *l) { + dm_dev_t *dmv; + struct disk *dk; aprint_debug("dm close routine called %" PRIu32 "\n", minor(dev)); + + dmv = dm_dev_lookup(NULL, NULL, minor(dev)); + if (dmv) { + dk = dmv->diskp; + mutex_enter(>dk_openlock); + switch (mode) { + case S_IFCHR: + dk->dk_copenmask &= ~1; + break; + case S_IFBLK: + dk->dk_bopenmask &= ~1; + break; + } + dk->dk_openmask = dk->dk_copenmask | dk->dk_bopenmask; + mutex_exit(>dk_openlock); + dm_dev_unbusy(dmv); + } return 0; }
CVS commit: src/sys/dev/dm
Module Name:src Committed By: hannken Date: Fri May 7 09:53:39 UTC 2021 Modified Files: src/sys/dev/dm: dm_ioctl.c Log Message: Make sure the unit number of device-mapper devices matches their minor number. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/dev/dm/dm_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/dev/dm/dm_ioctl.c diff -u src/sys/dev/dm/dm_ioctl.c:1.50 src/sys/dev/dm/dm_ioctl.c:1.51 --- src/sys/dev/dm/dm_ioctl.c:1.50 Wed Jul 8 15:07:13 2020 +++ src/sys/dev/dm/dm_ioctl.c Fri May 7 09:53:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dm_ioctl.c,v 1.50 2020/07/08 15:07:13 thorpej Exp $ */ +/* $NetBSD: dm_ioctl.c,v 1.51 2021/05/07 09:53:39 hannken Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v 1.50 2020/07/08 15:07:13 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v 1.51 2021/05/07 09:53:39 hannken Exp $"); /* * Locking is used to synchronise between ioctl calls and between dm_table's @@ -92,18 +92,12 @@ __KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v #include "netbsd-dm.h" #include "dm.h" +#include "ioconf.h" +extern struct cfattach dm_ca; static uint32_t sc_minor_num; uint32_t dm_dev_counter; -/* Generic cf_data for device-mapper driver */ -static struct cfdata dm_cfdata = { - .cf_name = "dm", - .cf_atname = "dm", - .cf_fstate = FSTATE_STAR, - .cf_unit = 0 -}; - #define DM_REMOVE_FLAG(flag, name) do { \ prop_dictionary_get_uint32(dm_dict,DM_IOCTL_FLAGS,); \ flag &= ~name; \ @@ -196,6 +190,7 @@ dm_dev_create_ioctl(prop_dictionary_t dm int r; uint32_t flags; device_t devt; + cfdata_t cf; flags = 0; name = NULL; @@ -214,7 +209,13 @@ dm_dev_create_ioctl(prop_dictionary_t dm dm_dev_unbusy(dmv); return EEXIST; } - if ((devt = config_attach_pseudo(_cfdata)) == NULL) { + cf = kmem_alloc(sizeof(*cf), KM_SLEEP); + cf->cf_name = dm_cd.cd_name; + cf->cf_atname = dm_ca.ca_name; + cf->cf_unit = atomic_inc_32_nv(_minor_num); + cf->cf_fstate = FSTATE_NOTFOUND; + if ((devt = config_attach_pseudo(cf)) == NULL) { + kmem_free(cf, sizeof(*cf)); aprint_error("Unable to attach pseudo device dm/%s\n", name); return (ENOMEM); } @@ -229,7 +230,7 @@ dm_dev_create_ioctl(prop_dictionary_t dm if (name) strlcpy(dmv->name, name, DM_NAME_LEN); - dmv->minor = (uint64_t)atomic_inc_32_nv(_minor_num); + dmv->minor = cf->cf_unit; dmv->flags = 0; /* device flags are set when needed */ dmv->ref_cnt = 0; dmv->event_nr = 0; @@ -365,6 +366,8 @@ dm_dev_rename_ioctl(prop_dictionary_t dm int dm_dev_remove_ioctl(prop_dictionary_t dm_dict) { + int error; + cfdata_t cf; dm_dev_t *dmv; const char *name, *uuid; uint32_t flags, minor; @@ -398,7 +401,11 @@ dm_dev_remove_ioctl(prop_dictionary_t dm * This will call dm_detach routine which will actually removes * device. */ - return config_detach(devt, DETACH_QUIET); + cf = device_cfdata(devt); + error = config_detach(devt, DETACH_QUIET); + if (error == 0) + kmem_free(cf, sizeof(*cf)); + return error; } /*
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Fri May 7 09:15:52 UTC 2021 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Print the error value of ixgbe_reset_hw() for debugging. To generate a diff of this commit: cvs rdiff -u -r1.281 -r1.282 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.281 src/sys/dev/pci/ixgbe/ixgbe.c:1.282 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.281 Fri Apr 30 06:55:32 2021 +++ src/sys/dev/pci/ixgbe/ixgbe.c Fri May 7 09:15:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.281 2021/04/30 06:55:32 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.282 2021/05/07 09:15:52 msaitoh Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.281 2021/04/30 06:55:32 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.282 2021/05/07 09:15:52 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1004,7 +1004,8 @@ ixgbe_attach(device_t parent, device_t d unsupported_sfp = true; error = IXGBE_SUCCESS; } else if (error) { - aprint_error_dev(dev, "Hardware initialization failed\n"); + aprint_error_dev(dev, + "Hardware initialization failed(error = %d)\n", error); error = EIO; goto err_late; }