CVS commit: src/tests/games
Module Name:src Committed By: pgoyette Date: Mon Jun 27 05:29:32 UTC 2016 Modified Files: src/tests/games: t_factor.sh Log Message: Do this more cleanly - put the do-we-have-crypto check inside the actual do-the-test code rather than in a test's head() code. This way, if we ever add more tests, we simply need to invoke the common do-the-test code with an appropriate flag argument rather than duplicating the test. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/games/t_factor.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/games/t_factor.sh diff -u src/tests/games/t_factor.sh:1.8 src/tests/games/t_factor.sh:1.9 --- src/tests/games/t_factor.sh:1.8 Mon Jun 27 05:08:18 2016 +++ src/tests/games/t_factor.sh Mon Jun 27 05:29:32 2016 @@ -1,4 +1,4 @@ -# $NetBSD: t_factor.sh,v 1.8 2016/06/27 05:08:18 pgoyette Exp $ +# $NetBSD: t_factor.sh,v 1.9 2016/06/27 05:29:32 pgoyette Exp $ # # Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -27,6 +27,10 @@ expect() { echo "${2}" >expout + ncrypt=$( ldd /usr/games/factor | grep -c -- -lcrypt ) + if [ "X$3" != "X" -a $ncrypt -eq 0 ] ; then + atf_skip "crypto needed for huge non-prime factors - PR bin/23663" + fi atf_check -s eq:0 -o file:expout -e empty /usr/games/factor ${1} } @@ -65,11 +69,7 @@ loop2_head() { atf_set "require.progs" "/usr/games/factor" } loop2_body() { - ncrypt=$( ldd /usr/games/factor | grep -c -- -lcrypt ) - if [ $ncrypt -eq 0 ] ; then - atf_skip "crypto needed for huge non-prime factors - PR bin/23663" - fi - expect '91' '91: 7 13 769231 1428571' ExFail + expect '91' '91: 7 13 769231 1428571' Need_Crypto } atf_init_test_cases()
CVS commit: src/tests/games
Module Name:src Committed By: pgoyette Date: Mon Jun 27 05:29:32 UTC 2016 Modified Files: src/tests/games: t_factor.sh Log Message: Do this more cleanly - put the do-we-have-crypto check inside the actual do-the-test code rather than in a test's head() code. This way, if we ever add more tests, we simply need to invoke the common do-the-test code with an appropriate flag argument rather than duplicating the test. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/games/t_factor.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/games
Module Name:src Committed By: pgoyette Date: Mon Jun 27 05:08:18 UTC 2016 Modified Files: src/tests/games: t_factor.sh Log Message: Split each test into its own test case. For test case loop2, where there are multiple prime factors greater than 65535, skip the test if the program was not built with crypto support. We need crypto/openssl for large factors. Should address PR bin/23663 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/games/t_factor.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/games/t_factor.sh diff -u src/tests/games/t_factor.sh:1.7 src/tests/games/t_factor.sh:1.8 --- src/tests/games/t_factor.sh:1.7 Fri Nov 19 12:31:36 2010 +++ src/tests/games/t_factor.sh Mon Jun 27 05:08:18 2016 @@ -1,4 +1,4 @@ -# $NetBSD: t_factor.sh,v 1.7 2010/11/19 12:31:36 pgoyette Exp $ +# $NetBSD: t_factor.sh,v 1.8 2016/06/27 05:08:18 pgoyette Exp $ # # Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -30,29 +30,52 @@ expect() { atf_check -s eq:0 -o file:expout -e empty /usr/games/factor ${1} } -atf_test_case overflow -overflow_head() { +atf_test_case overflow1 +overflow1_head() { atf_set "descr" "Tests for overflow conditions" atf_set "require.progs" "/usr/games/factor" } -overflow_body() { +overflow1_body() { expect '8675309' '8675309: 8675309' +} + +atf_test_case overflow2 +overflow2_head() { + atf_set "descr" "Tests for overflow conditions" + atf_set "require.progs" "/usr/games/factor" +} +overflow2_body() { expect '6172538568' '6172538568: 2 2 2 3 7 17 2161253' } -atf_test_case loop -loop_head() { +atf_test_case loop1 +loop1_head() { atf_set "descr" "Tests some cases that once locked the program" \ "in an infinite loop" atf_set "require.progs" "/usr/games/factor" } -loop_body() { - expect '91' '91: 7 13 769231 1428571' +loop1_body() { expect '2147483647111311' '2147483647111311: 3 3 3 131 607148331103' } +atf_test_case loop2 +loop2_head() { + atf_set "descr" "Tests some cases that once locked the program" \ + "in an infinite loop" + atf_set "require.progs" "/usr/games/factor" +} +loop2_body() { + ncrypt=$( ldd /usr/games/factor | grep -c -- -lcrypt ) + if [ $ncrypt -eq 0 ] ; then + atf_skip "crypto needed for huge non-prime factors - PR bin/23663" + fi + expect '91' '91: 7 13 769231 1428571' ExFail +} + atf_init_test_cases() { - atf_add_test_case overflow - atf_add_test_case loop + atf_add_test_case overflow1 + atf_add_test_case overflow2 + atf_add_test_case loop1 + atf_add_test_case loop2 }
CVS commit: src/tests/games
Module Name:src Committed By: pgoyette Date: Mon Jun 27 05:08:18 UTC 2016 Modified Files: src/tests/games: t_factor.sh Log Message: Split each test into its own test case. For test case loop2, where there are multiple prime factors greater than 65535, skip the test if the program was not built with crypto support. We need crypto/openssl for large factors. Should address PR bin/23663 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/games/t_factor.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Mon Jun 27 01:46:04 UTC 2016 Modified Files: src/sys/kern: core_elf32.c Log Message: PR/51277: Fix compat32 coredumping that broke with the aux vector note addition. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/kern/core_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Mon Jun 27 01:46:04 UTC 2016 Modified Files: src/sys/kern: core_elf32.c Log Message: PR/51277: Fix compat32 coredumping that broke with the aux vector note addition. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/kern/core_elf32.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/kern/core_elf32.c diff -u src/sys/kern/core_elf32.c:1.46 src/sys/kern/core_elf32.c:1.47 --- src/sys/kern/core_elf32.c:1.46 Mon May 23 20:49:56 2016 +++ src/sys/kern/core_elf32.c Sun Jun 26 21:46:04 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: core_elf32.c,v 1.46 2016/05/24 00:49:56 christos Exp $ */ +/* $NetBSD: core_elf32.c,v 1.47 2016/06/27 01:46:04 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -40,10 +40,11 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.46 2016/05/24 00:49:56 christos Exp $"); +__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.47 2016/06/27 01:46:04 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_coredump.h" +#include "opt_compat_netbsd32.h" #endif #ifndef ELFSIZE @@ -405,7 +406,6 @@ coredump_note_auxv(struct lwp *l, struct struct ps_strings pss; int error; struct proc *p = l->l_proc; - struct vmspace *vm; void *uauxv, *kauxv; size_t len; @@ -415,16 +415,21 @@ coredump_note_auxv(struct lwp *l, struct if (pss.ps_envstr == NULL) return EIO; -vm = p->p_vmspace; - uvmspace_addref(vm); + len = p->p_execsw->es_arglen; +#ifdef COMPAT_NETBSD32 + if (p->p_flag & PK_32) { + uauxv = (void *)((char *)pss.ps_envstr + + (pss.ps_nenvstr + 1) * sizeof(int32_t)); + len *= sizeof(int32_t); + } else +#endif + { + uauxv = (void *)(pss.ps_envstr + pss.ps_nenvstr + 1); + len *= sizeof(char *); + } - len = p->p_execsw->es_arglen * sizeof(char *); - uauxv = (void *)(pss.ps_envstr + pss.ps_nenvstr + 1); kauxv = kmem_alloc(len, KM_SLEEP); - error = copyin_vmspace(vm, uauxv, kauxv, len); - - uvmspace_free(vm); - + error = copyin_proc(p, uauxv, kauxv, len); if (error == 0) { ELFNAMEEND(coredump_savenote)(ns, ELF_NOTE_NETBSD_CORE_AUXV, ELF_NOTE_NETBSD_CORE_NAME, kauxv, len);
CVS commit: src/tests/bin/cat
Module Name:src Committed By: sevan Date: Sun Jun 26 22:50:46 UTC 2016 Modified Files: src/tests/bin/cat: d_align.in d_align.out Log Message: PR bin/4841 was filed regarding the handling of blank lines when cat was invoked with -be, the test case however did not utilise any blank lines, only testing that the text was aligned. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/bin/cat/d_align.in \ src/tests/bin/cat/d_align.out Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/bin/cat
Module Name:src Committed By: sevan Date: Sun Jun 26 22:50:46 UTC 2016 Modified Files: src/tests/bin/cat: d_align.in d_align.out Log Message: PR bin/4841 was filed regarding the handling of blank lines when cat was invoked with -be, the test case however did not utilise any blank lines, only testing that the text was aligned. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/bin/cat/d_align.in \ src/tests/bin/cat/d_align.out Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/bin/cat/d_align.in diff -u src/tests/bin/cat/d_align.in:1.1 src/tests/bin/cat/d_align.in:1.2 --- src/tests/bin/cat/d_align.in:1.1 Tue Mar 27 08:16:33 2012 +++ src/tests/bin/cat/d_align.in Sun Jun 26 22:50:46 2016 @@ -1,3 +1,5 @@ a b c + 1 2 3 + x y z Index: src/tests/bin/cat/d_align.out diff -u src/tests/bin/cat/d_align.out:1.1 src/tests/bin/cat/d_align.out:1.2 --- src/tests/bin/cat/d_align.out:1.1 Tue Mar 27 08:16:33 2012 +++ src/tests/bin/cat/d_align.out Sun Jun 26 22:50:46 2016 @@ -1,3 +1,5 @@ 1 a b c$ + $ 2 1 2 3$ + $ 3 x y z$
CVS commit: src/external/gpl3/gcc/dist/gcc/config/m68k
Module Name:src Committed By: mlelstv Date: Sun Jun 26 15:46:42 UTC 2016 Modified Files: src/external/gpl3/gcc/dist/gcc/config/m68k: netbsd-elf.h Log Message: Drop extra argument not used by format string. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h diff -u src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h:1.8 src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h:1.9 --- src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h:1.8 Sun Jan 24 09:43:33 2016 +++ src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h Sun Jun 26 15:46:42 2016 @@ -101,7 +101,7 @@ do \ if (TARGET_COLDFIRE) \ { \ asm_fprintf (FILE, "\tmovea.l #%LLP%d-.,%Ra1\n", (LABELNO)); \ -asm_fprintf (FILE, "\tlea (-6,%Rpc,%Ra1),%Ra1\n", (LABELNO)); \ +asm_fprintf (FILE, "\tlea (-6,%Rpc,%Ra1),%Ra1\n"); \ } \ else\ asm_fprintf (FILE, "\tlea (%LLP%d,%Rpc),%Ra1\n", (LABELNO)); \
CVS commit: src/external/gpl3/gcc/dist/gcc/config/m68k
Module Name:src Committed By: mlelstv Date: Sun Jun 26 15:46:42 UTC 2016 Modified Files: src/external/gpl3/gcc/dist/gcc/config/m68k: netbsd-elf.h Log Message: Drop extra argument not used by format string. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils/dist/bfd
Module Name:src Committed By: mlelstv Date: Sun Jun 26 14:44:10 UTC 2016 Modified Files: src/external/gpl3/binutils/dist/bfd: elf32-m68k.c Log Message: fix build To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/binutils/dist/bfd/elf32-m68k.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/gpl3/binutils/dist/bfd/elf32-m68k.c diff -u src/external/gpl3/binutils/dist/bfd/elf32-m68k.c:1.8 src/external/gpl3/binutils/dist/bfd/elf32-m68k.c:1.9 --- src/external/gpl3/binutils/dist/bfd/elf32-m68k.c:1.8 Wed Jun 15 14:47:23 2016 +++ src/external/gpl3/binutils/dist/bfd/elf32-m68k.c Sun Jun 26 14:44:10 2016 @@ -3440,7 +3440,7 @@ elf_m68k_discard_copies (struct elf_link if (info->warn_shared_textrel) (*_bfd_error_handler) (_("warning: dynamic relocation to `%s' in readonly section `%s'"), - h->root.root.string, s->name); + h->root.root.string, s->section->name); info->flags |= DF_TEXTREL; break; }
CVS commit: src/external/gpl3/binutils/dist/bfd
Module Name:src Committed By: mlelstv Date: Sun Jun 26 14:44:10 UTC 2016 Modified Files: src/external/gpl3/binutils/dist/bfd: elf32-m68k.c Log Message: fix build To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/binutils/dist/bfd/elf32-m68k.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/scsipi
Module Name:src Committed By: mlelstv Date: Sun Jun 26 07:31:35 UTC 2016 Modified Files: src/sys/dev/scsipi: scsiconf.c Log Message: Create a dedicated thread for the initial scsibus discovery instead of using the completion thread. This prevents a deadlock when a command fails during discovery which needs to be handled by the completion thread. To generate a diff of this commit: cvs rdiff -u -r1.274 -r1.275 src/sys/dev/scsipi/scsiconf.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/scsipi/scsiconf.c diff -u src/sys/dev/scsipi/scsiconf.c:1.274 src/sys/dev/scsipi/scsiconf.c:1.275 --- src/sys/dev/scsipi/scsiconf.c:1.274 Mon May 2 19:18:29 2016 +++ src/sys/dev/scsipi/scsiconf.c Sun Jun 26 07:31:35 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.274 2016/05/02 19:18:29 christos Exp $ */ +/* $NetBSD: scsiconf.c,v 1.275 2016/06/26 07:31:35 mlelstv Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.274 2016/05/02 19:18:29 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.275 2016/06/26 07:31:35 mlelstv Exp $"); #include #include @@ -121,7 +121,8 @@ const struct cdevsw scsibus_cdevsw = { }; static int scsibusprint(void *, const char *); -static void scsibus_config(struct scsipi_channel *, void *); +static void scsibus_discover_thread(void *); +static void scsibus_config(struct scsibus_softc *); const struct scsipi_bustype scsi_bustype = { SCSIPI_BUSTYPE_BUSTYPE(SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_PSCSI), @@ -245,8 +246,8 @@ scsibusattach(device_t parent, device_t RUN_ONCE(_conf_ctrl, scsibus_init); /* Initialize the channel structure first */ - chan->chan_init_cb = scsibus_config; - chan->chan_init_cb_arg = sc; + chan->chan_init_cb = NULL; + chan->chan_init_cb_arg = NULL; scsi_initq = malloc(sizeof(struct scsi_initq), M_DEVBUF, M_WAITOK); scsi_initq->sc_channel = chan; @@ -256,12 +257,31 @@ scsibusattach(device_t parent, device_t aprint_error_dev(sc->sc_dev, "failed to init channel\n"); return; } + +/* + * Create the discover thread + */ +if (kthread_create(PRI_NONE, 0, NULL, scsibus_discover_thread, sc, +NULL, "%s-d", chan->chan_name)) { +aprint_error_dev(sc->sc_dev, "unable to create discovery " + "thread for channel %d\n", chan->chan_channel); +return; +} } static void -scsibus_config(struct scsipi_channel *chan, void *arg) +scsibus_discover_thread(void *arg) { struct scsibus_softc *sc = arg; + + scsibus_config(sc); + kthread_exit(0); +} + +static void +scsibus_config(struct scsibus_softc *sc) +{ + struct scsipi_channel *chan = sc->sc_channel; struct scsi_initq *scsi_initq; #ifndef SCSI_DELAY
CVS commit: src/sys/dev
Module Name:src Committed By: mlelstv Date: Sun Jun 26 07:22:15 UTC 2016 Modified Files: src/sys/dev: dksubr.c Log Message: Avoid NULL deref in case no bufq has been set. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/dev/dksubr.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/dksubr.c diff -u src/sys/dev/dksubr.c:1.86 src/sys/dev/dksubr.c:1.87 --- src/sys/dev/dksubr.c:1.86 Mon Jan 4 10:02:15 2016 +++ src/sys/dev/dksubr.c Sun Jun 26 07:22:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dksubr.c,v 1.86 2016/01/04 10:02:15 mlelstv Exp $ */ +/* $NetBSD: dksubr.c,v 1.87 2016/06/26 07:22:15 mlelstv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.86 2016/01/04 10:02:15 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.87 2016/06/26 07:22:15 mlelstv Exp $"); #include #include @@ -658,12 +658,13 @@ dk_ioctl(struct dk_softc *dksc, dev_t de struct disk_strategy *dks = (void *)data; mutex_enter(>sc_iolock); - strlcpy(dks->dks_name, bufq_getstrategyname(dksc->sc_bufq), - sizeof(dks->dks_name)); + if (dksc->sc_bufq != NULL) + strlcpy(dks->dks_name, bufq_getstrategyname(dksc->sc_bufq), + sizeof(dks->dks_name)); + else + error = EINVAL; mutex_exit(>sc_iolock); dks->dks_paramlen = 0; - - return 0; } case DIOCSSTRATEGY: @@ -687,8 +688,6 @@ dk_ioctl(struct dk_softc *dksc, dev_t de dksc->sc_bufq = new; mutex_exit(>sc_iolock); bufq_free(old); - - return 0; } default:
CVS commit: src/sys/dev
Module Name:src Committed By: mlelstv Date: Sun Jun 26 07:22:15 UTC 2016 Modified Files: src/sys/dev: dksubr.c Log Message: Avoid NULL deref in case no bufq has been set. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/dev/dksubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/usbdevs
Module Name:src Committed By: mlelstv Date: Sun Jun 26 07:10:24 UTC 2016 Modified Files: src/usr.sbin/usbdevs: usbdevs.8 usbdevs.c Log Message: Print release also in hex. Print device class information if -v is used twice. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/usbdevs/usbdevs.8 cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/usbdevs/usbdevs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/usbdevs/usbdevs.8 diff -u src/usr.sbin/usbdevs/usbdevs.8:1.9 src/usr.sbin/usbdevs/usbdevs.8:1.10 --- src/usr.sbin/usbdevs/usbdevs.8:1.9 Mon Aug 15 14:31:24 2011 +++ src/usr.sbin/usbdevs/usbdevs.8 Sun Jun 26 07:10:24 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: usbdevs.8,v 1.9 2011/08/15 14:31:24 wiz Exp $ +.\" $NetBSD: usbdevs.8,v 1.10 2016/06/26 07:10:24 mlelstv Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -53,7 +53,7 @@ Show the device drivers associated with .It Fl f Ar dev Only print information for the given USB controller. .It Fl v -Be verbose. +Be verbose, more information is given if used twice. .El .Sh FILES .Bl -tag -width Pa Index: src/usr.sbin/usbdevs/usbdevs.c diff -u src/usr.sbin/usbdevs/usbdevs.c:1.31 src/usr.sbin/usbdevs/usbdevs.c:1.32 --- src/usr.sbin/usbdevs/usbdevs.c:1.31 Tue Aug 12 13:40:07 2014 +++ src/usr.sbin/usbdevs/usbdevs.c Sun Jun 26 07:10:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdevs.c,v 1.31 2014/08/12 13:40:07 skrll Exp $ */ +/* $NetBSD: usbdevs.c,v 1.32 2016/06/26 07:10:24 mlelstv Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -47,7 +47,13 @@ static int verbose = 0; static int showdevs = 0; +struct stringtable { + int row, col; + const char *string; +}; + __dead static void usage(void); +static void getstrings(const struct stringtable *, int, int, const char **, const char **); static void usbdev(int f, int a, int rec); static void usbdump(int f); static void dumpone(char *name, int f, int addr); @@ -92,6 +98,104 @@ u2t(const char *utf8str, char *termstr) strcpy(termstr, "(invalid)"); } +struct stringtable class_strings[] = { + { UICLASS_UNSPEC, -1, "Unspecified" }, + + { UICLASS_AUDIO, -1, "Audio" }, + { UICLASS_AUDIO, UISUBCLASS_AUDIOCONTROL, "Audio Control" }, + { UICLASS_AUDIO, UISUBCLASS_AUDIOSTREAM, "Audio Streaming" }, + { UICLASS_AUDIO, UISUBCLASS_MIDISTREAM, "MIDI Streaming" }, + + { UICLASS_CDC, -1, "Communications and CDC Control" }, + { UICLASS_CDC, UISUBCLASS_DIRECT_LINE_CONTROL_MODEL, "Direct Line" }, + { UICLASS_CDC, UISUBCLASS_ABSTRACT_CONTROL_MODEL, "Abstract" }, + { UICLASS_CDC, UISUBCLASS_TELEPHONE_CONTROL_MODEL, "Telephone" }, + { UICLASS_CDC, UISUBCLASS_MULTICHANNEL_CONTROL_MODEL, "Multichannel" }, + { UICLASS_CDC, UISUBCLASS_CAPI_CONTROLMODEL, "CAPI" }, + { UICLASS_CDC, UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL, "Ethernet Networking" }, + { UICLASS_CDC, UISUBCLASS_ATM_NETWORKING_CONTROL_MODEL, "ATM Networking" }, + + { UICLASS_HID, -1, "Human Interface Device" }, + { UICLASS_HID, UISUBCLASS_BOOT, "Boot" }, + + { UICLASS_PHYSICAL,-1, "Physical" }, + + { UICLASS_IMAGE, -1, "Image" }, + + { UICLASS_PRINTER, -1, "Printer" }, + { UICLASS_PRINTER, UISUBCLASS_PRINTER, "Printer" }, + + { UICLASS_MASS,-1, "Mass Storage" }, + { UICLASS_MASS,UISUBCLASS_RBC, "RBC" }, + { UICLASS_MASS,UISUBCLASS_SFF8020I, "SFF8020I" }, + { UICLASS_MASS,UISUBCLASS_QIC157, "QIC157" }, + { UICLASS_MASS,UISUBCLASS_UFI, "UFI" }, + { UICLASS_MASS,UISUBCLASS_SFF8070I, "SFF8070I" }, + { UICLASS_MASS,UISUBCLASS_SCSI, "SCSI" }, + { UICLASS_MASS,UISUBCLASS_SCSI, "SCSI" }, + + { UICLASS_HUB, -1, "Hub" }, + { UICLASS_HUB, UISUBCLASS_HUB, "Hub" }, + + { UICLASS_CDC_DATA,-1, "CDC-Data" }, + { UICLASS_CDC_DATA,UISUBCLASS_DATA, "Data" }, + + { UICLASS_SMARTCARD, -1, "Smart Card" }, + + { UICLASS_SECURITY,-1, "Content Security" }, + + { UICLASS_VIDEO, -1, "Video" }, + { UICLASS_VIDEO, UISUBCLASS_VIDEOCONTROL, "Video Control" }, + { UICLASS_VIDEO, UISUBCLASS_VIDEOSTREAMING, "Video Streaming" }, + { UICLASS_VIDEO, UISUBCLASS_VIDEOCOLLECTION, "Video Collection" }, + +#ifdef notyet + { UICLASS_HEALTHCARE, -1, "Personal Healthcare" }, + { UICLASS_AVDEVICE,-1, "Audio/Video Device" }, + { UICLASS_BILLBOARD, -1, "Billboard" }, +#endif + + { UICLASS_DIAGNOSTIC, -1, "Diagnostic" }, + { UICLASS_WIRELESS,-1, "Wireless" }, + { UICLASS_WIRELESS,UISUBCLASS_RF, "Radio Frequency" }, + +#ifdef notyet + { UICLASS_MISC,-1, "Miscellaneous" }, +#endif + + { UICLASS_APPL_SPEC, -1, "Application Specific" }, + { UICLASS_APPL_SPEC, UISUBCLASS_FIRMWARE_DOWNLOAD, "Firmware Download" }, + { UICLASS_APPL_SPEC, UISUBCLASS_IRDA,
CVS commit: src/usr.sbin/usbdevs
Module Name:src Committed By: mlelstv Date: Sun Jun 26 07:10:24 UTC 2016 Modified Files: src/usr.sbin/usbdevs: usbdevs.8 usbdevs.c Log Message: Print release also in hex. Print device class information if -v is used twice. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/usbdevs/usbdevs.8 cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/usbdevs/usbdevs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libutil
Module Name:src Committed By: kre Date: Sun Jun 26 07:09:24 UTC 2016 Modified Files: src/lib/libutil: parsedate.3 parsedate.y Log Message: Remove dawn/sunup/sunset/sundown (sunrise was never there...) If 06:00 or 18:00 are wanted, just say "06:00" (etc). If these are ever added back, they really should determine location, and calculate actual sunrise/sunset times for the location and date. That's not likely to happen... To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libutil/parsedate.3 cvs rdiff -u -r1.28 -r1.29 src/lib/libutil/parsedate.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libutil/parsedate.3 diff -u src/lib/libutil/parsedate.3:1.20 src/lib/libutil/parsedate.3:1.21 --- src/lib/libutil/parsedate.3:1.20 Thu Dec 10 21:32:35 2015 +++ src/lib/libutil/parsedate.3 Sun Jun 26 07:09:24 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: parsedate.3,v 1.20 2015/12/10 21:32:35 wiz Exp $ +.\" $NetBSD: parsedate.3,v 1.21 2016/06/26 07:09:24 kre Exp $ .\" .\" Copyright (c) 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -131,11 +131,7 @@ The following words are recognized in En .Dv p.m. , .Dv midnight , .Dv mn , -.Dv noon , -.Dv dawn , -.Dv sunup , -.Dv sunset , -.Dv sundown . +.Dv noon . .Pp The months: .Dv january , Index: src/lib/libutil/parsedate.y diff -u src/lib/libutil/parsedate.y:1.28 src/lib/libutil/parsedate.y:1.29 --- src/lib/libutil/parsedate.y:1.28 Tue May 3 18:14:54 2016 +++ src/lib/libutil/parsedate.y Sun Jun 26 07:09:24 2016 @@ -14,7 +14,7 @@ #include #ifdef __RCSID -__RCSID("$NetBSD: parsedate.y,v 1.28 2016/05/03 18:14:54 kre Exp $"); +__RCSID("$NetBSD: parsedate.y,v 1.29 2016/06/26 07:09:24 kre Exp $"); #endif #include @@ -587,10 +587,6 @@ static const TABLE TimeNames[] = { { "mn", tTIME, 0 }, { "noon", tTIME, 12 }, { "midday", tTIME, 12 }, -{ "dawn", tTIME, 6 }, -{ "sunup", tTIME, 6 }, -{ "sunset", tTIME, 18 }, -{ "sundown", tTIME, 18 }, { NULL, 0, 0 } };
CVS commit: src/lib/libutil
Module Name:src Committed By: kre Date: Sun Jun 26 07:09:24 UTC 2016 Modified Files: src/lib/libutil: parsedate.3 parsedate.y Log Message: Remove dawn/sunup/sunset/sundown (sunrise was never there...) If 06:00 or 18:00 are wanted, just say "06:00" (etc). If these are ever added back, they really should determine location, and calculate actual sunrise/sunset times for the location and date. That's not likely to happen... To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libutil/parsedate.3 cvs rdiff -u -r1.28 -r1.29 src/lib/libutil/parsedate.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.