CVS commit: src/lib/libc/gen
Module Name:src Committed By: wiz Date: Sat Dec 15 07:34:36 UTC 2012 Modified Files: src/lib/libc/gen: unvis.3 Log Message: Add article. Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libc/gen/unvis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/unvis.3 diff -u src/lib/libc/gen/unvis.3:1.26 src/lib/libc/gen/unvis.3:1.27 --- src/lib/libc/gen/unvis.3:1.26 Sat Dec 15 02:38:46 2012 +++ src/lib/libc/gen/unvis.3 Sat Dec 15 07:34:36 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: unvis.3,v 1.26 2012/12/15 02:38:46 uwe Exp $ +.\" $NetBSD: unvis.3,v 1.27 2012/12/15 07:34:36 wiz Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -208,7 +208,7 @@ The functions and .Fn strnunvisx will return \-1 on error and set -.Va errno +.Va errno to: .Bl -tag -width Er .It Bq Er EINVAL @@ -216,7 +216,7 @@ An invalid escape sequence was detected, .El .Pp In addition the functions -.Fn strnunvis +.Fn strnunvis and .Fn strnunvisx will can also set @@ -248,10 +248,11 @@ and functions appeared in .Nx 6.0 . .Sh BUGS +The names .Dv VIS_HTTP1808 and .Dv VIS_HTTP1866 -names are wrong. +are wrong. Percent-encoding was defined in RFC 1738, the original RFC for URL. RFC 1866 defines HTML 2.0, an application of SGML, from which it inherits concepts of numeric character references and entity
CVS commit: src/lib/libc/gen
Module Name:src Committed By: wiz Date: Sat Dec 15 07:34:24 UTC 2012 Modified Files: src/lib/libc/gen: vis.3 Log Message: Add article. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/lib/libc/gen/vis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/vis.3 diff -u src/lib/libc/gen/vis.3:1.33 src/lib/libc/gen/vis.3:1.34 --- src/lib/libc/gen/vis.3:1.33 Sat Dec 15 01:19:32 2012 +++ src/lib/libc/gen/vis.3 Sat Dec 15 07:34:24 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.33 2012/12/15 01:19:32 uwe Exp $ +.\" $NetBSD: vis.3,v 1.34 2012/12/15 07:34:24 wiz Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -220,7 +220,7 @@ The following flags alter this: .Bl -tag -width VIS_WHITEX .It Dv VIS_GLOB -Also encode magic characters +Also encode the magic characters .Ql ( * , .Ql \&? , .Ql \&[
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Sat Dec 15 05:46:35 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: adjust file list for ticket 751 To generate a diff of this commit: cvs rdiff -u -r1.1.2.59 -r1.1.2.60 src/doc/CHANGES-6.1 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-6.1 diff -u src/doc/CHANGES-6.1:1.1.2.59 src/doc/CHANGES-6.1:1.1.2.60 --- src/doc/CHANGES-6.1:1.1.2.59 Sat Dec 15 05:41:06 2012 +++ src/doc/CHANGES-6.1 Sat Dec 15 05:46:35 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1,v 1.1.2.59 2012/12/15 05:41:06 riz Exp $ +# $NetBSD: CHANGES-6.1,v 1.1.2.60 2012/12/15 05:46:35 riz Exp $ A complete list of changes from the 6.0 release until the 6.1 release: @@ -7583,7 +7583,9 @@ external/bsd/bind/dist/doc/arm/Bv9ARM.ch external/bsd/bind/dist/doc/arm/Bv9ARM.ch09.html patch external/bsd/bind/dist/doc/arm/Bv9ARM.ch10.html patch external/bsd/bind/dist/doc/arm/Bv9ARM.html patch +external/bsd/bind/dist/doc/arm/Bv9ARM.pdf patch external/bsd/bind/dist/doc/arm/Makefile.in patch +external/bsd/bind/dist/doc/arm/isc-logo.pdf patch external/bsd/bind/dist/doc/arm/latex-fixup.pl patch external/bsd/bind/dist/doc/arm/man.arpaname.html patch external/bsd/bind/dist/doc/arm/man.ddns-confgen.html patch
CVS commit: [netbsd-6] src/external/bsd/bind/dist/doc/arm
Module Name:src Committed By: riz Date: Sat Dec 15 05:44:33 UTC 2012 Modified Files: src/external/bsd/bind/dist/doc/arm [netbsd-6]: Bv9ARM.pdf isc-logo.pdf Log Message: Two files inadvertantly missed from ticket #751. To generate a diff of this commit: cvs rdiff -u -r1.1.1.9.4.1 -r1.1.1.9.4.2 \ src/external/bsd/bind/dist/doc/arm/Bv9ARM.pdf cvs rdiff -u -r1.1.1.2.8.1 -r1.1.1.2.8.2 \ src/external/bsd/bind/dist/doc/arm/isc-logo.pdf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Sat Dec 15 05:41:06 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: Ticket #751 To generate a diff of this commit: cvs rdiff -u -r1.1.2.58 -r1.1.2.59 src/doc/CHANGES-6.1 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-6.1 diff -u src/doc/CHANGES-6.1:1.1.2.58 src/doc/CHANGES-6.1:1.1.2.59 --- src/doc/CHANGES-6.1:1.1.2.58 Thu Dec 13 23:51:40 2012 +++ src/doc/CHANGES-6.1 Sat Dec 15 05:41:06 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1,v 1.1.2.58 2012/12/13 23:51:40 riz Exp $ +# $NetBSD: CHANGES-6.1,v 1.1.2.59 2012/12/15 05:41:06 riz Exp $ A complete list of changes from the 6.0 release until the 6.1 release: @@ -7176,3 +7176,637 @@ lib/npf/ext_normalise/Makefile 1.2 Also, make sure the compat directories get created. [rmind, ticket #743] +external/bsd/bind/bin/dnssec/Makefile patch +external/bsd/bind/bin/dnssec/dnssec-verify/Makefile patch +external/bsd/bind/dist/CHANGESpatch +external/bsd/bind/dist/Makefile.in patch +external/bsd/bind/dist/READMEpatch +external/bsd/bind/dist/acconfig.h patch +external/bsd/bind/dist/config.h.in patch +external/bsd/bind/dist/configure patch +external/bsd/bind/dist/configure.in patch +external/bsd/bind/dist/isc-config.sh.in patch +external/bsd/bind/dist/srcidpatch +external/bsd/bind/dist/versionpatch +external/bsd/bind/dist/bin/Makefile.in patch +external/bsd/bind/dist/bin/check/Makefile.in patch +external/bsd/bind/dist/bin/check/check-tool.c patch +external/bsd/bind/dist/bin/confgen/Makefile.in patch +external/bsd/bind/dist/bin/confgen/unix/Makefile.in patch +external/bsd/bind/dist/bin/dig/Makefile.in patch +external/bsd/bind/dist/bin/dig/nslookup.c patch +external/bsd/bind/dist/bin/dnssec/Makefile.in patch +external/bsd/bind/dist/bin/dnssec/dnssec-dsfromkey.8 patch +external/bsd/bind/dist/bin/dnssec/dnssec-dsfromkey.c patch +external/bsd/bind/dist/bin/dnssec/dnssec-dsfromkey.docbook patch +external/bsd/bind/dist/bin/dnssec/dnssec-dsfromkey.html patch +external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.8 patch +external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.c patch +external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.docbook patch +external/bsd/bind/dist/bin/dnssec/dnssec-keyfromlabel.html patch +external/bsd/bind/dist/bin/dnssec/dnssec-keygen.8 patch +external/bsd/bind/dist/bin/dnssec/dnssec-keygen.c patch +external/bsd/bind/dist/bin/dnssec/dnssec-keygen.docbook patch +external/bsd/bind/dist/bin/dnssec/dnssec-keygen.html patch +external/bsd/bind/dist/bin/dnssec/dnssec-settime.c patch +external/bsd/bind/dist/bin/dnssec/dnssec-signzone.c patch +external/bsd/bind/dist/bin/dnssec/dnssec-verify.8 patch +external/bsd/bind/dist/bin/dnssec/dnssec-verify.c patch +external/bsd/bind/dist/bin/dnssec/dnssec-verify.docbook patch +external/bsd/bind/dist/bin/dnssec/dnssec-verify.html patch +external/bsd/bind/dist/bin/dnssec/dnssectool.c patch +external/bsd/bind/dist/bin/dnssec/dnssectool.h patch +external/bsd/bind/dist/bin/named/Makefile.in patch +external/bsd/bind/dist/bin/named/bindkeys.pl patch +external/bsd/bind/dist/bin/named/builtin.c patch +external/bsd/bind/dist/bin/named/client.c patch +external/bsd/bind/dist/bin/named/config.c patch +external/bsd/bind/dist/bin/named/controlconf.c patch +external/bsd/bind/dist/bin/named/convertxsl.pl patch +external/bsd/bind/dist/bin/named/query.c patch +external/bsd/bind/dist/bin/named/server.c patch +external/bsd/bind/dist/bin/named/statschannel.c patch +external/bsd/bind/dist/bin/named/unix/Makefile.in patch +external/bsd/bind/dist/bin/named/unix/dlz_dlopen_driver.c patch +external/bsd/bind/dist/bin/nsupdate/Makefile.in patch +external/bsd/bind/dist/bin/nsupdate/nsupdate.c patch +external/bsd/bind/dist/bin/pkcs11/Makefile.in patch +external/bsd/bind/dist/bin/python/Makefile.in patch +external/bsd/bind/dist/bin/python/dnssec-checkds.8 patch +external/bsd/bind/dist/bin/python/dnssec-checkds.docbookpatch +external/bsd/bind/dist/bin/python/dnssec-checkds.html patch +external/bsd/bind/dist/bin/python/dnssec-checkds.py.in patch +external/bsd/bind/dist/bin/rndc/Makefile.in patch +external/bsd/bind/dist/bin/tests/Makefile.in patch +external/bsd/bind/dist/bin/tests/b8t.mk patch +external/bsd/bind/dist/bin/tests/b9t.mk patch +external/bsd/bind/dist/bin/tests/headerdep_test.sh.in patch +external/bsd/bind/dist/bin/tests/rbt_test.txt patch +external/bsd/bind/dist/bin/tests/resolv.conf.sample patch +external/bsd/bind/dist/bin/tests/t_api.pl patch +external/bsd/bind/dist/bin/tests/atomic/Makefile.in patch +external/bsd/bind/dist/bin/tests/db/Makefile.in patch +external/bsd/bind/dist/bin/tests/dnssec-signzone/run-test.sh patch +external/bsd/bind/dist/bin/tests/dst/Makefile.in patch +external/bsd/bind/dist/bin/tests/dst/t_dst.c patch +external/bsd/bind/dist/bin/tests/hashes/Makefile.in
CVS commit: src/usr.sbin/wakeonlan
Module Name:src Committed By: jakllsch Date: Sat Dec 15 04:40:33 UTC 2012 Modified Files: src/usr.sbin/wakeonlan: wakeonlan.c Log Message: Even though the kernel will fill the source address in, it looks weird in trace output to see a not-obviously-bogus uninitialized source address go into the kernel. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/wakeonlan/wakeonlan.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/wakeonlan/wakeonlan.c diff -u src/usr.sbin/wakeonlan/wakeonlan.c:1.1 src/usr.sbin/wakeonlan/wakeonlan.c:1.2 --- src/usr.sbin/wakeonlan/wakeonlan.c:1.1 Sat May 26 01:58:21 2012 +++ src/usr.sbin/wakeonlan/wakeonlan.c Sat Dec 15 04:40:33 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: wakeonlan.c,v 1.1 2012/05/26 01:58:21 uebayasi Exp $ */ +/* $NetBSD: wakeonlan.c,v 1.2 2012/12/15 04:40:33 jakllsch Exp $ */ /* * Copyright (C) 2006, 2007, 2008, 2009, 2010 Marc Balmer @@ -167,6 +167,7 @@ send_wakeup(int bpf, struct ether_addr c ssize_t bw, len; memset(pkt.hdr.ether_dhost, 0xff, sizeof(pkt.hdr.ether_dhost)); + memset(pkt.hdr.ether_shost, 0x00, sizeof(pkt.hdr.ether_shost)); pkt.hdr.ether_type = htons(0); memset(pkt.data, 0xff, SYNC_LEN); for (p = pkt.data + SYNC_LEN, i = 0; i < DESTADDR_COUNT;
CVS commit: src/sbin/newfs_msdos
Module Name:src Committed By: jakllsch Date: Sat Dec 15 04:34:36 UTC 2012 Modified Files: src/sbin/newfs_msdos: newfs_msdos.c Log Message: There are two problems with insisting the FAT file system size be a multiple of track-size units: 2) the FAT metadata areas may not be a multiple of a "track", 1) the partition may not be track-aligned to begin with, 0) what's a "track"? is it something a robot rover leaves on Mars? To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sbin/newfs_msdos/newfs_msdos.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/newfs_msdos/newfs_msdos.c diff -u src/sbin/newfs_msdos/newfs_msdos.c:1.39 src/sbin/newfs_msdos/newfs_msdos.c:1.40 --- src/sbin/newfs_msdos/newfs_msdos.c:1.39 Sun Nov 4 14:27:15 2012 +++ src/sbin/newfs_msdos/newfs_msdos.c Sat Dec 15 04:34:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: newfs_msdos.c,v 1.39 2012/11/04 14:27:15 jakllsch Exp $ */ +/* $NetBSD: newfs_msdos.c,v 1.40 2012/12/15 04:34:36 jakllsch Exp $ */ /* * Copyright (c) 1998 Robert Nordier @@ -33,7 +33,7 @@ static const char rcsid[] = "$FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $"; #else -__RCSID("$NetBSD: newfs_msdos.c,v 1.39 2012/11/04 14:27:15 jakllsch Exp $"); +__RCSID("$NetBSD: newfs_msdos.c,v 1.40 2012/12/15 04:34:36 jakllsch Exp $"); #endif #endif /* not lint */ @@ -409,15 +409,8 @@ main(int argc, char *argv[]) if (oflag) bpb.hid = opt_o; if (!(opt_f || (opt_h && opt_u && opt_S && opt_s && oflag))) { - off_t delta; getbpbinfo(fd, fname, dtype, oflag, &bpb, opt_create != 0); bpb.bsec -= (opt_ofs / bpb.bps); - delta = bpb.bsec % bpb.spt; - if (delta != 0) { - warnx("trim %d sectors to adjust to a multiple of %d", - (int)delta, bpb.spt); - bpb.bsec -= delta; - } if (bpb.spc == 0) { /* set defaults */ if (bpb.bsec <= 6000) /* about 3MB -> 512 bytes */ bpb.spc = 1;
CVS commit: src/lib/libc/gen
Module Name:src Committed By: matt Date: Sat Dec 15 04:29:53 UTC 2012 Modified Files: src/lib/libc/gen: unvis.c Log Message: Since the struct is const, no reason for the name member to be const. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/libc/gen/unvis.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/libc/gen/unvis.c diff -u src/lib/libc/gen/unvis.c:1.40 src/lib/libc/gen/unvis.c:1.41 --- src/lib/libc/gen/unvis.c:1.40 Fri Dec 14 21:31:01 2012 +++ src/lib/libc/gen/unvis.c Sat Dec 15 04:29:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $ */ +/* $NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $"); +__RCSID("$NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -81,7 +81,7 @@ __weak_alias(strnunvisx,_strnunvisx) * RFC 1866 */ static const struct nv { - const char name[7]; + char name[7]; uint8_t value; } nv[] = { { "AElig", 198 }, /* capital AE diphthong (ligature) */
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Sat Dec 15 04:10:05 UTC 2012 Modified Files: src/sys/dev/usb: ucom.c Log Message: drop trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/dev/usb/ucom.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/ucom.c diff -u src/sys/dev/usb/ucom.c:1.101 src/sys/dev/usb/ucom.c:1.102 --- src/sys/dev/usb/ucom.c:1.101 Sat Dec 15 04:09:24 2012 +++ src/sys/dev/usb/ucom.c Sat Dec 15 04:10:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ucom.c,v 1.101 2012/12/15 04:09:24 jakllsch Exp $ */ +/* $NetBSD: ucom.c,v 1.102 2012/12/15 04:10:05 jakllsch Exp $ */ /* * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.101 2012/12/15 04:09:24 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.102 2012/12/15 04:10:05 jakllsch Exp $"); #include #include @@ -442,7 +442,7 @@ ucomopen(dev_t dev, int flag, int mode, * unless explicitly requested to deassert it. Ditto RTS. */ ucom_dtr(sc, 1); - ucom_rts(sc, 1); + ucom_rts(sc, 1); DPRINTF(("ucomopen: open pipes in=%d out=%d\n", sc->sc_bulkin_no, sc->sc_bulkout_no));
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Sat Dec 15 04:09:24 UTC 2012 Modified Files: src/sys/dev/usb: ucom.c Log Message: Sometimes the device disappears out from under us and device_lookup_private() will return NULL. Be paranoid about this to prevent NULL pointer dereferences. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/dev/usb/ucom.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/ucom.c diff -u src/sys/dev/usb/ucom.c:1.100 src/sys/dev/usb/ucom.c:1.101 --- src/sys/dev/usb/ucom.c:1.100 Wed Oct 17 17:05:15 2012 +++ src/sys/dev/usb/ucom.c Sat Dec 15 04:09:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ucom.c,v 1.100 2012/10/17 17:05:15 mlelstv Exp $ */ +/* $NetBSD: ucom.c,v 1.101 2012/12/15 04:09:24 jakllsch Exp $ */ /* * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.100 2012/10/17 17:05:15 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.101 2012/12/15 04:09:24 jakllsch Exp $"); #include #include @@ -580,10 +580,16 @@ int ucomclose(dev_t dev, int flag, int mode, struct lwp *l) { struct ucom_softc *sc = device_lookup_private(&ucom_cd, UCOMUNIT(dev)); - struct tty *tp = sc->sc_tty; + struct tty *tp; int s; DPRINTF(("ucomclose: unit=%d\n", UCOMUNIT(dev))); + + if (sc == NULL) + return 0; + + tp = sc->sc_tty; + if (!ISSET(tp->t_state, TS_ISOPEN)) return (0); @@ -616,12 +622,14 @@ int ucomread(dev_t dev, struct uio *uio, int flag) { struct ucom_softc *sc = device_lookup_private(&ucom_cd, UCOMUNIT(dev)); - struct tty *tp = sc->sc_tty; + struct tty *tp; int error; - if (sc->sc_dying) + if (sc == NULL || sc->sc_dying) return (EIO); + tp = sc->sc_tty; + sc->sc_refcnt++; error = ((*tp->t_linesw->l_read)(tp, uio, flag)); if (--sc->sc_refcnt < 0) @@ -633,12 +641,14 @@ int ucomwrite(dev_t dev, struct uio *uio, int flag) { struct ucom_softc *sc = device_lookup_private(&ucom_cd, UCOMUNIT(dev)); - struct tty *tp = sc->sc_tty; + struct tty *tp; int error; - if (sc->sc_dying) + if (sc == NULL || sc->sc_dying) return (EIO); + tp = sc->sc_tty; + sc->sc_refcnt++; error = ((*tp->t_linesw->l_write)(tp, uio, flag)); if (--sc->sc_refcnt < 0) @@ -670,9 +680,8 @@ struct tty * ucomtty(dev_t dev) { struct ucom_softc *sc = device_lookup_private(&ucom_cd, UCOMUNIT(dev)); - struct tty *tp = sc->sc_tty; - return (tp); + return ((sc != NULL) ? sc->sc_tty : NULL); } int @@ -681,6 +690,9 @@ ucomioctl(dev_t dev, u_long cmd, void *d struct ucom_softc *sc = device_lookup_private(&ucom_cd, UCOMUNIT(dev)); int error; + if (sc == NULL || sc->sc_dying) + return (EIO); + sc->sc_refcnt++; error = ucom_do_ioctl(sc, cmd, data, flag, l); if (--sc->sc_refcnt < 0) @@ -696,9 +708,6 @@ ucom_do_ioctl(struct ucom_softc *sc, u_l int error; int s; - if (sc->sc_dying) - return (EIO); - DPRINTF(("ucomioctl: cmd=0x%08lx\n", cmd)); error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, l); @@ -890,7 +899,7 @@ ucomparam(struct tty *tp, struct termios UCOMUNIT(tp->t_dev)); int error; - if (sc->sc_dying) + if (sc == NULL || sc->sc_dying) return (EIO); /* Check requested parameters. */ @@ -959,6 +968,9 @@ ucomhwiflow(struct tty *tp, int block) UCOMUNIT(tp->t_dev)); int old; + if (sc == NULL) + return (0); + old = sc->sc_rx_stopped; sc->sc_rx_stopped = (u_char)block; @@ -982,7 +994,7 @@ ucomstart(struct tty *tp) u_char *data; int cnt; - if (sc->sc_dying) + if (sc == NULL || sc->sc_dying) return; s = spltty();
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Sat Dec 15 03:05:56 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: cpuregs.h src/sys/arch/mips/mips [matt-nb5-mips64]: mips_machdep.c src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_fmn.c rmixl_gpio_pci.c rmixl_intr.c rmixl_machdep.c rmixlp_pcie.c rmixlreg.h rmixlvar.h Log Message: Add initial support for XLP II (XLP2XX/XLP1XX). To generate a diff of this commit: cvs rdiff -u -r1.74.28.25 -r1.74.28.26 src/sys/arch/mips/include/cpuregs.h cvs rdiff -u -r1.205.4.1.2.1.2.68 -r1.205.4.1.2.1.2.69 \ src/sys/arch/mips/mips/mips_machdep.c cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/sys/arch/mips/rmi/rmixl_fmn.c cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/mips/rmi/rmixl_gpio_pci.c cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/sys/arch/mips/rmi/rmixl_intr.c cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/arch/mips/rmi/rmixl_machdep.c cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/rmi/rmixlp_pcie.c cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/sys/arch/mips/rmi/rmixlreg.h cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/sys/arch/mips/rmi/rmixlvar.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/mips/include/cpuregs.h diff -u src/sys/arch/mips/include/cpuregs.h:1.74.28.25 src/sys/arch/mips/include/cpuregs.h:1.74.28.26 --- src/sys/arch/mips/include/cpuregs.h:1.74.28.25 Thu Jan 19 08:28:48 2012 +++ src/sys/arch/mips/include/cpuregs.h Sat Dec 15 03:05:55 2012 @@ -911,10 +911,11 @@ #define MIPS_XLR_C4 0x91 /* RMI XLR Production Rev C4 */ /* - * CPU processor IDs for company ID == 12 (RMI) + * CPU processor IDs for company ID == 12 (RMI, NetLogic, Broadcom) */ #define MIPS_XLP8XX 0x10 /* RMI XLP8XX/XLP4XX ISA 64 Rel 2 */ #define MIPS_XLP3XX 0x11 /* RMI XLP3XX ISA 64 Rel 2 */ +#define MIPS_XLP2XX 0x12 /* Broadcom XLP2XX/XLP1XX ISA 64 Rel 2 */ #define MIPS_XLR308B 0x06 /* RMI XLR308-B ISA 64 */ #define MIPS_XLR508B 0x07 /* RMI XLR508-B ISA 64 */ #define MIPS_XLR516B 0x08 /* RMI XLR516-B ISA 64 */ Index: src/sys/arch/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.68 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.69 --- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.68 Sat Aug 4 07:20:31 2012 +++ src/sys/arch/mips/mips/mips_machdep.c Sat Dec 15 03:05:55 2012 @@ -630,6 +630,18 @@ static const struct pridtab cputab[] = { CIDFL_RMI_TYPE_XLS|MIPS_CIDFL_RMI_CPUS(1,4)|MIPS_CIDFL_RMI_L2(256KB), "XLS104" }, + { MIPS_PRID_CID_RMI, MIPS_XLP2XX, -1, -1, -1, 0, + MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR | + CPU_MIPS_I_D_CACHE_COHERENT | CPU_MIPS_HAVE_MxCR, + MIPS_CP0FL_USE | + MIPS_CP0FL_EBASE | MIPS_CP0FL_USERLOCAL | MIPS_CP0FL_HWRENA | + MIPS_CP0FL_EIRR | MIPS_CP0FL_EIMR | + MIPS_CP0FL_CONFIG | MIPS_CP0FL_CONFIG1 | MIPS_CP0FL_CONFIG2 | + MIPS_CP0FL_CONFIG3 | MIPS_CP0FL_CONFIG6 | MIPS_CP0FL_CONFIG7, + CIDFL_RMI_TYPE_XLP | MIPS_CIDFL_RMI_CPUS(1,4) | + MIPS_CIDFL_RMI_L2(512KB) | MIPS_CIDFL_RMI_L3(2MB), + "XLP2XX" }, + { MIPS_PRID_CID_RMI, MIPS_XLP3XX, -1, -1, -1, 0, MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR | CPU_MIPS_I_D_CACHE_COHERENT | CPU_MIPS_HAVE_MxCR, Index: src/sys/arch/mips/rmi/rmixl_fmn.c diff -u src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.12 src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.13 --- src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.12 Fri Mar 30 01:04:47 2012 +++ src/sys/arch/mips/rmi/rmixl_fmn.c Sat Dec 15 03:05:56 2012 @@ -364,7 +364,7 @@ fmn_init_xlp(fmn_info_t *fmn) si->si_qid_first = 1000; si->si_qid_last = 1019; } else { - KASSERT(RMIXLP_3XX_P); + KASSERT(RMIXLP_3XX_P || RMIXLP_2XX_P); si->si_qid_first = 496; si->si_qid_last = 504; } Index: src/sys/arch/mips/rmi/rmixl_gpio_pci.c diff -u src/sys/arch/mips/rmi/rmixl_gpio_pci.c:1.1.2.6 src/sys/arch/mips/rmi/rmixl_gpio_pci.c:1.1.2.7 --- src/sys/arch/mips/rmi/rmixl_gpio_pci.c:1.1.2.6 Thu Jan 19 17:28:50 2012 +++ src/sys/arch/mips/rmi/rmixl_gpio_pci.c Sat Dec 15 03:05:56 2012 @@ -29,7 +29,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: rmixl_gpio_pci.c,v 1.1.2.6 2012/01/19 17:28:50 matt Exp $"); +__KERNEL_RCSID(1, "$NetBSD: rmixl_gpio_pci.c,v 1.1.2.7 2012/12/15 03:05:56 matt Exp $"); #include #include @@ -81,6 +81,7 @@ static const uint8_t xlgpio_pincnt_by_va [RMIXLP_3XXL] = RMIXLP_GPIO_3XXL_MAXPINS, [RMIXLP_3XXH] = RMIXLP_GPIO_3XXL_MAXPINS, [RMIXLP_3XXQ] = RMIXLP_GPIO_3XXL_MAXPINS, +[RMIXLP_2XX] = RMIXLP_GPIO_2XXL_MAXPINS, }; @@ -286,7 +287,7 @@ xlgpio_pci_attach(device_t parent, devic /* * These are at different offsets on the 3xx than the 8xx/4xx. */ - if (rcp->rc_xlp_variant >= RMIXLP_3XX) { + if (RMIXLP_3XX_P || RMIXLP_2XX_P) { gg->gg_r_intpol = RMIXLP_GPIO_3XX_INTPOL(group); gg->gg_r_inttype = RMIXLP_GPIO_3XX_INTTYPE(group); gg->gg_
CVS commit: src/lib/libc/gen
Module Name:src Committed By: uwe Date: Sat Dec 15 02:38:47 UTC 2012 Modified Files: src/lib/libc/gen: unvis.3 Log Message: Add BUGS section that explains that names VIS_HTTP1808 and VIS_HTTP1866 are wrong (hi, christos). ok christos@ To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/gen/unvis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/unvis.3 diff -u src/lib/libc/gen/unvis.3:1.25 src/lib/libc/gen/unvis.3:1.26 --- src/lib/libc/gen/unvis.3:1.25 Sat Dec 15 02:08:13 2012 +++ src/lib/libc/gen/unvis.3 Sat Dec 15 02:38:46 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: unvis.3,v 1.25 2012/12/15 02:08:13 uwe Exp $ +.\" $NetBSD: unvis.3,v 1.26 2012/12/15 02:38:46 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -247,3 +247,12 @@ and .Fn strnunvisx functions appeared in .Nx 6.0 . +.Sh BUGS +.Dv VIS_HTTP1808 +and +.Dv VIS_HTTP1866 +names are wrong. +Percent-encoding was defined in RFC 1738, the original RFC for URL. +RFC 1866 defines HTML 2.0, an application of SGML, from which it +inherits concepts of numeric character references and entity +references.
CVS commit: src
Module Name:src Committed By: uwe Date: Sat Dec 15 02:08:13 UTC 2012 Modified Files: src/lib/libc/gen: unvis.3 src/usr.bin/unvis: unvis.1 Log Message: RFC 1866 does not define any "URI encoding". It defines HTML 2.0 that includes SGML numerical character references (nnn;) and entity references (&foo;) for Added Latin 1 and a subset of Numeric and Special Graphic. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/libc/gen/unvis.3 cvs rdiff -u -r1.9 -r1.10 src/usr.bin/unvis/unvis.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/unvis.3 diff -u src/lib/libc/gen/unvis.3:1.24 src/lib/libc/gen/unvis.3:1.25 --- src/lib/libc/gen/unvis.3:1.24 Sat Dec 15 01:50:06 2012 +++ src/lib/libc/gen/unvis.3 Sat Dec 15 02:08:13 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: unvis.3,v 1.24 2012/12/15 01:50:06 uwe Exp $ +.\" $NetBSD: unvis.3,v 1.25 2012/12/15 02:08:13 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -162,7 +162,8 @@ will decode URI strings as specified in If set to .Dv VIS_HTTP1866 , .Fn unvis -will decode URI strings as specified in RFC 1866. +will decode entity references and numeric character references +as specified in RFC 1866. If set to .Dv VIS_MIMESTYLE , .Fn unvis Index: src/usr.bin/unvis/unvis.1 diff -u src/usr.bin/unvis/unvis.1:1.9 src/usr.bin/unvis/unvis.1:1.10 --- src/usr.bin/unvis/unvis.1:1.9 Sun Nov 28 01:33:37 2010 +++ src/usr.bin/unvis/unvis.1 Sat Dec 15 02:08:13 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: unvis.1,v 1.9 2010/11/28 01:33:37 wiz Exp $ +.\" $NetBSD: unvis.1,v 1.10 2012/12/15 02:08:13 uwe Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -52,7 +52,7 @@ The options are as follows: .It Fl e Don't decode \e escaped sequences. .It Fl H -Decode using the URI encoding from RFC 1866. +Decode entity references and numeric character references from RFC 1866. .Pq Dv VIS_HTTP1866 .It Fl h Decode using the URI encoding from RFC 1808.
CVS commit: src/lib/libc/gen
Module Name:src Committed By: uwe Date: Sat Dec 15 01:50:06 UTC 2012 Modified Files: src/lib/libc/gen: unvis.3 Log Message: Minor markup fixes. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/gen/unvis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/unvis.3 diff -u src/lib/libc/gen/unvis.3:1.23 src/lib/libc/gen/unvis.3:1.24 --- src/lib/libc/gen/unvis.3:1.23 Thu Mar 17 14:06:29 2011 +++ src/lib/libc/gen/unvis.3 Sat Dec 15 01:50:06 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: unvis.3,v 1.23 2011/03/17 14:06:29 wiz Exp $ +.\" $NetBSD: unvis.3,v 1.24 2012/12/15 01:50:06 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -125,15 +125,17 @@ The function has several return codes that must be handled properly. They are: .Bl -tag -width UNVIS_VALIDPUSH -.It Li \&0 (zero) +.It Li \&0 No (zero) Another character is necessary; nothing has been recognized yet. .It Dv UNVIS_VALID A valid character has been recognized and is available at the location -pointed to by cp. +pointed to by +.Fa cp . .It Dv UNVIS_VALIDPUSH A valid character has been recognized and is available at the location -pointed to by cp; however, the character currently passed in should -be passed in again. +pointed to by +.Fa cp ; +however, the character currently passed in should be passed in again. .It Dv UNVIS_NOCHAR A valid sequence was detected, but no character was produced. This return code is necessary to indicate a logical break between characters. @@ -149,7 +151,7 @@ one more time with flag set to to extract any remaining character (the character passed in is ignored). .Pp The -.Ar flag +.Fa flag argument is also used to specify the encoding style of the source. If set to .Dv VIS_HTTPSTYLE @@ -168,7 +170,9 @@ will decode MIME Quoted-Printable string If set to .Dv VIS_NOESCAPE , .Fn unvis -will not decode \e quoted characters. +will not decode +.Ql \e +quoted characters. .Pp The following code fragment illustrates a proper use of .Fn unvis .
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: christos Date: Sat Dec 15 01:24:40 UTC 2012 Modified Files: src/usr.sbin/mtree: create.c Log Message: make us compatible with FreeBSD (for -n) (Brooks Davies) To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/usr.sbin/mtree/create.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/mtree/create.c diff -u src/usr.sbin/mtree/create.c:1.66 src/usr.sbin/mtree/create.c:1.67 --- src/usr.sbin/mtree/create.c:1.66 Wed Dec 12 10:50:35 2012 +++ src/usr.sbin/mtree/create.c Fri Dec 14 20:24:40 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: create.c,v 1.66 2012/12/12 15:50:35 christos Exp $ */ +/* $NetBSD: create.c,v 1.67 2012/12/15 01:24:40 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: create.c,v 1.66 2012/12/12 15:50:35 christos Exp $"); +__RCSID("$NetBSD: create.c,v 1.67 2012/12/15 01:24:40 christos Exp $"); #endif #endif /* not lint */ @@ -136,8 +136,9 @@ cwalk(void) } switch(p->fts_info) { case FTS_D: + printf("\n"); if (!nflag) -printf("\n# %s\n", p->fts_path); +printf("# %s\n", p->fts_path); statd(t, p, &uid, &gid, &mode, &flags); statf(indent, p); break;
CVS commit: src/lib/libc/gen
Module Name:src Committed By: uwe Date: Sat Dec 15 01:19:32 UTC 2012 Modified Files: src/lib/libc/gen: vis.3 Log Message: Add RFC 2045 (for VIS_MIMESTYLE) to "SEE ALSO". Use space between "RFC" and the number. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libc/gen/vis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/vis.3 diff -u src/lib/libc/gen/vis.3:1.32 src/lib/libc/gen/vis.3:1.33 --- src/lib/libc/gen/vis.3:1.32 Sat Dec 15 01:04:02 2012 +++ src/lib/libc/gen/vis.3 Sat Dec 15 01:19:32 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.32 2012/12/15 01:04:02 uwe Exp $ +.\" $NetBSD: vis.3,v 1.33 2012/12/15 01:19:32 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -425,7 +425,11 @@ The destination buffer size is not large .Rs .%A T. Berners-Lee .%T Uniform Resource Locators (URL) -.%O RFC1738 +.%O "RFC 1738" +.Re +.Rs +.%T "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies" +.%O "RFC 2045" .Re .Sh HISTORY The
CVS commit: src/lib/libc/gen
Module Name:src Committed By: uwe Date: Sat Dec 15 01:04:02 UTC 2012 Modified Files: src/lib/libc/gen: vis.3 Log Message: Misc formatting fixes. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libc/gen/vis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/vis.3 diff -u src/lib/libc/gen/vis.3:1.31 src/lib/libc/gen/vis.3:1.32 --- src/lib/libc/gen/vis.3:1.31 Sat Dec 15 01:02:26 2012 +++ src/lib/libc/gen/vis.3 Sat Dec 15 01:04:02 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.31 2012/12/15 01:02:26 uwe Exp $ +.\" $NetBSD: vis.3,v 1.32 2012/12/15 01:04:02 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -146,11 +146,12 @@ of characters encoded from (plus one for the .Dv NUL ) . Both -forms return the number of characters in dst (not including -the trailing +forms return the number of characters in +.Fa dst +(not including the trailing .Dv NUL ) . The -.Dq n +.Dq Nm n versions of the functions also take an additional argument .Fa dlen that indicates the length of the @@ -213,9 +214,8 @@ and .Fn strnvisx ) , and the type of representation used. By default, all non-graphic characters, -except space, tab, and newline are encoded. -(See -.Xr isgraph 3 . ) +except space, tab, and newline are encoded (see +.Xr isgraph 3 ) . The following flags alter this: .Bl -tag -width VIS_WHITEX @@ -242,11 +242,13 @@ Synonym for \&| .Dv VIS_NL . .It Dv VIS_SAFE -Only encode "unsafe" characters. +Only encode +.Dq unsafe +characters. Unsafe means control characters which may cause common terminals to perform unexpected functions. Currently this form allows space, tab, newline, backspace, bell, and -return - in addition to all graphic characters - unencoded. +return \(em in addition to all graphic characters \(em unencoded. .El .Pp (The above flags have no effect for @@ -286,8 +288,8 @@ Use an to represent meta characters (characters with the 8th bit set), and use caret .Ql ^ -to represent control characters see -.Pf ( Xr iscntrl 3 ) . +to represent control characters (see +.Xr iscntrl 3 ) . The following formats are used: .Bl -tag -width x .It Dv \e^C @@ -334,19 +336,20 @@ Use C-style backslash sequences to repre characters. The following sequences are used to represent the indicated characters: .Bd -unfilled -offset indent -.Li \ea Tn - BEL No (007) -.Li \eb Tn - BS No (010) -.Li \ef Tn - NP No (014) -.Li \en Tn - NL No (012) -.Li \er Tn - CR No (015) -.Li \es Tn - SP No (040) -.Li \et Tn - HT No (011) -.Li \ev Tn - VT No (013) -.Li \e0 Tn - NUL No (000) +.Li \ea Tn \(em BEL No (007) +.Li \eb Tn \(em BS No (010) +.Li \ef Tn \(em NP No (014) +.Li \en Tn \(em NL No (012) +.Li \er Tn \(em CR No (015) +.Li \es Tn \(em SP No (040) +.Li \et Tn \(em HT No (011) +.Li \ev Tn \(em VT No (013) +.Li \e0 Tn \(em NUL No (000) .Ed .Pp -When using this format, the nextc parameter is looked at to determine -if a +When using this format, the +.Fa nextc +parameter is looked at to determine if a .Dv NUL character can be encoded as .Ql \e0 @@ -373,7 +376,7 @@ represents a lower case hexadecimal digi .It Dv VIS_MIMESTYLE Use MIME Quoted-Printable encoding as described in RFC 2045, only don't break lines and don't handle CRLF. -The form is: +The form is .Ql =XX where .Em X @@ -410,7 +413,7 @@ destination buffer size is not enough to setting .Va errno to: -.Bl -tag -width Er +.Bl -tag -width ".Bq Er ENOSPC" .It Bq Er ENOSPC The destination buffer size is not large enough to perform the conversion. .El @@ -429,7 +432,7 @@ The .Fn vis , .Fn strvis , and -.Fa strvisx +.Fn strvisx functions first appeared in .Bx 4.4 . The
CVS commit: src/lib/libc/gen
Module Name:src Committed By: uwe Date: Sat Dec 15 01:02:26 UTC 2012 Modified Files: src/lib/libc/gen: vis.3 Log Message: Typos: fix -> fit; length size -> size. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/lib/libc/gen/vis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/vis.3 diff -u src/lib/libc/gen/vis.3:1.30 src/lib/libc/gen/vis.3:1.31 --- src/lib/libc/gen/vis.3:1.30 Sat Dec 15 00:48:19 2012 +++ src/lib/libc/gen/vis.3 Sat Dec 15 01:02:26 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.30 2012/12/15 00:48:19 uwe Exp $ +.\" $NetBSD: vis.3,v 1.31 2012/12/15 01:02:26 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -158,7 +158,7 @@ that indicates the length of the buffer. If .Fa dlen -is not large enough to fix the converted string then the +is not large enough to fit the converted string then the .Fn strnvis and .Fn strnvisx @@ -406,7 +406,7 @@ and .Fn strsnvisx , will return \-1 when the .Fa dlen -destination buffer length size is not enough to perform the conversion while +destination buffer size is not enough to perform the conversion while setting .Va errno to:
CVS commit: src/lib/libc/gen
Module Name:src Committed By: uwe Date: Sat Dec 15 00:48:19 UTC 2012 Modified Files: src/lib/libc/gen: vis.3 Log Message: Fix pasto: VIS_MIMESTYLE produces =XX, not %XX To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/lib/libc/gen/vis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/vis.3 diff -u src/lib/libc/gen/vis.3:1.29 src/lib/libc/gen/vis.3:1.30 --- src/lib/libc/gen/vis.3:1.29 Fri Dec 14 22:55:59 2012 +++ src/lib/libc/gen/vis.3 Sat Dec 15 00:48:19 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.29 2012/12/14 22:55:59 christos Exp $ +.\" $NetBSD: vis.3,v 1.30 2012/12/15 00:48:19 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -374,7 +374,7 @@ represents a lower case hexadecimal digi Use MIME Quoted-Printable encoding as described in RFC 2045, only don't break lines and don't handle CRLF. The form is: -.Ql %XX +.Ql =XX where .Em X represents an upper case hexadecimal digit.
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jakllsch Date: Sat Dec 15 00:07:47 UTC 2012 Modified Files: src/sys/dev/sdmmc: sdmmc.c Log Message: It's also useful to compile-test before committing. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sdmmc/sdmmc.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/sdmmc/sdmmc.c diff -u src/sys/dev/sdmmc/sdmmc.c:1.16 src/sys/dev/sdmmc/sdmmc.c:1.17 --- src/sys/dev/sdmmc/sdmmc.c:1.16 Sat Dec 15 00:05:44 2012 +++ src/sys/dev/sdmmc/sdmmc.c Sat Dec 15 00:07:47 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc.c,v 1.16 2012/12/15 00:05:44 jakllsch Exp $ */ +/* $NetBSD: sdmmc.c,v 1.17 2012/12/15 00:07:47 jakllsch Exp $ */ /* $OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $ */ /* @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.16 2012/12/15 00:05:44 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.17 2012/12/15 00:07:47 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -519,7 +519,7 @@ sdmmc_enable(struct sdmmc_softc *sc) /* Initialize SD I/O card function(s). */ error = sdmmc_io_enable(sc); if (error) { - DPRINTF(1, ("%s: sdmmc_io_enable failed %d\n", DEVNAME(sc), error); + DPRINTF(1, ("%s: sdmmc_io_enable failed %d\n", DEVNAME(sc), error)); goto out; } } @@ -529,7 +529,7 @@ sdmmc_enable(struct sdmmc_softc *sc) ISSET(sc->sc_flags, SMF_MEM_MODE)) { error = sdmmc_mem_enable(sc); if (error) { - DPRINTF(1, ("%s: sdmmc_mem_enable failed %d\n", DEVNAME(sc), error); + DPRINTF(1, ("%s: sdmmc_mem_enable failed %d\n", DEVNAME(sc), error)); goto out; } }
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jakllsch Date: Sat Dec 15 00:05:44 UTC 2012 Modified Files: src/sys/dev/sdmmc: sdmmc.c Log Message: When debugging, it's useful to know what exactly failed. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/sdmmc/sdmmc.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/sdmmc/sdmmc.c diff -u src/sys/dev/sdmmc/sdmmc.c:1.15 src/sys/dev/sdmmc/sdmmc.c:1.16 --- src/sys/dev/sdmmc/sdmmc.c:1.15 Sat Aug 4 04:06:00 2012 +++ src/sys/dev/sdmmc/sdmmc.c Sat Dec 15 00:05:44 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc.c,v 1.15 2012/08/04 04:06:00 kiyohara Exp $ */ +/* $NetBSD: sdmmc.c,v 1.16 2012/12/15 00:05:44 jakllsch Exp $ */ /* $OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $ */ /* @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.15 2012/08/04 04:06:00 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.16 2012/12/15 00:05:44 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -518,14 +518,21 @@ sdmmc_enable(struct sdmmc_softc *sc) if (!ISSET(sc->sc_caps, SMC_CAPS_SPI_MODE)) { /* Initialize SD I/O card function(s). */ error = sdmmc_io_enable(sc); - if (error) + if (error) { + DPRINTF(1, ("%s: sdmmc_io_enable failed %d\n", DEVNAME(sc), error); goto out; + } } /* Initialize SD/MMC memory card(s). */ if (ISSET(sc->sc_caps, SMC_CAPS_SPI_MODE) || - ISSET(sc->sc_flags, SMF_MEM_MODE)) + ISSET(sc->sc_flags, SMF_MEM_MODE)) { error = sdmmc_mem_enable(sc); + if (error) { + DPRINTF(1, ("%s: sdmmc_mem_enable failed %d\n", DEVNAME(sc), error); + goto out; + } + } out: if (error)
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jakllsch Date: Sat Dec 15 00:03:01 UTC 2012 Modified Files: src/sys/dev/sdmmc: sdmmc_mem.c sdmmcreg.h Log Message: Correctly read the 512-bit-wide big-endian Switch Function Status register. Some of this could/will also be useful for the SD Status register. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/sdmmc/sdmmc_mem.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/sdmmc/sdmmcreg.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/sdmmc/sdmmc_mem.c diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.25 src/sys/dev/sdmmc/sdmmc_mem.c:1.26 --- src/sys/dev/sdmmc/sdmmc_mem.c:1.25 Fri Dec 14 23:22:21 2012 +++ src/sys/dev/sdmmc/sdmmc_mem.c Sat Dec 15 00:03:00 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.25 2012/12/14 23:22:21 jakllsch Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.26 2012/12/15 00:03:00 jakllsch Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -45,7 +45,7 @@ /* Routines for SD/MMC memory cards. */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.25 2012/12/14 23:22:21 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.26 2012/12/15 00:03:00 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -67,6 +67,8 @@ __KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c, #define DPRINTF(s) do {} while (/*CONSTCOND*/0) #endif +typedef struct { uint32_t _bits[512/32]; } __packed __aligned(4) sdmmc_bitfield512_t; + static int sdmmc_mem_sd_init(struct sdmmc_softc *, struct sdmmc_function *); static int sdmmc_mem_mmc_init(struct sdmmc_softc *, struct sdmmc_function *); static int sdmmc_mem_send_cid(struct sdmmc_softc *, sdmmc_response *); @@ -77,7 +79,7 @@ static int sdmmc_mem_send_scr(struct sdm static int sdmmc_mem_decode_scr(struct sdmmc_softc *, struct sdmmc_function *); static int sdmmc_mem_send_cxd_data(struct sdmmc_softc *, int, void *, size_t); static int sdmmc_set_bus_width(struct sdmmc_function *, int); -static int sdmmc_mem_sd_switch(struct sdmmc_function *, int, int, int, void *); +static int sdmmc_mem_sd_switch(struct sdmmc_function *, int, int, int, sdmmc_bitfield512_t *); static int sdmmc_mem_mmc_switch(struct sdmmc_function *, uint8_t, uint8_t, uint8_t); static int sdmmc_mem_spi_read_ocr(struct sdmmc_softc *, uint32_t, uint32_t *); @@ -574,6 +576,20 @@ sdmmc_mem_set_blocklen(struct sdmmc_soft return error; } +/* make 512-bit BE quantity __bitfield()-compatible */ +static void +sdmmc_be512_to_bitfield512(sdmmc_bitfield512_t *buf) { + size_t i; + uint32_t tmp0, tmp1; + const size_t bitswords = __arraycount(buf->_bits); + for (i = 0; i < bitswords/2; i++) { + tmp0 = buf->_bits[i]; + tmp1 = buf->_bits[bitswords - 1 - i]; + buf->_bits[i] = be32toh(tmp1); + buf->_bits[bitswords - 1 - i] = be32toh(tmp0); + } +} + static int sdmmc_mem_sd_init(struct sdmmc_softc *sc, struct sdmmc_function *sf) { @@ -599,7 +615,7 @@ sdmmc_mem_sd_init(struct sdmmc_softc *sc { MMC_OCR_1_7V_1_8V | MMC_OCR_1_8V_1_9V, 5 }, }; int host_ocr, support_func, best_func, error, g, i; - char status[64]; + sdmmc_bitfield512_t status; /* Switch Function Status */ error = sdmmc_mem_send_scr(sc, sf, sf->raw_scr); if (error) { @@ -625,7 +641,7 @@ sdmmc_mem_sd_init(struct sdmmc_softc *sc if (sf->scr.sd_spec >= SCR_SD_SPEC_VER_1_10 && ISSET(sf->csd.ccc, SD_CSD_CCC_SWITCH)) { DPRINTF(("%s: switch func mode 0\n", SDMMCDEVNAME(sc))); - error = sdmmc_mem_sd_switch(sf, 0, 1, 0, status); + error = sdmmc_mem_sd_switch(sf, 0, 1, 0, &status); if (error) { aprint_error_dev(sc->sc_dev, "switch func mode 0 failed\n"); @@ -633,7 +649,7 @@ sdmmc_mem_sd_init(struct sdmmc_softc *sc } host_ocr = sdmmc_chip_host_ocr(sc->sc_sct, sc->sc_sch); - support_func = SFUNC_STATUS_GROUP(status, 1); + support_func = SFUNC_STATUS_GROUP(&status, 1); best_func = 0; for (i = 0, g = 1; i < __arraycount(switch_group0_functions); i++, g <<= 1) { @@ -647,7 +663,7 @@ sdmmc_mem_sd_init(struct sdmmc_softc *sc DPRINTF(("%s: switch func mode 1(func=%d)\n", SDMMCDEVNAME(sc), best_func)); error = - sdmmc_mem_sd_switch(sf, 1, 1, best_func, status); + sdmmc_mem_sd_switch(sf, 1, 1, best_func, &status); if (error) { aprint_error_dev(sc->sc_dev, "switch func mode 1 failed:" @@ -1059,7 +1075,7 @@ sdmmc_set_bus_width(struct sdmmc_functio static int sdmmc_mem_sd_switch(struct sdmmc_function *sf, int mode, int group, -int function, void *status) +int function, sdmmc_bitfield512_t *status) { struct sdmmc_softc *sc = sf->sc; struct sdmmc_command cmd; @@ -1132,6 +1148,10 @@ dmamem_free: free(ptr, M_DEVBUF); } } + + if (error == 0) + sdmmc_be512_to_bitfield512(status); + return error; } Index: src/sys/dev/sdmmc/sdmmcreg.h diff -u src/sys/dev/sdmmc/sdmmcreg.h:1.12 src/sys/dev/sdmmc/sdmmcreg.h:1.13 --- src/sys/d
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jakllsch Date: Fri Dec 14 23:53:57 UTC 2012 Modified Files: src/sys/dev/sdmmc: ld_sdmmc.c Log Message: Display the whole CID register upon attach as "" instead of just "". Probably should figure out a way to stuff this into the device properties database too, but not everything has pseudo-device drvctl enabled. Also, drop trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/sdmmc/ld_sdmmc.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/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.10 src/sys/dev/sdmmc/ld_sdmmc.c:1.11 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.10 Thu Feb 2 19:43:06 2012 +++ src/sys/dev/sdmmc/ld_sdmmc.c Fri Dec 14 23:53:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.10 2012/02/02 19:43:06 tls Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.11 2012/12/14 23:53:56 jakllsch Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.10 2012/02/02 19:43:06 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.11 2012/12/14 23:53:56 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -113,7 +113,9 @@ ld_sdmmc_attach(device_t parent, device_ ld->sc_dv = self; - aprint_normal(": <%s>\n", sa->sf->cid.pnm); + aprint_normal(": <0x%02x:0x%04x:%s:0x%02x:0x%08x:0x%03x>\n", + sa->sf->cid.mid, sa->sf->cid.oid, sa->sf->cid.pnm, + sa->sf->cid.rev, sa->sf->cid.psn, sa->sf->cid.mdt); aprint_naive("\n"); callout_init(&sc->sc_task.task_callout, CALLOUT_MPSAFE); @@ -130,7 +132,7 @@ ld_sdmmc_attach(device_t parent, device_ ld->sc_start = ld_sdmmc_start; /* - * It is avoided that the error occurs when the card attaches it, + * It is avoided that the error occurs when the card attaches it, * when wedge is supported. */ config_pending_incr();
CVS commit: src/lib/libc/time
Module Name:src Committed By: uwe Date: Fri Dec 14 23:26:17 UTC 2012 Modified Files: src/lib/libc/time: getdate.3 Log Message: And two more pastos in examples: December and January are in standard EST, not daylight saving EDT. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/time/getdate.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/getdate.3 diff -u src/lib/libc/time/getdate.3:1.7 src/lib/libc/time/getdate.3:1.8 --- src/lib/libc/time/getdate.3:1.7 Fri Dec 14 23:16:11 2012 +++ src/lib/libc/time/getdate.3 Fri Dec 14 23:26:17 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: getdate.3,v 1.7 2012/12/14 23:16:11 uwe Exp $ +.\" $NetBSD: getdate.3,v 1.8 2012/12/14 23:26:17 uwe Exp $ .\" .\" Copyright (c) 2009, 2011, 2012, The NetBSD Foundation. .\" All Rights Reserved. @@ -201,8 +201,8 @@ environment variable is set to the defau .It Li January Ta Li \&%B Ta Li "Thu Jan 1 12:19:47 EST 1987" .It Li December Ta Li \&%B Ta Li "Mon Dec 1 12:19:47 EST 1986" .It Li "Sep Mon" Ta Li "\&%b %a" Ta Li "Mon Sep 1 12:19:47 EDT 1986" -.It Li "Jan Fri" Ta Li "\&%b %a" Ta Li "Fri Jan 2 12:19:47 EDT 1987" -.It Li "Dec Mon" Ta Li "\&%b %a" Ta Li "Mon Dec 1 12:19:47 EDT 1986" +.It Li "Jan Fri" Ta Li "\&%b %a" Ta Li "Fri Jan 2 12:19:47 EST 1987" +.It Li "Dec Mon" Ta Li "\&%b %a" Ta Li "Mon Dec 1 12:19:47 EST 1986" .It Li "Jan Wed 1989" Ta Li "\&%b \&%a \&%Y" Ta Li "Wed Jan 4 12:19:47 EST 1989" .It Li "Fri 9" Ta Li "\&%a \&%H" Ta Li "Fri Sep 26 09:00:00 EDT 1986" .It Li "Feb 10:30" Ta Li "\&%b \&%H:\&%S" Ta Li "Sun Feb 1 10:00:30 EST 1987"
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jakllsch Date: Fri Dec 14 23:22:21 UTC 2012 Modified Files: src/sys/dev/sdmmc: sdmmc_mem.c Log Message: The Card Command Class (CCC) field is valid in both SD_CSD_CSDVER_1_0 and SD_CSD_CSDVER_2_0. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/sdmmc/sdmmc_mem.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/sdmmc/sdmmc_mem.c diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.24 src/sys/dev/sdmmc/sdmmc_mem.c:1.25 --- src/sys/dev/sdmmc/sdmmc_mem.c:1.24 Sat Oct 13 07:31:25 2012 +++ src/sys/dev/sdmmc/sdmmc_mem.c Fri Dec 14 23:22:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.24 2012/10/13 07:31:25 kiyohara Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.25 2012/12/14 23:22:21 jakllsch Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -45,7 +45,7 @@ /* Routines for SD/MMC memory cards. */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.24 2012/10/13 07:31:25 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.25 2012/12/14 23:22:21 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -321,7 +321,6 @@ sdmmc_decode_csd(struct sdmmc_softc *sc, SET(sf->flags, SFF_SDHC); csd->capacity = SD_CSD_V2_CAPACITY(resp); csd->read_bl_len = SD_CSD_V2_BL_LEN; - csd->ccc = SD_CSD_CCC(resp); break; case SD_CSD_CSDVER_1_0: @@ -343,6 +342,7 @@ sdmmc_decode_csd(struct sdmmc_softc *sc, e = SD_CSD_SPEED_EXP(resp); m = SD_CSD_SPEED_MANT(resp); csd->tran_speed = speed_exponent[e] * speed_mantissa[m] / 10; + csd->ccc = SD_CSD_CCC(resp); } else { csd->csdver = MMC_CSD_CSDVER(resp); if (csd->csdver == MMC_CSD_CSDVER_1_0) {
CVS commit: src/lib/libc/time
Module Name:src Committed By: uwe Date: Fri Dec 14 23:16:11 UTC 2012 Modified Files: src/lib/libc/time: getdate.3 Log Message: Fix two more pastos in examples. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/time/getdate.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/getdate.3 diff -u src/lib/libc/time/getdate.3:1.6 src/lib/libc/time/getdate.3:1.7 --- src/lib/libc/time/getdate.3:1.6 Fri Dec 14 23:00:21 2012 +++ src/lib/libc/time/getdate.3 Fri Dec 14 23:16:11 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: getdate.3,v 1.6 2012/12/14 23:00:21 uwe Exp $ +.\" $NetBSD: getdate.3,v 1.7 2012/12/14 23:16:11 uwe Exp $ .\" .\" Copyright (c) 2009, 2011, 2012, The NetBSD Foundation. .\" All Rights Reserved. @@ -196,10 +196,10 @@ environment variable is set to the defau .It Sy Input String Ta Sy Line in Template Ta Sy Date .It Li Mon Ta Li \&%a Ta Li "Mon Sep 22 12:19:47 EDT 1986" .It Li Sun Ta Li \&%a Ta Li "Sun Sep 28 12:19:47 EDT 1986" -.It Li Fri Ta Li \&%a Ta Li "Sun Sep 26 12:19:47 EDT 1986" +.It Li Fri Ta Li \&%a Ta Li "Fri Sep 26 12:19:47 EDT 1986" .It Li September Ta Li \&%B Ta Li "Mon Sep 1 12:19:47 EDT 1986" .It Li January Ta Li \&%B Ta Li "Thu Jan 1 12:19:47 EST 1987" -.It Li December Ta Li \&%B Ta Li "Mon Dec 1 12:19:47 EST 1987" +.It Li December Ta Li \&%B Ta Li "Mon Dec 1 12:19:47 EST 1986" .It Li "Sep Mon" Ta Li "\&%b %a" Ta Li "Mon Sep 1 12:19:47 EDT 1986" .It Li "Jan Fri" Ta Li "\&%b %a" Ta Li "Fri Jan 2 12:19:47 EDT 1987" .It Li "Dec Mon" Ta Li "\&%b %a" Ta Li "Mon Dec 1 12:19:47 EDT 1986"
CVS commit: src/lib/libc/time
Module Name:src Committed By: uwe Date: Fri Dec 14 23:00:21 UTC 2012 Modified Files: src/lib/libc/time: getdate.3 Log Message: Fix pasto in example template. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/time/getdate.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/getdate.3 diff -u src/lib/libc/time/getdate.3:1.5 src/lib/libc/time/getdate.3:1.6 --- src/lib/libc/time/getdate.3:1.5 Fri Dec 14 22:57:00 2012 +++ src/lib/libc/time/getdate.3 Fri Dec 14 23:00:21 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: getdate.3,v 1.5 2012/12/14 22:57:00 uwe Exp $ +.\" $NetBSD: getdate.3,v 1.6 2012/12/14 23:00:21 uwe Exp $ .\" .\" Copyright (c) 2009, 2011, 2012, The NetBSD Foundation. .\" All Rights Reserved. @@ -180,7 +180,7 @@ defined in the template. .Bl -column -offset indent ".Li Friday 12:00:00" ".Sy Line in Template" .It Sy "Input String" Ta Sy "Line in Template" .It Li 11/27/86 Ta Li \&%m/\&%d/\&%y -.It Li 27.11.86 Ta Li \&%d.\&%m/\&%y +.It Li 27.11.86 Ta Li \&%d.\&%m.\&%y .It Li 86-11-27 Ta Li \&%y-\&%m-\&%d .It Li "Friday 12:00:00" Ta Li "\&%A \&%H:\&%M:\&%S" .El
CVS commit: src/lib/libc/time
Module Name:src Committed By: uwe Date: Fri Dec 14 22:57:00 UTC 2012 Modified Files: src/lib/libc/time: getdate.3 Log Message: Use .Vt for types. Don't use .Pq - it formats funny in PostScript and plain parens do just fine here. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/time/getdate.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/getdate.3 diff -u src/lib/libc/time/getdate.3:1.4 src/lib/libc/time/getdate.3:1.5 --- src/lib/libc/time/getdate.3:1.4 Fri Dec 14 22:33:17 2012 +++ src/lib/libc/time/getdate.3 Fri Dec 14 22:57:00 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: getdate.3,v 1.4 2012/12/14 22:33:17 uwe Exp $ +.\" $NetBSD: getdate.3,v 1.5 2012/12/14 22:57:00 uwe Exp $ .\" .\" Copyright (c) 2009, 2011, 2012, The NetBSD Foundation. .\" All Rights Reserved. @@ -49,7 +49,7 @@ The function converts a date or time character string pointed to by .Fa str into a static -.Va tm +.Vt tm structure described in .Xr tm 3 . .Pp @@ -83,7 +83,7 @@ If only the year is given, the values of and .Fa tm_isdst members of the returned -.Va "struct tm" +.Vt "struct tm" are unspecified. .It If the century is given, but the year within the century is not given, @@ -105,7 +105,7 @@ environment timezone. If successful, the .Fn getdate function returns a pointer to a static -.Va tm +.Vt tm structure containing the broken-down time. Otherwise, a null pointer is returned and .Va getdate_err @@ -131,10 +131,9 @@ Cannot allocate memory. .It 7 Input string does not match any line in the template file. .It 8 -Input string is invalid -.Pq for example February 31 +Input string is invalid (for example, February 31) or could not be represented in a -.Va time_t . +.Vt time_t . .El .Sh ENVIRONMENT .Bl -tag -width DATEMSK
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Fri Dec 14 22:56:00 UTC 2012 Modified Files: src/lib/libc/gen: vis.3 Log Message: fix pasto (Brooks Davies) To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libc/gen/vis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/vis.3 diff -u src/lib/libc/gen/vis.3:1.28 src/lib/libc/gen/vis.3:1.29 --- src/lib/libc/gen/vis.3:1.28 Fri Dec 14 16:38:18 2012 +++ src/lib/libc/gen/vis.3 Fri Dec 14 17:55:59 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.28 2012/12/14 21:38:18 christos Exp $ +.\" $NetBSD: vis.3,v 1.29 2012/12/14 22:55:59 christos Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -219,7 +219,7 @@ except space, tab, and newline are encod The following flags alter this: .Bl -tag -width VIS_WHITEX -+.It Dv VIS_GLOB +.It Dv VIS_GLOB Also encode magic characters .Ql ( * , .Ql \&? ,
CVS commit: src/lib/libc/time
Module Name:src Committed By: uwe Date: Fri Dec 14 22:33:17 UTC 2012 Modified Files: src/lib/libc/time: getdate.3 Log Message: Fix table formatting. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/time/getdate.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/getdate.3 diff -u src/lib/libc/time/getdate.3:1.3 src/lib/libc/time/getdate.3:1.4 --- src/lib/libc/time/getdate.3:1.3 Fri Dec 14 22:22:51 2012 +++ src/lib/libc/time/getdate.3 Fri Dec 14 22:33:17 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: getdate.3,v 1.3 2012/12/14 22:22:51 khorben Exp $ +.\" $NetBSD: getdate.3,v 1.4 2012/12/14 22:33:17 uwe Exp $ .\" .\" Copyright (c) 2009, 2011, 2012, The NetBSD Foundation. .\" All Rights Reserved. @@ -178,12 +178,12 @@ run job at 3 PM, december 2nd The following examples show how local data and time specification can be defined in the template. .Pp -.Bl -column -offset indent ".Sy Input String" ".Sy Line in Template" +.Bl -column -offset indent ".Li Friday 12:00:00" ".Sy Line in Template" .It Sy "Input String" Ta Sy "Line in Template" .It Li 11/27/86 Ta Li \&%m/\&%d/\&%y .It Li 27.11.86 Ta Li \&%d.\&%m/\&%y .It Li 86-11-27 Ta Li \&%y-\&%m-\&%d -.It Li "Friday 12:00:00" Ta "\&%A \&%H:\&%M:\&%S" +.It Li "Friday 12:00:00" Ta Li "\&%A \&%H:\&%M:\&%S" .El .Pp The following examples illustrate the Internal Format Conversion rules @@ -193,7 +193,7 @@ and the .Ev LC_TIME environment variable is set to the default C locale. .Pp -.Bl -column -offset indent ".Sy Input String" ".Sy Line in Template" ".Sy Date" +.Bl -column -offset indent ".Li Jan Wed 1989" ".Sy Line in Template" ".Sy Date" .It Sy Input String Ta Sy Line in Template Ta Sy Date .It Li Mon Ta Li \&%a Ta Li "Mon Sep 22 12:19:47 EDT 1986" .It Li Sun Ta Li \&%a Ta Li "Sun Sep 28 12:19:47 EDT 1986"
CVS commit: src/lib/libc/time
Module Name:src Committed By: khorben Date: Fri Dec 14 22:22:51 UTC 2012 Modified Files: src/lib/libc/time: getdate.3 Log Message: Fixed a typo within the examples To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/time/getdate.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/getdate.3 diff -u src/lib/libc/time/getdate.3:1.2 src/lib/libc/time/getdate.3:1.3 --- src/lib/libc/time/getdate.3:1.2 Thu Apr 14 05:50:49 2011 +++ src/lib/libc/time/getdate.3 Fri Dec 14 22:22:51 2012 @@ -1,6 +1,6 @@ -.\" $NetBSD: getdate.3,v 1.2 2011/04/14 05:50:49 jruoho Exp $ +.\" $NetBSD: getdate.3,v 1.3 2012/12/14 22:22:51 khorben Exp $ .\" -.\" Copyright (c) 2009, The NetBSD Foundation. +.\" Copyright (c) 2009, 2011, 2012, The NetBSD Foundation. .\" All Rights Reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -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 April 14, 2011 +.Dd December 14, 2012 .Dt GETDATE 3 .Os .Sh NAME @@ -169,7 +169,7 @@ The following are examples of valid inpu .Bd -literal -offset indent -compact 10/1/87 4 PM Friday -Firday September 18, 1987, 10:30:30 +Friday September 18, 1987, 10:30:30 24,9,1986 10:30 at monday the 1st of december in 1986 run job at 3 PM, december 2nd
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Fri Dec 14 21:38:18 UTC 2012 Modified Files: src/lib/libc/gen: vis.3 vis.c Log Message: Add VIS_GLOB (Brooks Davies) To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libc/gen/vis.3 cvs rdiff -u -r1.44 -r1.45 src/lib/libc/gen/vis.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/libc/gen/vis.3 diff -u src/lib/libc/gen/vis.3:1.27 src/lib/libc/gen/vis.3:1.28 --- src/lib/libc/gen/vis.3:1.27 Tue May 17 03:10:39 2011 +++ src/lib/libc/gen/vis.3 Fri Dec 14 16:38:18 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.27 2011/05/17 07:10:39 joerg Exp $ +.\" $NetBSD: vis.3,v 1.28 2012/12/14 21:38:18 christos Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)vis.3 8.1 (Berkeley) 6/9/93 .\" -.Dd March 12, 2011 +.Dd December 14, 2012 .Dt VIS 3 .Os .Sh NAME @@ -219,6 +219,15 @@ except space, tab, and newline are encod The following flags alter this: .Bl -tag -width VIS_WHITEX ++.It Dv VIS_GLOB +Also encode magic characters +.Ql ( * , +.Ql \&? , +.Ql \&[ +and +.Ql # ) +recognized by +.Xr glob 3 . .It Dv VIS_SP Also encode space. .It Dv VIS_TAB @@ -408,6 +417,7 @@ The destination buffer size is not large .Sh SEE ALSO .Xr unvis 1 , .Xr vis 1 , +.Xr glob 3 , .Xr unvis 3 .Rs .%A T. Berners-Lee Index: src/lib/libc/gen/vis.c diff -u src/lib/libc/gen/vis.c:1.44 src/lib/libc/gen/vis.c:1.45 --- src/lib/libc/gen/vis.c:1.44 Sat Mar 12 14:52:48 2011 +++ src/lib/libc/gen/vis.c Fri Dec 14 16:38:18 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.44 2011/03/12 19:52:48 christos Exp $ */ +/* $NetBSD: vis.c,v 1.45 2012/12/14 21:38:18 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,7 +57,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.44 2011/03/12 19:52:48 christos Exp $"); +__RCSID("$NetBSD: vis.c,v 1.45 2012/12/14 21:38:18 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -89,7 +89,7 @@ static char *do_svis(char *, size_t *, i #define xtoa(c) "0123456789abcdef"[c] #define XTOA(c) "0123456789ABCDEF"[c] -#define MAXEXTRAS 5 +#define MAXEXTRAS 9 #define MAKEEXTRALIST(flag, extra, orig_str) \ do { \ @@ -103,6 +103,12 @@ do { \ for (o = orig, e = extra; (*e++ = *o++) != '\0';) \ continue; \ e--; \ + if (flag & VIS_GLOB) { \ + *e++ = '*'; \ + *e++ = '?'; \ + *e++ = '['; \ + *e++ = '#'; \ + } \ if (flag & VIS_SP) *e++ = ' '; \ if (flag & VIS_TAB) *e++ = '\t'; \ if (flag & VIS_NL) *e++ = '\n'; \
CVS commit: src/include
Module Name:src Committed By: christos Date: Fri Dec 14 21:36:59 UTC 2012 Modified Files: src/include: vis.h Log Message: Add VIS_GLOB (Brooks Davis) To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/include/vis.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/vis.h diff -u src/include/vis.h:1.19 src/include/vis.h:1.20 --- src/include/vis.h:1.19 Sat Mar 12 14:52:45 2011 +++ src/include/vis.h Fri Dec 14 16:36:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vis.h,v 1.19 2011/03/12 19:52:45 christos Exp $ */ +/* $NetBSD: vis.h,v 1.20 2012/12/14 21:36:59 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -39,29 +39,30 @@ /* * to select alternate encoding format */ -#define VIS_OCTAL 0x001 /* use octal \ddd format */ -#define VIS_CSTYLE 0x002 /* use \[nrft0..] where appropiate */ +#define VIS_OCTAL 0x0001 /* use octal \ddd format */ +#define VIS_CSTYLE 0x0002 /* use \[nrft0..] where appropiate */ /* * to alter set of characters encoded (default is to encode all * non-graphic except space, tab, and newline). */ -#define VIS_SP 0x004 /* also encode space */ -#define VIS_TAB 0x008 /* also encode tab */ -#define VIS_NL 0x010 /* also encode newline */ +#define VIS_SP 0x0004 /* also encode space */ +#define VIS_TAB 0x0008 /* also encode tab */ +#define VIS_NL 0x0010 /* also encode newline */ #define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL) -#define VIS_SAFE 0x020 /* only encode "unsafe" characters */ +#define VIS_SAFE 0x0020 /* only encode "unsafe" characters */ /* * other */ -#define VIS_NOSLASH 0x040 /* inhibit printing '\' */ -#define VIS_HTTP1808 0x080 /* http-style escape % hex hex */ -#define VIS_HTTPSTYLE 0x080 /* http-style escape % hex hex */ -#define VIS_MIMESTYLE 0x100 /* mime-style escape = HEX HEX */ -#define VIS_HTTP1866 0x200 /* http-style num; or &string; */ -#define VIS_NOESCAPE 0x400 /* don't decode `\' */ -#define _VIS_END 0x800 /* for unvis */ +#define VIS_NOSLASH 0x0040 /* inhibit printing '\' */ +#define VIS_HTTP1808 0x0080 /* http-style escape % hex hex */ +#define VIS_HTTPSTYLE 0x0080 /* http-style escape % hex hex */ +#define VIS_MIMESTYLE 0x0100 /* mime-style escape = HEX HEX */ +#define VIS_HTTP1866 0x0200 /* http-style num; or &string; */ +#define VIS_NOESCAPE 0x0400 /* don't decode `\' */ +#define _VIS_END 0x0800 /* for unvis */ +#define VIS_GLOB 0x1000 /* encode glob(3) magic characters */ /* * unvis return codes
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Fri Dec 14 21:31:01 UTC 2012 Modified Files: src/lib/libc/gen: unvis.c Log Message: Reduce the number of relative relocation by allocating space in the structure directly (Jilles Tjoelker @ FreeBSD) To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/lib/libc/gen/unvis.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/libc/gen/unvis.c diff -u src/lib/libc/gen/unvis.c:1.39 src/lib/libc/gen/unvis.c:1.40 --- src/lib/libc/gen/unvis.c:1.39 Tue Mar 13 17:13:37 2012 +++ src/lib/libc/gen/unvis.c Fri Dec 14 16:31:01 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: unvis.c,v 1.39 2012/03/13 21:13:37 christos Exp $ */ +/* $NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: unvis.c,v 1.39 2012/03/13 21:13:37 christos Exp $"); +__RCSID("$NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -81,7 +81,7 @@ __weak_alias(strnunvisx,_strnunvisx) * RFC 1866 */ static const struct nv { - const char *name; + const char name[7]; uint8_t value; } nv[] = { { "AElig", 198 }, /* capital AE diphthong (ligature) */
CVS commit: src/sys/dev/pci/bktr
Module Name:src Committed By: joerg Date: Fri Dec 14 19:38:36 UTC 2012 Modified Files: src/sys/dev/pci/bktr: bktr_core.c Log Message: bt848_format is only defined in a __FreeBSD__ section of bktr_os.c and overriding the local (static) definition with extern is bogus. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/bktr/bktr_core.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/bktr/bktr_core.c diff -u src/sys/dev/pci/bktr/bktr_core.c:1.53 src/sys/dev/pci/bktr/bktr_core.c:1.54 --- src/sys/dev/pci/bktr/bktr_core.c:1.53 Sat Oct 27 17:18:36 2012 +++ src/sys/dev/pci/bktr/bktr_core.c Fri Dec 14 19:38:36 2012 @@ -1,6 +1,6 @@ /* $SourceForge: bktr_core.c,v 1.6 2003/03/11 23:11:22 thomasklausner Exp $ */ -/* $NetBSD: bktr_core.c,v 1.53 2012/10/27 17:18:36 chs Exp $ */ +/* $NetBSD: bktr_core.c,v 1.54 2012/12/14 19:38:36 joerg Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp$ */ /* @@ -98,7 +98,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bktr_core.c,v 1.53 2012/10/27 17:18:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bktr_core.c,v 1.54 2012/12/14 19:38:36 joerg Exp $"); #include "opt_bktr.h" /* Include any kernel config options */ @@ -969,7 +969,6 @@ bktr_softintr(void *cookie) /* * */ -extern int bt848_format; /* used to set the default format, PAL or NTSC */ int video_open(bktr_ptr_t bktr) {
CVS commit: src/etc/rc.d
Module Name:src Committed By: apb Date: Fri Dec 14 18:42:25 UTC 2012 Modified Files: src/etc/rc.d: random_seed Log Message: Avoid using programs from /usr/bin. This should fix PR 47326. - no need for "dirname", because "df -G" can take a file name directly. - replace use of "awk" with a shell while read loop. - replace use of "stat -s" with "ls -ldn". - no need for "tail" now that the use of "stat" has changed. While here, also add some shell quotes and improve the grammar in a comment. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/etc/rc.d/random_seed Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/random_seed diff -u src/etc/rc.d/random_seed:1.3 src/etc/rc.d/random_seed:1.4 --- src/etc/rc.d/random_seed:1.3 Sat Nov 10 15:10:22 2012 +++ src/etc/rc.d/random_seed Fri Dec 14 18:42:25 2012 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: random_seed,v 1.3 2012/11/10 15:10:22 apb Exp $ +# $NetBSD: random_seed,v 1.4 2012/12/14 18:42:25 apb Exp $ # # PROVIDE: random_seed @@ -13,7 +13,7 @@ # this script won't work if run after the securelevel is changed. # # The "BEFORE: bootconf" is intended to cause this to -# be the first script to runs after mountcritlocal. +# be the first script that runs after mountcritlocal. $_rc_subr_loaded . /etc/rc.subr @@ -30,7 +30,11 @@ fs_safe() # Enforce that the file's on a local filesystem. # Include only the types we can actually write. # - fstype=$(df -G $1 | awk '$2 == "fstype" {print $1}') + fstype=$(df -G "$1" | + while read line ; do + set -- $line + if [ "$2" = "fstype" ]; then echo "$1" ; break ; fi + done ) case $fstype in ffs) return 0 @@ -55,22 +59,24 @@ random_load() { if [ -f $random_file ]; then - if ! fs_safe $(dirname ${random_file}); then + if ! fs_safe "${random_file}"; then return 1 fi - eval $(stat -s ${random_file}) + set -- $(ls -ldn "${random_file}") + st_mode="$1" # should be "-rw---" + st_uid="$3" # should be "0" for root # The file must be owned by root, if [ "$st_uid" != "0" ]; then return 1 fi # and root read/write only. - if [ "$(echo $st_mode | tail -c4)" != "600" ]; then + if [ "$st_mode" != "-rw---" ]; then return 1 fi - if rndctl -L ${random_file}; then + if rndctl -L "${random_file}"; then echo "Loaded entropy from disk." fi @@ -82,13 +88,13 @@ random_save() oum=$(umask) umask 077 - rm -Pf ${random_file} + rm -Pf "${random_file}" - if ! fs_safe $(dirname ${random_file}); then + if ! fs_safe "${random_file}"; then return 1 fi - if rndctl -S ${random_file}; then + if rndctl -S "${random_file}"; then echo "Saved entropy to disk." fi }
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Fri Dec 14 18:39:48 UTC 2012 Modified Files: src/sys/kern: vfs_mount.c Log Message: Adjust unmount prints to avoid "boothowto = AB_VERBOSE" from being cluttered like this: unmounting file systems...unmounted kernfs on /kern type kernfs unmounted etcetc. done tested: ~AB_VERBOSE, AB_VERBOSE, -DDEBUG To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/kern/vfs_mount.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/vfs_mount.c diff -u src/sys/kern/vfs_mount.c:1.15 src/sys/kern/vfs_mount.c:1.16 --- src/sys/kern/vfs_mount.c:1.15 Sat Oct 27 17:18:39 2012 +++ src/sys/kern/vfs_mount.c Fri Dec 14 18:39:48 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_mount.c,v 1.15 2012/10/27 17:18:39 chs Exp $ */ +/* $NetBSD: vfs_mount.c,v 1.16 2012/12/14 18:39:48 pooka Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.15 2012/10/27 17:18:39 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.16 2012/12/14 18:39:48 pooka Exp $"); #include #include @@ -873,7 +873,7 @@ bool vfs_unmountall(struct lwp *l) { - printf("unmounting file systems..."); + printf("unmounting file systems...\n"); return vfs_unmountall1(l, true, true); } @@ -904,7 +904,7 @@ vfs_unmount_forceone(struct lwp *l) } #ifdef DEBUG - printf("\nforcefully unmounting %s (%s)...", + printf("forcefully unmounting %s (%s)...\n", nmp->mnt_stat.f_mntonname, nmp->mnt_stat.f_mntfromname); #endif atomic_inc_uint(&nmp->mnt_refcnt); @@ -935,7 +935,7 @@ vfs_unmountall1(struct lwp *l, bool forc mp = nmp) { nmp = CIRCLEQ_PREV(mp, mnt_list); #ifdef DEBUG - printf("\nunmounting %p %s (%s)...", + printf("unmounting %p %s (%s)...\n", (void *)mp, mp->mnt_stat.f_mntonname, mp->mnt_stat.f_mntfromname); #endif @@ -953,7 +953,7 @@ vfs_unmountall1(struct lwp *l, bool forc } } if (verbose) { - printf(" done\n"); + printf("unmounting done\n"); } if (any_error && verbose) { printf("WARNING: some file systems would not unmount\n");
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: christos Date: Fri Dec 14 16:37:55 UTC 2012 Modified Files: src/sys/arch/amd64/conf: Makefile.amd64 Log Message: do like the i386 for modular. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/amd64/conf/Makefile.amd64 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/amd64/conf/Makefile.amd64 diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.40 src/sys/arch/amd64/conf/Makefile.amd64:1.41 --- src/sys/arch/amd64/conf/Makefile.amd64:1.40 Mon Dec 19 09:06:16 2011 +++ src/sys/arch/amd64/conf/Makefile.amd64 Fri Dec 14 11:37:55 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amd64,v 1.40 2011/12/19 14:06:16 joerg Exp $ +# $NetBSD: Makefile.amd64,v 1.41 2012/12/14 16:37:55 christos Exp $ # Makefile for NetBSD # @@ -41,7 +41,12 @@ CFLAGS+= -mno-red-zone -mno-sse -mno-sse ## ## (3) libkern and compat ## +OPT_MODULAR= %MODULAR% +.if !empty(OPT_MODULAR) KERN_AS= obj +.else +KERN_AS= library +.endif ## ## (4) local objects, compile rules, and dependencies
CVS commit: src/sys/modules/cyclic
Module Name:src Committed By: christos Date: Fri Dec 14 15:46:51 UTC 2012 Modified Files: src/sys/modules/cyclic: Makefile Log Message: make this work To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/modules/cyclic/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/cyclic/Makefile diff -u src/sys/modules/cyclic/Makefile:1.1 src/sys/modules/cyclic/Makefile:1.2 --- src/sys/modules/cyclic/Makefile:1.1 Sat Dec 1 20:05:16 2012 +++ src/sys/modules/cyclic/Makefile Fri Dec 14 10:46:51 2012 @@ -1,6 +1,6 @@ # $FreeBSD: src/sys/modules/dtrace/sdt/Makefile,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $ -.include "../../Makefile.inc" +.include "../Makefile.inc" .PATH: ${NETBSDSRCDIR}/external/cddl/osnet/dev/cyclic
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pgoyette Date: Fri Dec 14 15:33:20 UTC 2012 Modified Files: src/sys/dev/sysmon: sysmon_envsys_events.c Log Message: Constify To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/dev/sysmon/sysmon_envsys_events.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/sysmon/sysmon_envsys_events.c diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.107 src/sys/dev/sysmon/sysmon_envsys_events.c:1.108 --- src/sys/dev/sysmon/sysmon_envsys_events.c:1.107 Tue Dec 11 15:39:06 2012 +++ src/sys/dev/sysmon/sysmon_envsys_events.c Fri Dec 14 15:33:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_events.c,v 1.107 2012/12/11 15:39:06 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_events.c,v 1.108 2012/12/14 15:33:19 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.107 2012/12/11 15:39:06 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.108 2012/12/14 15:33:19 pgoyette Exp $"); #include #include @@ -65,7 +65,7 @@ static const struct sme_sensor_event sme { -1, -1 } }; -struct op_t { +static const struct op_t { const char *name; enum envsys_lims idx; uint32_t prop; @@ -84,7 +84,7 @@ struct op_t { { NULL, 0, 0 } }; -struct ev_reg_t { +static const struct ev_reg_t { uint32_t crittype; uint32_t powertype; const char *name; @@ -122,7 +122,7 @@ sme_event_register(prop_dictionary_t sdi prop_object_t obj; int error = 0; const char *objkey; - struct op_t *op; + const struct op_t *op; KASSERT(sdict != NULL); KASSERT(edata != NULL); @@ -495,7 +495,7 @@ sme_event_drvadd(void *arg) sysmon_envsys_lim_t lims; uint32_t props; int error = 0; - struct ev_reg_t *reg; + const struct ev_reg_t *reg; KASSERT(sed_t != NULL);
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Fri Dec 14 10:48:48 UTC 2012 Modified Files: src/lib/librumpuser: rumpuser.c Log Message: FreeBSD and DragonFly also provide hosts cpus via sysctl hw.ncpu. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/librumpuser/rumpuser.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/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.24 src/lib/librumpuser/rumpuser.c:1.25 --- src/lib/librumpuser/rumpuser.c:1.24 Thu Dec 13 15:35:09 2012 +++ src/lib/librumpuser/rumpuser.c Fri Dec 14 10:48:48 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.24 2012/12/13 15:35:09 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.25 2012/12/14 10:48:48 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include "rumpuser_port.h" #if !defined(lint) -__RCSID("$NetBSD: rumpuser.c,v 1.24 2012/12/13 15:35:09 pooka Exp $"); +__RCSID("$NetBSD: rumpuser.c,v 1.25 2012/12/14 10:48:48 pooka Exp $"); #endif /* !lint */ #include @@ -41,10 +41,13 @@ __RCSID("$NetBSD: rumpuser.c,v 1.24 2012 #include #include #include -#include #include #endif +#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) +#include +#endif + #include #include #include @@ -733,7 +736,7 @@ rumpuser_getnhostcpu(void) { int ncpu = 1; -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) size_t sz = sizeof(ncpu); sysctlbyname("hw.ncpu", &ncpu, &sz, NULL, 0);
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: roy Date: Fri Dec 14 09:48:31 UTC 2012 Modified Files: src/usr.sbin/rtadvd: config.c rtadvd.c Log Message: Intsead of forcing out each RA at shutdown and sleeping we now use the existing timer model and wait for each RA to expire itself after sending the required number of transmissions. This allows for a faster and saner shutdown. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/rtadvd/config.c cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/rtadvd/rtadvd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/rtadvd/config.c diff -u src/usr.sbin/rtadvd/config.c:1.30 src/usr.sbin/rtadvd/config.c:1.31 --- src/usr.sbin/rtadvd/config.c:1.30 Thu Dec 13 15:36:36 2012 +++ src/usr.sbin/rtadvd/config.c Fri Dec 14 09:48:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: config.c,v 1.30 2012/12/13 15:36:36 roy Exp $ */ +/* $NetBSD: config.c,v 1.31 2012/12/14 09:48:31 roy Exp $ */ /* $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $ */ /* @@ -738,8 +738,6 @@ getconfig(const char *intface, int exith } - /* If we are advertising an existing RA configuration, - * expire it */ TAILQ_FOREACH(rai, &ralist, next) { if (rai->ifindex == tmp->ifindex) { TAILQ_REMOVE(&ralist, rai, next); @@ -759,6 +757,7 @@ getconfig(const char *intface, int exith dnssl->lifetime = 0; rai->leaving_for = tmp; tmp->leaving = rai; + rai->initcounter = MAX_INITIAL_RTR_ADVERTISEMENTS; rai->mininterval = MIN_DELAY_BETWEEN_RAS; rai->maxinterval = MIN_DELAY_BETWEEN_RAS; rai->leaving_adv = MAX_FINAL_RTR_ADVERTISEMENTS; Index: src/usr.sbin/rtadvd/rtadvd.c diff -u src/usr.sbin/rtadvd/rtadvd.c:1.40 src/usr.sbin/rtadvd/rtadvd.c:1.41 --- src/usr.sbin/rtadvd/rtadvd.c:1.40 Thu Dec 13 15:40:05 2012 +++ src/usr.sbin/rtadvd/rtadvd.c Fri Dec 14 09:48:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rtadvd.c,v 1.40 2012/12/13 15:40:05 roy Exp $ */ +/* $NetBSD: rtadvd.c,v 1.41 2012/12/14 09:48:31 roy Exp $ */ /* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */ /* @@ -153,7 +153,7 @@ struct sockaddr_in6 sin6_sitelocal_allro }; static void set_die(int); -static void die(void); // XXX __dead; +static void die(void); static void set_reconf(int); static void sock_open(void); static void rtsock_open(void); @@ -260,6 +260,7 @@ main(int argc, char *argv[]) } else set[1].fd = -1; + signal(SIGINT, set_die); signal(SIGTERM, set_die); signal(SIGHUP, set_reconf); signal(SIGUSR1, rtadvd_set_dump_file); @@ -342,44 +343,53 @@ set_die(__unused int sig) static void die(void) { - struct rainfo *rai; + static int waiting; + struct rainfo *rai, *ran; struct rdnss *rdnss; struct dnssl *dnssl; - int i; - const int retrans = MAX_FINAL_RTR_ADVERTISEMENTS; - if (dflag > 1) { - syslog(LOG_DEBUG, "<%s> cease to be an advertising router\n", - __func__); - } - - TAILQ_FOREACH(rai, &ralist, next) { + if (waiting) { + if (TAILQ_FIRST(&ralist)) { + syslog(LOG_INFO, + "<%s> waiting for expiration of all RA timers", + __func__); + return; + } + syslog(LOG_NOTICE, "<%s> gracefully terminated", __func__); + free(rcvcmsgbuf); + free(sndcmsgbuf); + exit(0); + /* NOT REACHED */ + } + + waiting = 1; + syslog(LOG_NOTICE, "<%s> final RA transmission started", __func__); + + TAILQ_FOREACH_SAFE(rai, &ralist, next, ran) { + if (rai->leaving) { + TAILQ_REMOVE(&ralist, rai, next); + TAILQ_INSERT_HEAD(&ralist, rai->leaving, next); + rai->leaving->leaving = rai->leaving; + rai->leaving->leaving_for = rai->leaving; + free_rainfo(rai); + continue; + } rai->lifetime = 0; TAILQ_FOREACH(rdnss, &rai->rdnss, next) rdnss->lifetime = 0; TAILQ_FOREACH(dnssl, &rai->dnssl, next) dnssl->lifetime = 0; make_packet(rai); + rai->leaving = rai; + rai->leaving_for = rai; + rai->initcounter = MAX_INITIAL_RTR_ADVERTISEMENTS; + rai->mininterval = MIN_DELAY_BETWEEN_RAS; + rai->maxinterval = MIN_DELAY_BETWEEN_RAS; + rai->leaving_adv = MAX_FINAL_RTR_ADVERTISEMENTS; + ra_output(rai); + ra_timer_update((void *)rai, &rai->timer->tm); + rtadvd_set_timer(&rai->timer->tm, rai->timer); } - for (i = 0; i < retrans; i++) { - TAILQ_FOREACH(rai, &ralist, next) - ra_output(rai); - sleep(MIN_DELAY_BETWEEN_RAS); - } - -#ifdef __VALGRIND__ - while ((rai = TAILQ_FIRST(&ralist))) { - TAILQ_REMOVE(&ralist, rai, next); - if (rai->leaving) - free_rainfo(rai->leaving); - free_rainfo(rai); - } - free(rcvcmsgbuf); - free(sndcmsgbuf); -#endif - - exit(0); - /*NOTREACHED*/ } static void @@ -401,6 +411,11 @@ rtmsg_input(void) memset(&buffer, 0, sizeof(buffer)); n = read(rtsock, &buffer, sizeof(buffer)); + + /* We read the buffer first to clear the FD */ + if (do_die) + return; + msg = buffer.data; if (dflag > 1) { syslog(LOG_DEBUG, "<%s> received a routing message " @@ -668,6 +683,10 @@ rtadvd_input(void) if ((i = recvmsg(s
CVS commit: src/doc
Module Name:src Committed By: tron Date: Fri Dec 14 08:57:11 UTC 2012 Modified Files: src/doc: 3RDPARTY Log Message: Postfix 2.8.13 is out. To generate a diff of this commit: cvs rdiff -u -r1.988 -r1.989 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.988 src/doc/3RDPARTY:1.989 --- src/doc/3RDPARTY:1.988 Wed Dec 12 18:21:08 2012 +++ src/doc/3RDPARTY Fri Dec 14 08:57:10 2012 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.988 2012/12/12 18:21:08 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.989 2012/12/14 08:57:10 tron Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -991,7 +991,7 @@ and more. Package: Postfix Version: 2.8.12 -Current Vers: 2.8.12/2.9.4 +Current Vers: 2.8.13/2.9.5 Maintainer: Wietse Venema Archive Site: ftp://postfix.cloud9.net/official/ Home Page: http://www.postfix.org/
CVS commit: src/usr.bin/sed
Module Name:src Committed By: msaitoh Date: Fri Dec 14 08:16:51 UTC 2012 Modified Files: src/usr.bin/sed: compile.c Log Message: Fix memory leak. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/usr.bin/sed/compile.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/sed/compile.c diff -u src/usr.bin/sed/compile.c:1.37 src/usr.bin/sed/compile.c:1.38 --- src/usr.bin/sed/compile.c:1.37 Fri Feb 19 16:35:27 2010 +++ src/usr.bin/sed/compile.c Fri Dec 14 08:16:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: compile.c,v 1.37 2010/02/19 16:35:27 tnn Exp $ */ +/* $NetBSD: compile.c,v 1.38 2012/12/14 08:16:51 msaitoh Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -76,7 +76,7 @@ #if 0 static char sccsid[] = "@(#)compile.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: compile.c,v 1.37 2010/02/19 16:35:27 tnn Exp $"); +__RCSID("$NetBSD: compile.c,v 1.38 2012/12/14 08:16:51 msaitoh Exp $"); #endif #endif /* not lint */ @@ -474,6 +474,7 @@ compile_re(char *p, regex_t **repp) err(COMPILE, "RE error: %s", strregerror(eval, *repp)); if (maxnsub < (*repp)->re_nsub) maxnsub = (*repp)->re_nsub; + free(re); return (p); }
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: msaitoh Date: Fri Dec 14 08:15:44 UTC 2012 Modified Files: src/usr.bin/netstat: bpf.c Log Message: Fix memory leak. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/netstat/bpf.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/netstat/bpf.c diff -u src/usr.bin/netstat/bpf.c:1.10 src/usr.bin/netstat/bpf.c:1.11 --- src/usr.bin/netstat/bpf.c:1.10 Mon Dec 13 21:15:30 2010 +++ src/usr.bin/netstat/bpf.c Fri Dec 14 08:15:44 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.10 2010/12/13 21:15:30 pooka Exp $ */ +/* $NetBSD: bpf.c,v 1.11 2012/12/14 08:15:44 msaitoh Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -167,6 +167,7 @@ bpf_dump(const char *bpfif) printf("%s\n", p.p_comm); #undef BPFEXT } + free(v); } else { /* XXX */ errx(1, "bpf_dump not implemented using kvm");