CVS commit: src/external/lgpl3/gmp/dist/mpn/generic
Module Name:src Committed By: joerg Date: Sat Oct 27 06:55:55 UTC 2012 Modified Files: src/external/lgpl3/gmp/dist/mpn/generic: get_d.c Log Message: Appease shift vs substract warning for clang. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/lgpl3/gmp/dist/mpn/generic/get_d.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/lgpl3/gmp/dist/mpn/generic/get_d.c diff -u src/external/lgpl3/gmp/dist/mpn/generic/get_d.c:1.1.1.1 src/external/lgpl3/gmp/dist/mpn/generic/get_d.c:1.2 --- src/external/lgpl3/gmp/dist/mpn/generic/get_d.c:1.1.1.1 Mon Jun 20 05:54:41 2011 +++ src/external/lgpl3/gmp/dist/mpn/generic/get_d.c Sat Oct 27 06:55:54 2012 @@ -220,7 +220,7 @@ mpn_get_d (mp_srcptr up, mp_size_t size, x <<= GMP_NAIL_BITS; mhi |= x >> nbits >> 11; - mlo = x << GMP_LIMB_BITS - nbits - 11; + mlo = x << (GMP_LIMB_BITS - nbits - 11); nbits = nbits + 11 - GMP_NAIL_BITS; } else
CVS commit: [agc-netpgp-standalone] src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: agc Date: Sat Oct 27 02:27:50 UTC 2012 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify [agc-netpgp-standalone]: libverify.c verify.h Log Message: minor changes to libnetpgpverify(3) + allow more signature types in subkey signatures when parsing signatures in the pubring trust entries, which allows more existing, valid pubring.gpg files (constructed by gpg) to be recognised. with thanks to jakallsch for the data. + provide a nonnull_getenv() function and use it in the one place getenv(3) was previously used, following a nudge from dsl. To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c cvs rdiff -u -r1.1.2.7 -r1.1.2.8 \ src/crypto/external/bsd/netpgp/dist/src/libverify/verify.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c diff -u src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.1.2.8 src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.1.2.9 --- src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.1.2.8 Thu Oct 25 04:03:16 2012 +++ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Sat Oct 27 02:27:50 2012 @@ -51,23 +51,16 @@ #define BITS_TO_BYTES(b) (((b) + (CHAR_BIT - 1)) / CHAR_BIT) /* packet types */ -#define PUBKEY_ENC_SESSKEY_PKT 1 -#define SIGNATURE_PKT 2 /* done */ -#define SYMMKEY_ENC_SESSKEY_PKT 3 -#define ONEPASS_SIGNATURE_PKT 4 /* done */ -#define SECKEY_PKT 5 -#define PUBKEY_PKT 6 /* done */ -#define SEC_SUBKEY_PKT 7 -#define COMPRESSED_DATA_PKT 8 /* done */ -#define SYMMKEY_ENC_DATA_PKT 9 +#define SIGNATURE_PKT 2 +#define ONEPASS_SIGNATURE_PKT 4 +#define PUBKEY_PKT 6 +#define COMPRESSED_DATA_PKT 8 #define MARKER_PKT 10 -#define LITDATA_PKT 11 /* done */ -#define TRUST_PKT 12 /* done */ -#define USERID_PKT 13 /* done */ -#define PUB_SUBKEY_PKT 14 /* done */ -#define USER_ATTRIBUTE_PKT 17 /* done */ -#define SYMM_ENC_INTEG_PROT_PKT 18 -#define MODIFY_DETECTION_PKT 19 +#define LITDATA_PKT 11 +#define TRUST_PKT 12 +#define USERID_PKT 13 +#define PUB_SUBKEY_PKT 14 +#define USER_ATTRIBUTE_PKT 17 /* only allow certain packets at certain times */ #define PUBRING_ALLOWED "\002\006\014\015\016\021" @@ -759,6 +752,11 @@ read_sig_subpackets(pgpv_sigpkt_t *sigpk case SUBPKT_PREF_SYMMETRIC_ALG: sigpkt->sig.pref_symm_alg = *p; break; + case SUBPKT_REVOCATION_KEY: + sigpkt->sig.revoke_sensitive = (*p & 0x40); + sigpkt->sig.revoke_alg = p[1]; + sigpkt->sig.revoke_fingerprint = &p[2]; + break; case SUBPKT_NOTATION: sigpkt->sig.notation = *p; break; @@ -768,8 +766,11 @@ read_sig_subpackets(pgpv_sigpkt_t *sigpk case SUBPKT_PREF_COMPRESS_ALG: sigpkt->sig.pref_compress_alg = *p; break; + case SUBPKT_PREF_KEY_SERVER: + sigpkt->sig.pref_key_server = (char *)(void *)p; + break; case SUBPKT_KEY_SERVER_PREFS: - sigpkt->sig.key_server_prefs = (char *)(void *)p; + sigpkt->sig.key_server_modify = *p; break; case SUBPKT_KEY_FLAGS: sigpkt->sig.type_key = *p; @@ -788,7 +789,7 @@ read_sig_subpackets(pgpv_sigpkt_t *sigpk sigpkt->sig.why_revoked = (char *)(void *)p; break; default: - printf("hi, need to implement sigpkt %d\n", subpkt.tag); + printf("Ignoring unusual/reserved signature subpacket %d\n", subpkt.tag); break; } subpkt.s.data = p; @@ -1274,9 +1275,8 @@ recog_subkey(pgpv_t *pgp, pgpv_signed_su subkey->revoc_self_sig = signature; } do { - if (!pkt_sigtype_is(pgp, SIGTYPE_SUBKEY_BINDING) && - !pkt_sigtype_is(pgp, SIGTYPE_SUBKEY_REVOCATION)) { - printf("recog_subkey: not SIGNATURE_PKT/SUBKEY_BINDING at %zu\n", pgp->pkt); + if (!pkt_is(pgp, SIGNATURE_PKT)) { + printf("recog_subkey: not signature packet at %zu\n", pgp->pkt); return 0; } if (!recog_signature(pgp, &signature)) { @@ -1995,6 +1995,15 @@ match_sig(pgpv_cursor_t *cursor, pgpv_si return 1; } +/* check return value from getenv */ +static const char * +nonnull_getenv(const char *key) +{ + char *value; + + return ((value = getenv(key)) == NULL) ? "" : value; +} + // /* start of exported functions */ // @@ -2141,7 +2150,7 @@ pgpv_read_pubring(pgpv_t *pgp, const voi read_binary_memory(pgp, "pubring", keyring, (size_t)size) : read_binary_file(pgp, "pubring", "%s", keyring); } - return read_binary_file(pgp, "pubring", "%s/%s", getenv("HOME"), ".gnupg/pubring.gpg"); + return read_binary_file(pgp, "pubring", "%s/%s", nonnull_getenv("HOME"), ".gnupg/pubring.gpg"); } /* get verified data as a string, return its size */ Index: src/crypto/external/bsd/netpgp/dist/src/lib
CVS commit: src/sys/kern
Module Name:src Committed By: tls Date: Sat Oct 27 01:29:02 UTC 2012 Modified Files: src/sys/kern: kern_rndq.c Log Message: Fix hardware RNGs -- accept their entropy estimates *rather than* using timestamps to estimate the entropy of their input. I'd accidentally made it so no entropy was ever counted from them at all. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/kern/kern_rndq.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/kern_rndq.c diff -u src/sys/kern/kern_rndq.c:1.5 src/sys/kern/kern_rndq.c:1.6 --- src/sys/kern/kern_rndq.c:1.5 Wed Sep 5 18:57:34 2012 +++ src/sys/kern/kern_rndq.c Sat Oct 27 01:29:02 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndq.c,v 1.5 2012/09/05 18:57:34 tls Exp $ */ +/* $NetBSD: kern_rndq.c,v 1.6 2012/10/27 01:29:02 tls Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.5 2012/09/05 18:57:34 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.6 2012/10/27 01:29:02 tls Exp $"); #include #include @@ -640,6 +640,11 @@ void rnd_add_data(krndsource_t *rs, const void *const data, uint32_t len, uint32_t entropy) { + /* + * This interface is meant for feeding data which is, + * itself, random. Don't estimate entropy based on + * timestamp, just directly add the data. + */ rnd_add_data_ts(rs, data, len, entropy, rnd_counter()); } @@ -835,8 +840,6 @@ rnd_process_events(void *arg) SIMPLEQ_REMOVE_HEAD(&dq_samples, next); source = sample->source; entropy = sample->entropy; - if (source->flags & RND_FLAG_NO_ESTIMATE) - entropy = 0; /* * Hardware generators are great but sometimes they
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Fri Oct 26 23:23:23 UTC 2012 Modified Files: src/lib/libc/time: difftime.c localtime.c private.h Log Message: stronger lint foo To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/time/difftime.c cvs rdiff -u -r1.69 -r1.70 src/lib/libc/time/localtime.c cvs rdiff -u -r1.27 -r1.28 src/lib/libc/time/private.h 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/difftime.c diff -u src/lib/libc/time/difftime.c:1.12 src/lib/libc/time/difftime.c:1.13 --- src/lib/libc/time/difftime.c:1.12 Fri Oct 26 14:30:11 2012 +++ src/lib/libc/time/difftime.c Fri Oct 26 19:23:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: difftime.c,v 1.12 2012/10/26 18:30:11 christos Exp $ */ +/* $NetBSD: difftime.c,v 1.13 2012/10/26 23:23:23 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -10,7 +10,7 @@ #if 0 static char elsieid[] = "@(#)difftime.c 8.1"; #else -__RCSID("$NetBSD: difftime.c,v 1.12 2012/10/26 18:30:11 christos Exp $"); +__RCSID("$NetBSD: difftime.c,v 1.13 2012/10/26 23:23:23 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -26,17 +26,17 @@ difftime(const time_t time1, const time_ ** (assuming that the larger type has more precision). ** This is the common real-world case circa 2004. */ - /* CONSTCOND */ + /*CONSTCOND*/ if (sizeof (double) > sizeof (time_t)) return (double) time1 - (double) time0; - /* CONSTCOND */ + /*LINTED const not */ if (!TYPE_INTEGRAL(time_t)) { /* ** time_t is floating. */ return time1 - time0; } - /* CONSTCOND */ + /*LINTED const not */ if (!TYPE_SIGNED(time_t)) { /* ** time_t is integral and unsigned. Index: src/lib/libc/time/localtime.c diff -u src/lib/libc/time/localtime.c:1.69 src/lib/libc/time/localtime.c:1.70 --- src/lib/libc/time/localtime.c:1.69 Fri Oct 26 14:31:14 2012 +++ src/lib/libc/time/localtime.c Fri Oct 26 19:23:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.69 2012/10/26 18:31:14 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.70 2012/10/26 23:23:23 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -10,7 +10,7 @@ #if 0 static char elsieid[] = "@(#)localtime.c 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.69 2012/10/26 18:31:14 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.70 2012/10/26 23:23:23 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -356,7 +356,6 @@ settzname(void) static int differ_by_repeat(const time_t t1, const time_t t0) { -/* CONSTCOND */ if (TYPE_INTEGRAL(time_t) && TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) return 0; @@ -527,7 +526,6 @@ tzload(timezone_t sp, const char *name, for (i = 0; i < sp->timecnt - 2; ++i) if (sp->ats[i] > sp->ats[i + 1]) { ++i; -/* CONSTCOND */ if (TYPE_SIGNED(time_t)) { /* ** Ignore the end (easy). @@ -1867,11 +1865,11 @@ again: /* ** Do a binary search (this works whatever time_t's type is). */ - /* CONSTCOND */ + /* LINTED const not */ if (!TYPE_SIGNED(time_t)) { lo = 0; hi = lo - 1; - /* CONSTCOND */ + /* LINTED const not */ } else if (!TYPE_INTEGRAL(time_t)) { /* CONSTCOND */ if (sizeof(time_t) > sizeof(float)) Index: src/lib/libc/time/private.h diff -u src/lib/libc/time/private.h:1.27 src/lib/libc/time/private.h:1.28 --- src/lib/libc/time/private.h:1.27 Tue Oct 23 20:10:03 2012 +++ src/lib/libc/time/private.h Fri Oct 26 19:23:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: private.h,v 1.27 2012/10/24 00:10:03 christos Exp $ */ +/* $NetBSD: private.h,v 1.28 2012/10/26 23:23:23 christos Exp $ */ #ifndef PRIVATE_H #define PRIVATE_H @@ -203,7 +203,7 @@ const char * scheck(const char * string, #endif /* !defined TYPE_BIT */ #ifndef TYPE_SIGNED -#define TYPE_SIGNED(type) (((type) -1) < 0) +#define TYPE_SIGNED(type) (/*CONSTCOND*/((type) -1) < 0) #endif /* !defined TYPE_SIGNED */ /* @@ -212,7 +212,7 @@ const char * scheck(const char * string, */ #ifndef TYPE_INTEGRAL -#define TYPE_INTEGRAL(type) (((type) 0.5) != 0.5) +#define TYPE_INTEGRAL(type) (/*CONSTCOND*/((type) 0.5) != 0.5) #endif /* !defined TYPE_INTEGRAL */ #ifndef INT_STRLEN_MAXIMUM
CVS commit: src/external/bsd/ipf/dist/tools
Module Name:src Committed By: christos Date: Fri Oct 26 23:05:15 UTC 2012 Modified Files: src/external/bsd/ipf/dist/tools: ipmon.c Log Message: copy structures for alignment purposes To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ipf/dist/tools/ipmon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ipf/dist/tools/ipmon.c diff -u src/external/bsd/ipf/dist/tools/ipmon.c:1.5 src/external/bsd/ipf/dist/tools/ipmon.c:1.6 --- src/external/bsd/ipf/dist/tools/ipmon.c:1.5 Mon Oct 22 00:35:17 2012 +++ src/external/bsd/ipf/dist/tools/ipmon.c Fri Oct 26 19:05:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ipmon.c,v 1.5 2012/10/22 04:35:17 christos Exp $ */ +/* $NetBSD: ipmon.c,v 1.6 2012/10/26 23:05:14 christos Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -130,9 +130,9 @@ static void usage(const char *); static void handlehup(int); static void flushlogs(const char *, FILE *); static void print_log(config_t *, logsource_t *, const void *, size_t); -static void print_ipflog(config_t *, const void *, size_t); -static void print_natlog(config_t *, const void *, size_t); -static void print_statelog(config_t *, const void *, size_t); +static void print_ipflog(config_t *, const iplog_t *, const void *, size_t); +static void print_natlog(config_t *, const iplog_t *, const void *, size_t); +static void print_statelog(config_t *, const iplog_t *, const void *, size_t); static int read_log(int, size_t *, void *, size_t); static void write_pid(const char *); static char *icmpname(u_int, u_int); @@ -649,20 +649,18 @@ get_tm( } static void -print_natlog(config_t *conf, const void *buf, size_t blen) +print_natlog(config_t *conf, const iplog_t *ipl, const void *buf, size_t blen) { static u_32_t seqnum = 0; int res, i, len, family; - const struct natlog *nl; + struct natlog nl; struct tm *tm; - const iplog_t *ipl; char *proto; int simple; char *t; t = line; simple = 0; - ipl = (const iplog_t *)buf; if (ipl->ipl_seqnum != seqnum) { if ((ipmonopts & IPMON_SYSLOG) != 0) { syslog(LOG_WARNING, @@ -678,7 +676,7 @@ print_natlog(config_t *conf, const void } seqnum = ipl->ipl_seqnum + ipl->ipl_count; - nl = (const struct natlog *)((const char *)ipl + sizeof(*ipl)); + memcpy(&nl, (const char *)buf + sizeof(*ipl), sizeof(nl)); res = (ipmonopts & IPMON_RESOLVE) ? 1 : 0; tm = get_tm(ipl->ipl_sec); len = sizeof(line); @@ -692,10 +690,10 @@ print_natlog(config_t *conf, const void (void) strftime(t, len, "%T", tm); t += strlen(t); (void) sprintf(t, ".%-.6ld @%hd ", (long)ipl->ipl_usec, - nl->nl_rule + 1); + nl.nl_rule + 1); t += strlen(t); - switch (nl->nl_action) + switch (nl.nl_action) { case NL_NEW : strcpy(t, "NAT:NEW"); @@ -722,13 +720,13 @@ print_natlog(config_t *conf, const void break; default : - sprintf(t, "NAT:Action(%d)", nl->nl_action); + sprintf(t, "NAT:Action(%d)", nl.nl_action); break; } t += strlen(t); - switch (nl->nl_type) + switch (nl.nl_type) { case NAT_MAP : strcpy(t, "-MAP "); @@ -775,43 +773,43 @@ print_natlog(config_t *conf, const void break; default : - sprintf(t, "-Type(%d) ", nl->nl_type); + sprintf(t, "-Type(%d) ", nl.nl_type); break; } t += strlen(t); - proto = getlocalproto(nl->nl_p[0]); + proto = getlocalproto(nl.nl_p[0]); - family = vtof(nl->nl_v[0]); + family = vtof(nl.nl_v[0]); if (simple == 1) { - sprintf(t, "%s,%s <- -> ", hostname(family, nl->nl_osrcip.i6), - portlocalname(res, proto, (u_int)nl->nl_osrcport)); + sprintf(t, "%s,%s <- -> ", hostname(family, nl.nl_osrcip.i6), + portlocalname(res, proto, (u_int)nl.nl_osrcport)); t += strlen(t); - sprintf(t, "%s,%s ", hostname(family, nl->nl_nsrcip.i6), - portlocalname(res, proto, (u_int)nl->nl_nsrcport)); + sprintf(t, "%s,%s ", hostname(family, nl.nl_nsrcip.i6), + portlocalname(res, proto, (u_int)nl.nl_nsrcport)); t += strlen(t); - sprintf(t, "[%s,%s] ", hostname(family, nl->nl_odstip.i6), - portlocalname(res, proto, (u_int)nl->nl_odstport)); + sprintf(t, "[%s,%s] ", hostname(family, nl.nl_odstip.i6), + portlocalname(res, proto, (u_int)nl.nl_odstport)); } else { - sprintf(t, "%s,%s ", hostname(family, nl->nl_osrcip.i6), - portlocalname(res, proto, (u_int)nl->nl_osrcport)); + sprintf(t, "%s,%s ", hostname(family, nl.nl_osrcip.i6), + portlocalname(res, proto, (u_int)nl.nl_osrcport)); t += strlen(t); - sprintf(t, "%s,%s <- -> ", hostname(family, nl->nl_odstip.i6), - portlocalname(res, proto, (u_int)nl->nl_odstport)); + sprintf(t, "%s,%s <- -> ", hostname(family, nl.nl_odstip.i6), + portlocalname(res, proto, (u_int)nl.nl_odstport)); t += strlen(t); - sprintf(t, "%s,%s ", hostname(family, nl->nl_nsrcip.i6), - portlocalname(res, proto, (u_int)nl->nl_nsrcport)); + sprintf(t, "%s,%s ", hostname(family, nl.nl_nsrcip.i6), + portlocalname(
CVS commit: src/sys/dev/marvell
Module Name:src Committed By: msaitoh Date: Fri Oct 26 21:03:26 UTC 2012 Modified Files: src/sys/dev/marvell: if_mvgbe.c Log Message: Add missing mii_tick() call. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/marvell/if_mvgbe.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/marvell/if_mvgbe.c diff -u src/sys/dev/marvell/if_mvgbe.c:1.26 src/sys/dev/marvell/if_mvgbe.c:1.27 --- src/sys/dev/marvell/if_mvgbe.c:1.26 Wed Oct 17 18:12:59 2012 +++ src/sys/dev/marvell/if_mvgbe.c Fri Oct 26 21:03:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mvgbe.c,v 1.26 2012/10/17 18:12:59 msaitoh Exp $ */ +/* $NetBSD: if_mvgbe.c,v 1.27 2012/10/26 21:03:26 msaitoh Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -25,13 +25,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.26 2012/10/17 18:12:59 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.27 2012/10/26 21:03:26 msaitoh Exp $"); #include #include +#include #include #include #include +#include #include #include #include @@ -198,13 +200,15 @@ struct mvgbe_softc { bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; - bus_space_handle_t sc_dafh; /* dest address filter handle */ + bus_space_handle_t sc_dafh; /* dest address filter handle */ bus_dma_tag_t sc_dmat; struct ethercom sc_ethercom; struct mii_data sc_mii; u_int8_t sc_enaddr[ETHER_ADDR_LEN]; /* station addr */ + callout_t sc_tick_ch; /* tick callout */ + struct mvgbe_chain_data sc_cdata; struct mvgbe_ring_data *sc_rdata; bus_dmamap_t sc_ring_map; @@ -242,6 +246,7 @@ static void mvgbec_wininit(struct mvgbec static int mvgbe_match(device_t, struct cfdata *, void *); static void mvgbe_attach(device_t, device_t, void *); +static void mvgbe_tick(void *); static int mvgbe_intr(void *); static void mvgbe_start(struct ifnet *); @@ -646,6 +651,8 @@ mvgbe_attach(device_t parent, device_t s sc->sc_dev = self; sc->sc_port = mva->mva_unit; sc->sc_iot = mva->mva_iot; + callout_init(&sc->sc_tick_ch, 0); + callout_setfunc(&sc->sc_tick_ch, mvgbe_tick, sc); if (bus_space_subregion(mva->mva_iot, mva->mva_ioh, MVGBE_PORTR_BASE + mva->mva_unit * MVGBE_PORTR_SIZE, MVGBE_PORTR_SIZE, &sc->sc_ioh)) { @@ -862,6 +869,21 @@ mvgbe_ipgintrx(struct mvgbec_softc *csc, return 0; } +static void +mvgbe_tick(void *arg) +{ + struct mvgbe_softc *sc = arg; + struct mii_data *mii = &sc->sc_mii; + int s; + + s = splnet(); + mii_tick(mii); + /* Need more work */ + splx(s); + + callout_schedule(&sc->sc_tick_ch, hz); +} + static int mvgbe_intr(void *arg) { @@ -1119,6 +1141,8 @@ mvgbe_init(struct ifnet *ifp) MVGBE_ICE_TXERR | MVGBE_ICE_LINKCHG); + callout_schedule(&sc->sc_tick_ch, hz); + ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; @@ -1137,6 +1161,8 @@ mvgbe_stop(struct ifnet *ifp, int disabl DPRINTFN(2, ("mvgbe_stop\n")); + callout_stop(&sc->sc_tick_ch); + /* Stop Rx port activity. Check port Rx activity. */ reg = MVGBE_READ(sc, MVGBE_RQC); if (reg & MVGBE_RQC_ENQ_MASK)
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: msaitoh Date: Fri Oct 26 19:15:52 UTC 2012 Modified Files: src/sys/arch/evbarm/conf: OPENRD Log Message: Add PCI stuff. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/OPENRD 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/evbarm/conf/OPENRD diff -u src/sys/arch/evbarm/conf/OPENRD:1.2 src/sys/arch/evbarm/conf/OPENRD:1.3 --- src/sys/arch/evbarm/conf/OPENRD:1.2 Sat Sep 1 14:50:11 2012 +++ src/sys/arch/evbarm/conf/OPENRD Fri Oct 26 19:15:52 2012 @@ -1,4 +1,4 @@ -# $NetBSD: OPENRD,v 1.2 2012/09/01 14:50:11 matt Exp $ +# $NetBSD: OPENRD,v 1.3 2012/10/26 19:15:52 msaitoh Exp $ # # This is a working config file for OpenRD(.org) Client. Note that the # default boot address will not work and the kernel has to load at 8MB @@ -26,6 +26,16 @@ no sdmmc* at mvsdio? no sbt* at sdmmc? no ld* at sdmmc? +# On-chip PCI Express Interface +mvpex* at mvsoc? offset ? irq ? + +pci* at mvpex? + +pchb* at pci? dev ? function ? # PCI-Host bridges + +vga* at pci? dev ? function ? +wsdisplay* at vga? console ? + # This has two SATA ports mvsata* at mvsoc? offset ? irq ? atabus* at ata?
CVS commit: src/distrib/evbarm/instkernel/instkernel
Module Name:src Committed By: msaitoh Date: Fri Oct 26 19:13:56 UTC 2012 Modified Files: src/distrib/evbarm/instkernel/instkernel: Makefile Log Message: Add OPENRD_INSTALL. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/distrib/evbarm/instkernel/instkernel/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbarm/instkernel/instkernel/Makefile diff -u src/distrib/evbarm/instkernel/instkernel/Makefile:1.16 src/distrib/evbarm/instkernel/instkernel/Makefile:1.17 --- src/distrib/evbarm/instkernel/instkernel/Makefile:1.16 Sat Sep 1 02:05:02 2012 +++ src/distrib/evbarm/instkernel/instkernel/Makefile Fri Oct 26 19:13:56 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2012/09/01 02:05:02 matt Exp $ +# $NetBSD: Makefile,v 1.17 2012/10/26 19:13:56 msaitoh Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -17,6 +17,7 @@ MDSETTARGETS= ADI_BRH_INSTALL ${RAMDIS IQ80310_INSTALL ${RAMDISK} - \ IQ80321_INSTALL ${RAMDISK} - \ MINI2440_INSTALL ${RAMDISK} - \ + OPENRD_INSTALL ${RAMDISK} - \ TS7200_INSTALL ${RAMDISK} - \ TEAMASA_NPWR_INSTALL ${RAMDISK} - .else
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Fri Oct 26 18:31:14 UTC 2012 Modified Files: src/lib/libc/time: localtime.c Log Message: - whitespace - s/consttmp/const tmp/ - sync comments - don't save errno where it is not needed - consistent lint comments To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/lib/libc/time/localtime.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/time/localtime.c diff -u src/lib/libc/time/localtime.c:1.68 src/lib/libc/time/localtime.c:1.69 --- src/lib/libc/time/localtime.c:1.68 Tue Oct 23 20:10:03 2012 +++ src/lib/libc/time/localtime.c Fri Oct 26 14:31:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.68 2012/10/24 00:10:03 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.69 2012/10/26 18:31:14 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -10,7 +10,7 @@ #if 0 static char elsieid[] = "@(#)localtime.c 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.68 2012/10/24 00:10:03 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.69 2012/10/26 18:31:14 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -128,8 +128,8 @@ struct __state { time_t ats[TZ_MAX_TIMES]; unsigned char types[TZ_MAX_TIMES]; struct ttinfo ttis[TZ_MAX_TYPES]; - char chars[/*CONSTCOND*/BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt), -(2 * (MY_TZNAME_MAX + 1)))]; + char chars[/*CONSTCOND*/BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, +sizeof gmt), (2 * (MY_TZNAME_MAX + 1)))]; struct lsinfo lsis[TZ_MAX_LEAPS]; }; @@ -180,7 +180,7 @@ static time_t time1(const timezone_t sp static time_t time2(const timezone_t sp, struct tm * const tmp, subfun_t funcp, const long offset, int *const okayp); -static time_t time2sub(const timezone_t sp, struct tm * consttmp, +static time_t time2sub(const timezone_t sp, struct tm * const tmp, subfun_t funcp, const long offset, int *const okayp, const int do_norm_secs); static struct tm * timesub(const timezone_t sp, const time_t * timep, @@ -1074,7 +1074,7 @@ tzparse(timezone_t sp, const char *name, if (*name != '\0') return -1; /* - ** Initial values of theirstdoffset + ** Initial values of theirstdoffset and theirdstoffset. */ theirstdoffset = 0; for (i = 0; i < sp->timecnt; ++i) { @@ -1138,6 +1138,7 @@ tzparse(timezone_t sp, const char *name, } /* ** Finally, fill in ttis. + ** ttisstd and ttisgmt need not be handled */ memset(sp->ttis, 0, sizeof(sp->ttis)); sp->ttis[0].tt_gmtoff = -stdoffset; @@ -1247,11 +1248,8 @@ void tzset_unlocked(void) { const char * name; - int saveerrno; - saveerrno = errno; name = getenv("TZ"); - errno = saveerrno; if (name == NULL) { tzsetwall_unlocked(); return; @@ -1264,7 +1262,7 @@ tzset_unlocked(void) (void)strlcpy(lcl_TZname, name, sizeof(lcl_TZname)); if (lclptr == NULL) { - saveerrno = errno; + int saveerrno = errno; lclptr = calloc(1, sizeof *lclptr); errno = saveerrno; if (lclptr == NULL) { @@ -1869,17 +1867,17 @@ again: /* ** Do a binary search (this works whatever time_t's type is). */ -/* LINTED constant */ + /* CONSTCOND */ if (!TYPE_SIGNED(time_t)) { lo = 0; hi = lo - 1; -/* LINTED constant */ + /* CONSTCOND */ } else if (!TYPE_INTEGRAL(time_t)) { -/* CONSTCOND */ + /* CONSTCOND */ if (sizeof(time_t) > sizeof(float)) -/* LINTED assumed double */ + /* LINTED assumed double */ hi = (time_t) DBL_MAX; -/* LINTED assumed float */ + /* LINTED assumed float */ else hi = (time_t) FLT_MAX; lo = -hi; } else {
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Fri Oct 26 18:30:11 UTC 2012 Modified Files: src/lib/libc/time: difftime.c Log Message: consistent lint commments To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/time/difftime.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/time/difftime.c diff -u src/lib/libc/time/difftime.c:1.11 src/lib/libc/time/difftime.c:1.12 --- src/lib/libc/time/difftime.c:1.11 Tue Mar 20 12:39:08 2012 +++ src/lib/libc/time/difftime.c Fri Oct 26 14:30:11 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: difftime.c,v 1.11 2012/03/20 16:39:08 matt Exp $ */ +/* $NetBSD: difftime.c,v 1.12 2012/10/26 18:30:11 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -10,7 +10,7 @@ #if 0 static char elsieid[] = "@(#)difftime.c 8.1"; #else -__RCSID("$NetBSD: difftime.c,v 1.11 2012/03/20 16:39:08 matt Exp $"); +__RCSID("$NetBSD: difftime.c,v 1.12 2012/10/26 18:30:11 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -26,17 +26,17 @@ difftime(const time_t time1, const time_ ** (assuming that the larger type has more precision). ** This is the common real-world case circa 2004. */ -/* LINTED constant */ + /* CONSTCOND */ if (sizeof (double) > sizeof (time_t)) return (double) time1 - (double) time0; -/* LINTED constant */ + /* CONSTCOND */ if (!TYPE_INTEGRAL(time_t)) { /* ** time_t is floating. */ return time1 - time0; } -/* LINTED constant */ + /* CONSTCOND */ if (!TYPE_SIGNED(time_t)) { /* ** time_t is integral and unsigned. @@ -58,7 +58,7 @@ difftime(const time_t time1, const time_ ** time1 and time0 have opposite signs. ** Punt if unsigned long is too narrow. */ -/* CONSTCOND */ + /* CONSTCOND */ if (sizeof (unsigned long) < sizeof (time_t)) return (double) time1 - (double) time0; /*
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Fri Oct 26 18:29:49 UTC 2012 Modified Files: src/lib/libc/time: asctime.c Log Message: remove unused constant To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/time/asctime.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/time/asctime.c diff -u src/lib/libc/time/asctime.c:1.16 src/lib/libc/time/asctime.c:1.17 --- src/lib/libc/time/asctime.c:1.16 Tue Oct 23 20:10:03 2012 +++ src/lib/libc/time/asctime.c Fri Oct 26 14:29:49 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: asctime.c,v 1.16 2012/10/24 00:10:03 christos Exp $ */ +/* $NetBSD: asctime.c,v 1.17 2012/10/26 18:29:49 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -16,7 +16,7 @@ #if 0 static char elsieid[] = "@(#)asctime.c 8.5"; #else -__RCSID("$NetBSD: asctime.c,v 1.16 2012/10/24 00:10:03 christos Exp $"); +__RCSID("$NetBSD: asctime.c,v 1.17 2012/10/26 18:29:49 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -84,15 +84,6 @@ static char buf_asctime[MAX_ASCTIME_BUF_ ** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition. */ -/* -** Big enough for something such as -** ??? ???-2147483648 -2147483648:-2147483648:-2147483648 -2147483648\n -** (two three-character abbreviations, five strings denoting integers, -** three explicit spaces, two explicit colons, a newline, -** and a trailing ASCII nul). -*/ -#define ASCTIME_BUFLEN (3 * 2 + 5 * INT_STRLEN_MAXIMUM(int) + 3 + 2 + 1 + 1) - char * asctime_r(const struct tm *timeptr, char *buf) {
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Fri Oct 26 18:29:35 UTC 2012 Modified Files: src/lib/libc/time: ialloc.c Log Message: remove register To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/time/ialloc.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/time/ialloc.c diff -u src/lib/libc/time/ialloc.c:1.8 src/lib/libc/time/ialloc.c:1.9 --- src/lib/libc/time/ialloc.c:1.8 Tue Oct 23 20:10:03 2012 +++ src/lib/libc/time/ialloc.c Fri Oct 26 14:29:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ialloc.c,v 1.8 2012/10/24 00:10:03 christos Exp $ */ +/* $NetBSD: ialloc.c,v 1.9 2012/10/26 18:29:34 christos Exp $ */ /* ** This file is in the public domain, so clarified as of ** 2006-07-17 by Arthur David Olson. @@ -13,7 +13,7 @@ #if 0 static char elsieid[] = "@(#)ialloc.c 8.30"; #else -__RCSID("$NetBSD: ialloc.c,v 1.8 2012/10/24 00:10:03 christos Exp $"); +__RCSID("$NetBSD: ialloc.c,v 1.9 2012/10/26 18:29:34 christos Exp $"); #endif #include "private.h" @@ -21,8 +21,8 @@ __RCSID("$NetBSD: ialloc.c,v 1.8 2012/10 char * icatalloc(char *const old, const char *const new) { - register char * result; - register int oldsize, newsize; + char * result; + int oldsize, newsize; newsize = (new == NULL) ? 0 : strlen(new); if (old == NULL)
CVS commit: src/distrib
Module Name:src Committed By: tsutsui Date: Fri Oct 26 18:15:56 UTC 2012 Modified Files: src/distrib/emips/miniroot: Makefile.inc src/distrib/hp300/miniroot: Makefile.inc src/distrib/hpcarm/miniroot: Makefile.inc src/distrib/hpcmips/miniroot: Makefile.inc src/distrib/hpcsh/miniroot: Makefile.inc src/distrib/mvme68k/miniroot: Makefile.inc src/distrib/pmax/miniroot: Makefile.inc src/distrib/vax/miniroot: Makefile.inc Log Message: Fix PR install/47123 (sysinst fails with "openpty() failed" on many ports): Add "ipty" to MAKEDEVTARGETS in miniroot/Makefile.inc since "MAKEDEV all" no longer creates /dev/pty* device nodes and miniroot doesn't mount ptyfs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/distrib/emips/miniroot/Makefile.inc cvs rdiff -u -r1.12 -r1.13 src/distrib/hp300/miniroot/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/distrib/hpcarm/miniroot/Makefile.inc cvs rdiff -u -r1.19 -r1.20 src/distrib/hpcmips/miniroot/Makefile.inc cvs rdiff -u -r1.7 -r1.8 src/distrib/hpcsh/miniroot/Makefile.inc cvs rdiff -u -r1.12 -r1.13 src/distrib/mvme68k/miniroot/Makefile.inc cvs rdiff -u -r1.23 -r1.24 src/distrib/pmax/miniroot/Makefile.inc cvs rdiff -u -r1.22 -r1.23 src/distrib/vax/miniroot/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/emips/miniroot/Makefile.inc diff -u src/distrib/emips/miniroot/Makefile.inc:1.2 src/distrib/emips/miniroot/Makefile.inc:1.3 --- src/distrib/emips/miniroot/Makefile.inc:1.2 Wed Jun 15 14:47:43 2011 +++ src/distrib/emips/miniroot/Makefile.inc Fri Oct 26 18:15:55 2012 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.2 2011/06/15 14:47:43 tsutsui Exp $ +# $NetBSD: Makefile.inc,v 1.3 2012/10/26 18:15:55 tsutsui Exp $ DBG= -Os IMAGESIZE= 32m MAKEFS_FLAGS= -f 15 IMAGEENDIAN= be -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty LISTS+= ${DISTRIBDIR}/common/list.sysinst MTREECONF+= ${.CURDIR}/mtree.usr.install IMAGEDEPENDS+= ${ARCHDIR}/dot.profile \ Index: src/distrib/hp300/miniroot/Makefile.inc diff -u src/distrib/hp300/miniroot/Makefile.inc:1.12 src/distrib/hp300/miniroot/Makefile.inc:1.13 --- src/distrib/hp300/miniroot/Makefile.inc:1.12 Thu Feb 11 09:06:48 2010 +++ src/distrib/hp300/miniroot/Makefile.inc Fri Oct 26 18:15:55 2012 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.12 2010/02/11 09:06:48 roy Exp $ +# $NetBSD: Makefile.inc,v 1.13 2012/10/26 18:15:55 tsutsui Exp $ IMAGESIZE= 7m IMAGEENDIAN= be -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty MAKEFS_FLAGS= -o density=4k IMAGEDEPENDS+= ${ARCHDIR}/dot.profile ${ARCHDIR}/install.md \ ${KERNOBJDIR}/INSTALL/netbsd Index: src/distrib/hpcarm/miniroot/Makefile.inc diff -u src/distrib/hpcarm/miniroot/Makefile.inc:1.6 src/distrib/hpcarm/miniroot/Makefile.inc:1.7 --- src/distrib/hpcarm/miniroot/Makefile.inc:1.6 Thu Feb 11 09:06:48 2010 +++ src/distrib/hpcarm/miniroot/Makefile.inc Fri Oct 26 18:15:55 2012 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.6 2010/02/11 09:06:48 roy Exp $ +# $NetBSD: Makefile.inc,v 1.7 2012/10/26 18:15:55 tsutsui Exp $ DBG= -Os IMAGESIZE= 4352k MAKEFS_FLAGS= -o density=2k IMAGEENDIAN= le -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty LISTS+= ${DISTRIBDIR}/common/list.sysinst MTREECONF+= ${.CURDIR}/mtree.usr.install IMAGEDEPENDS+= ${ARCHDIR}/dot.profile \ Index: src/distrib/hpcmips/miniroot/Makefile.inc diff -u src/distrib/hpcmips/miniroot/Makefile.inc:1.19 src/distrib/hpcmips/miniroot/Makefile.inc:1.20 --- src/distrib/hpcmips/miniroot/Makefile.inc:1.19 Thu Feb 11 09:06:48 2010 +++ src/distrib/hpcmips/miniroot/Makefile.inc Fri Oct 26 18:15:55 2012 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.19 2010/02/11 09:06:48 roy Exp $ +# $NetBSD: Makefile.inc,v 1.20 2012/10/26 18:15:55 tsutsui Exp $ DBG= -Os IMAGESIZE= 4352k MAKEFS_FLAGS= -o density=2k IMAGEENDIAN= le -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty LISTS+= ${DISTRIBDIR}/common/list.sysinst MTREECONF+= ${.CURDIR}/mtree.usr.install IMAGEDEPENDS+= ${ARCHDIR}/dot.profile \ Index: src/distrib/hpcsh/miniroot/Makefile.inc diff -u src/distrib/hpcsh/miniroot/Makefile.inc:1.7 src/distrib/hpcsh/miniroot/Makefile.inc:1.8 --- src/distrib/hpcsh/miniroot/Makefile.inc:1.7 Sat May 15 05:08:53 2010 +++ src/distrib/hpcsh/miniroot/Makefile.inc Fri Oct 26 18:15:55 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.7 2010/05/15 05:08:53 tsutsui Exp $ +# $NetBSD: Makefile.inc,v 1.8 2012/10/26 18:15:55 tsutsui Exp $ WARNS= 1 DBG= -Os @@ -6,7 +6,7 @@ DBG= -Os IMAGESIZE= 4m MAKEFS_FLAGS= -o density=2k IMAGEENDIAN= le -MAKEDEVTARGETS= all +MAKEDEVTARGETS= all ipty LISTS+= ${DISTRIBDIR}/common/list.sysinst.en MTREECONF+= ${.CURDIR}/mtree.usr.install IMAGEDEPENDS+= ${ARCHDIR}/dot.profile Index: src/distrib/mvme68k/miniroot/Makefile.inc diff -u src/distrib/mvme68k/miniroot/Makefile.inc:1.12 src/distrib/mvme68k/miniroot/Makefil
CVS commit: src/usr.sbin/ifmcstat
Module Name:src Committed By: seanb Date: Fri Oct 26 16:52:52 UTC 2012 Modified Files: src/usr.sbin/ifmcstat: ifmcstat.c Log Message: Ensure entire sockaddr_dl is obtained. May not have been the case previously for interfaces with long names. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/ifmcstat/ifmcstat.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/ifmcstat/ifmcstat.c diff -u src/usr.sbin/ifmcstat/ifmcstat.c:1.10 src/usr.sbin/ifmcstat/ifmcstat.c:1.11 --- src/usr.sbin/ifmcstat/ifmcstat.c:1.10 Sun Apr 19 07:49:07 2009 +++ src/usr.sbin/ifmcstat/ifmcstat.c Fri Oct 26 16:52:52 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ifmcstat.c,v 1.10 2009/04/19 07:49:07 lukem Exp $ */ +/* $NetBSD: ifmcstat.c,v 1.11 2012/10/26 16:52:52 seanb Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -140,7 +140,12 @@ int main() struct arpcom arpcom; #else struct ethercom ec; - struct sockaddr_dl sdl; + union { + struct sockaddr_storage st; + struct sockaddr_dl sdl; + } su; + struct sockaddr_dl *sdlp; + sdlp = &su.sdl; #endif if ((kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, buf)) == NULL) { @@ -172,10 +177,13 @@ int main() #endif #ifdef __NetBSD__ - KREAD(ifnet.if_sadl, &sdl, struct sockaddr_dl); - if (sdl.sdl_type == IFT_ETHER) { + KREAD(ifnet.if_sadl, sdlp, struct sockaddr_dl); + if (sdlp->sdl_type == IFT_ETHER) { + /* If we didn't get all of it, try again */ + if (sdlp->sdl_len > sizeof(struct sockaddr_dl)) +kread((u_long)ifnet.if_sadl, (void *)sdlp, sdlp->sdl_len); printf("\tenaddr %s", - ether_ntoa((struct ether_addr *)LLADDR(&sdl))); + ether_ntoa((struct ether_addr *)LLADDR(sdlp))); KREAD(ifp, &ec, struct ethercom); printf(" multicnt %d", ec.ec_multicnt); acmc(ec.ec_multiaddrs.lh_first);
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: chs Date: Fri Oct 26 14:46:44 UTC 2012 Modified Files: src/sys/arch/i386/i386: locore.S Log Message: in osyscall, set the PSL_I bit into the correct field of the trapframe. it was going into tf_eip instead of tf_eflags, which would sometimes corrupt %eip and always return to user mode with interrupts disabled. this was found with a netbsd 1.0 binary, and dsl@ points out that this should also fix PR 41342. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/arch/i386/i386/locore.S 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/i386/i386/locore.S diff -u src/sys/arch/i386/i386/locore.S:1.102 src/sys/arch/i386/i386/locore.S:1.103 --- src/sys/arch/i386/i386/locore.S:1.102 Sat Sep 1 23:19:46 2012 +++ src/sys/arch/i386/i386/locore.S Fri Oct 26 14:46:44 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.102 2012/09/01 23:19:46 cherry Exp $ */ +/* $NetBSD: locore.S,v 1.103 2012/10/26 14:46:44 chs Exp $ */ /* * Copyright-o-rama! @@ -129,7 +129,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.102 2012/09/01 23:19:46 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.103 2012/10/26 14:46:44 chs Exp $"); #include "opt_compat_oldboot.h" #include "opt_ddb.h" @@ -1130,7 +1130,7 @@ IDTVEC(osyscall) #endif pushfl # set eflags in trap frame popl 8(%esp) - orl $PSL_I,(%esp) # re-enable ints on return to user + orl $PSL_I,8(%esp) # re-enable ints on return to user pushl $7 # size of instruction for restart jmp syscall1 IDTVEC_END(osyscall)
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: christos Date: Fri Oct 26 12:42:10 UTC 2012 Modified Files: src/crypto/external/bsd/openssh/dist: ssh-agent.c Log Message: Don't forget to re-assign sock after dup2(); from Jarle Greipsland To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/crypto/external/bsd/openssh/dist/ssh-agent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/ssh-agent.c diff -u src/crypto/external/bsd/openssh/dist/ssh-agent.c:1.10 src/crypto/external/bsd/openssh/dist/ssh-agent.c:1.11 --- src/crypto/external/bsd/openssh/dist/ssh-agent.c:1.10 Tue Sep 18 11:18:01 2012 +++ src/crypto/external/bsd/openssh/dist/ssh-agent.c Fri Oct 26 08:42:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ssh-agent.c,v 1.10 2012/09/18 15:18:01 christos Exp $ */ +/* $NetBSD: ssh-agent.c,v 1.11 2012/10/26 12:42:10 christos Exp $ */ /* $OpenBSD: ssh-agent.c,v 1.172 2011/06/03 01:37:40 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -36,7 +36,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: ssh-agent.c,v 1.10 2012/09/18 15:18:01 christos Exp $"); +__RCSID("$NetBSD: ssh-agent.c,v 1.11 2012/10/26 12:42:10 christos Exp $"); #include #include #include @@ -1322,6 +1322,7 @@ main(int ac, char **av) cleanup_exit(1); } close(sock); + sock = STDERR_FILENO + 1; } #if defined(F_CLOSEM) if (fcntl(sock + 1, F_CLOSEM, 0) == -1) {
CVS commit: src/share/man/man4
Module Name:src Committed By: msaitoh Date: Fri Oct 26 11:43:43 UTC 2012 Modified Files: src/share/man/man4: puc.4 Log Message: Now the driver supports not only EG20T but also a lot of other Intel chipsets' serial over lan devices, so modify the entry. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/share/man/man4/puc.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/puc.4 diff -u src/share/man/man4/puc.4:1.37 src/share/man/man4/puc.4:1.38 --- src/share/man/man4/puc.4:1.37 Thu Oct 18 17:27:36 2012 +++ src/share/man/man4/puc.4 Fri Oct 26 11:43:43 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: puc.4,v 1.37 2012/10/18 17:27:36 msaitoh Exp $ +.\" $NetBSD: puc.4,v 1.38 2012/10/26 11:43:43 msaitoh Exp $ .\" .\" Copyright (c) 1998 Christopher G. Demetriou .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" <> .\" -.Dd October 19, 2012 +.Dd October 26, 2012 .Dt PUC 4 .Os .Sh NAME @@ -91,7 +91,7 @@ The driver currently supports the follow .It Tn "Exsys EX-41098 (4 port serial)" .It Tn "IBM 4810 SurePOS 300 Series SCC (4 port serial)" .It Tn "InnoSys Keyspan SX Pro (4 port serial)" -.It Tn "Intel EG20T Serial over LAN" +.It Tn "Intel chipset internal Serial over LAN" .It Tn "I-O DATA RSA-PCI (2 port serial)" .It Tn "I-O DATA RSA-PCI2 (2 port serial)" .It Tn "I-O DATA RSA-PCI2/P4 (4 port serial)"
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Fri Oct 26 11:34:06 UTC 2012 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: Ticket #1805 To generate a diff of this commit: cvs rdiff -u -r1.1.2.191 -r1.1.2.192 src/doc/CHANGES-5.2 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-5.2 diff -u src/doc/CHANGES-5.2:1.1.2.191 src/doc/CHANGES-5.2:1.1.2.192 --- src/doc/CHANGES-5.2:1.1.2.191 Fri Oct 26 07:42:55 2012 +++ src/doc/CHANGES-5.2 Fri Oct 26 11:34:05 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.191 2012/10/26 07:42:55 sborrill Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.192 2012/10/26 11:34:05 sborrill Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -8708,3 +8708,10 @@ share/man/man3/bits.31.13-1.14 via p Document the correct return value of __BIT() and __BITS(). [msaitoh, ticket #1808] +sys/arch/xen/xen/xengnt.c 1.25 via patch + + Prevents a memory corruption issue that freezes a Xen DomU + and can also cause fs corruption. Addresses PR port-xen/47057 + and port-xen/47056. + [royger, ticket #1805] +
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: sborrill Date: Fri Oct 26 11:31:50 UTC 2012 Modified Files: src/sys/arch/xen/xen [netbsd-5]: xengnt.c Log Message: Pull up the following revisions(s) (requested by royger in ticket #1805): sys/arch/xen/xen/xengnt.c: revision 1.25 via patch Prevents a memory corruption issue that freezes a Xen DomU and can also cause fs corruption. Addresses PR port-xen/47057 and port-xen/47056 To generate a diff of this commit: cvs rdiff -u -r1.10.4.1 -r1.10.4.2 src/sys/arch/xen/xen/xengnt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/xen/xengnt.c diff -u src/sys/arch/xen/xen/xengnt.c:1.10.4.1 src/sys/arch/xen/xen/xengnt.c:1.10.4.2 --- src/sys/arch/xen/xen/xengnt.c:1.10.4.1 Sat Jan 30 19:14:20 2010 +++ src/sys/arch/xen/xen/xengnt.c Fri Oct 26 11:31:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: xengnt.c,v 1.10.4.1 2010/01/30 19:14:20 snj Exp $ */ +/* $NetBSD: xengnt.c,v 1.10.4.2 2012/10/26 11:31:50 sborrill Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.10.4.1 2010/01/30 19:14:20 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.10.4.2 2012/10/26 11:31:50 sborrill Exp $"); #include #include @@ -55,6 +55,9 @@ __KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1 #define NR_GRANT_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(grant_entry_t)) +/* External tools reserve first few grant table entries. */ +#define NR_RESERVED_ENTRIES 8 + int gnt_nr_grant_frames; int gnt_max_grant_frames; @@ -127,7 +130,7 @@ xengnt_more_entries() gnttab_setup_table_t setup; u_long *pages; int nframes_new = gnt_nr_grant_frames + 1; - int i; + int i, start_gnt; if (gnt_nr_grant_frames == gnt_max_grant_frames) return ENOMEM; @@ -167,9 +170,14 @@ xengnt_more_entries() /* * add the grant entries associated to the last grant table frame - * and mark them as free + * and mark them as free. Prevent using the first grants (from 0 to 8) + * since they are used by the tools. */ - for (i = gnt_nr_grant_frames * NR_GRANT_ENTRIES_PER_PAGE; + start_gnt = (gnt_nr_grant_frames * NR_GRANT_ENTRIES_PER_PAGE) < + (NR_RESERVED_ENTRIES + 1) ? + (NR_RESERVED_ENTRIES + 1) : + (gnt_nr_grant_frames * NR_GRANT_ENTRIES_PER_PAGE); + for (i = start_gnt; i < nframes_new * NR_GRANT_ENTRIES_PER_PAGE; i++) { KASSERT(gnt_entries[last_gnt_entry] == XENGNT_NO_ENTRY); @@ -206,7 +214,7 @@ xengnt_get_entry() entry = gnt_entries[last_gnt_entry]; gnt_entries[last_gnt_entry] = XENGNT_NO_ENTRY; splx(s); - KASSERT(entry != XENGNT_NO_ENTRY); + KASSERT(entry != XENGNT_NO_ENTRY && entry > NR_RESERVED_ENTRIES); KASSERT(last_gnt_entry >= 0 && last_gnt_entry <= gnt_max_grant_frames * NR_GRANT_ENTRIES_PER_PAGE); return entry; } @@ -218,6 +226,7 @@ static void xengnt_free_entry(grant_ref_t entry) { int s = splvm(); + KASSERT(entry > NR_RESERVED_ENTRIES); KASSERT(gnt_entries[last_gnt_entry] == XENGNT_NO_ENTRY); KASSERT(last_gnt_entry >= 0 && last_gnt_entry <= gnt_max_grant_frames * NR_GRANT_ENTRIES_PER_PAGE); gnt_entries[last_gnt_entry] = entry;
CVS commit: src/external/broadcom/rpi-firmware/dist
Module Name:src Committed By: skrll Date: Fri Oct 26 10:22:43 UTC 2012 Added Files: src/external/broadcom/rpi-firmware/dist: LICENCE.broadcom bootcode.bin fixup.dat fixup_cd.dat start.elf start_cd.elf Log Message: Add the raspberry pi firmware distribution under the license shown below. OK'ed by board@ some time ago. This version of the firmware allows the gpu/arm memory split to be configured in config.txt using the gpu_mem= option. Copyright (c) 2006, Broadcom Corporation. All rights reserved. Redistribution. Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met: * This software may only be used for the purposes of developing for, running or using a Raspberry Pi device. * Redistributions must reproduce the above copyright notice and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Broadcom Corporation nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission. DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom \ src/external/broadcom/rpi-firmware/dist/bootcode.bin \ src/external/broadcom/rpi-firmware/dist/fixup.dat \ src/external/broadcom/rpi-firmware/dist/fixup_cd.dat \ src/external/broadcom/rpi-firmware/dist/start.elf \ src/external/broadcom/rpi-firmware/dist/start_cd.elf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom diff -u /dev/null src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom:1.1 --- /dev/null Fri Oct 26 10:22:43 2012 +++ src/external/broadcom/rpi-firmware/dist/LICENCE.broadcom Fri Oct 26 10:22:42 2012 @@ -0,0 +1,29 @@ +Copyright (c) 2006, Broadcom Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* This software may only be used for the purposes of developing for, + running or using a Raspberry Pi device. +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Broadcom Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + Index: src/external/broadcom/rpi-firmware/dist/bootcode.bin Index: src/external/broadcom/rpi-firmware/dist/fixup.dat Index: src/external/broadcom/rpi-firmware/dist/fixup_cd.dat Index: src/external/broadcom/rpi-firmware/dist/start.elf Index: src/external/broadcom/rpi-firmware/dist/start_cd.elf
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: skrll Date: Fri Oct 26 10:03:13 UTC 2012 Modified Files: src/sys/arch/evbarm/rpi: rpi_machdep.c Log Message: Count the memory regions in bootconfig.dramblocks when using the VCPROP information. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/rpi/rpi_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/rpi/rpi_machdep.c diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.15 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.16 --- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.15 Fri Oct 19 12:33:27 2012 +++ src/sys/arch/evbarm/rpi/rpi_machdep.c Fri Oct 26 10:03:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_machdep.c,v 1.15 2012/10/19 12:33:27 skrll Exp $ */ +/* $NetBSD: rpi_machdep.c,v 1.16 2012/10/26 10:03:13 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.15 2012/10/19 12:33:27 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.16 2012/10/26 10:03:13 skrll Exp $"); #include "opt_evbarm_boardtype.h" @@ -218,9 +218,12 @@ rpi_bootparams(void) size_t n = vcprop_tag_resplen(&vptp_mem->tag) / sizeof(struct vcprop_memory); + bootconfig.dramblocks = 0; + for (int i = 0; i < n && i < DRAM_BLOCKS; i++) { bootconfig.dram[i].address = vptp_mem->mem[i].base; bootconfig.dram[i].pages = atop(vptp_mem->mem[i].size); + bootconfig.dramblocks++; } }
CVS commit: src/sys/dev/ic
Module Name:src Committed By: bouyer Date: Fri Oct 26 09:59:11 UTC 2012 Modified Files: src/sys/dev/ic: ahcisata_core.c Log Message: Workaround PR kern/47097: use delay() instead of tsleep() ahci_do_reset_drive() if not called with AT_WAIT. The right fix here is to change the ata layer to reset the drive from thread context, to avoid a 0.5 delay() in interrupt context when a drive fails. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/ic/ahcisata_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/ic/ahcisata_core.c diff -u src/sys/dev/ic/ahcisata_core.c:1.44 src/sys/dev/ic/ahcisata_core.c:1.45 --- src/sys/dev/ic/ahcisata_core.c:1.44 Thu Sep 27 00:39:47 2012 +++ src/sys/dev/ic/ahcisata_core.c Fri Oct 26 09:59:11 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_core.c,v 1.44 2012/09/27 00:39:47 matt Exp $ */ +/* $NetBSD: ahcisata_core.c,v 1.45 2012/10/26 09:59:11 bouyer Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.44 2012/09/27 00:39:47 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.45 2012/10/26 09:59:11 bouyer Exp $"); #include #include @@ -721,7 +721,10 @@ again: if sig & AHCI_P_TFD_ST) >> AHCI_P_TFD_ST_SHIFT) & WDCS_BSY) == 0) break; - tsleep(&sc, PRIBIO, "ahcid2h", mstohz(10)); + if (flags & AT_WAIT) + tsleep(&sc, PRIBIO, "ahcid2h", mstohz(10)); + else + delay(1); } if (i == AHCI_RST_WAIT) { aprint_error("%s: BSY never cleared, TD 0x%x\n", @@ -740,7 +743,10 @@ again: AHCI_READ(sc, AHCI_P_CMD(chp->ch_channel))), DEBUG_PROBE); end: ahci_channel_stop(sc, chp, flags); - tsleep(&sc, PRIBIO, "ahcirst", mstohz(500)); + if (flags & AT_WAIT) + tsleep(&sc, PRIBIO, "ahcirst", mstohz(500)); + else + delay(50); /* clear port interrupt register */ AHCI_WRITE(sc, AHCI_P_IS(chp->ch_channel), 0x); ahci_channel_start(sc, chp, AT_WAIT,
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: sborrill Date: Fri Oct 26 09:33:39 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: Ticket #619 To generate a diff of this commit: cvs rdiff -u -r1.1.2.14 -r1.1.2.15 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.14 src/doc/CHANGES-6.1:1.1.2.15 --- src/doc/CHANGES-6.1:1.1.2.14 Thu Oct 25 17:30:14 2012 +++ src/doc/CHANGES-6.1 Fri Oct 26 09:33:39 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1,v 1.1.2.14 2012/10/25 17:30:14 riz Exp $ +# $NetBSD: CHANGES-6.1,v 1.1.2.15 2012/10/26 09:33:39 sborrill Exp $ A complete list of changes from the 6.0 release until the 6.1 release: @@ -345,7 +345,7 @@ usr.bin/netstat/netstat.1 1.64-1.65 Document the -t and -l options. PR#47085. [msaitoh, ticket #635] -share/man/man3/bits.3 1.13-1.14 +share/man/man3/bits.31.13-1.14 Document the correct return value of __BIT() and __BITS(). [msaitoh, ticket #636] @@ -355,3 +355,8 @@ sys/netinet6/frag6.c1.54 Fix "atomic fragments" for IPv6. [christos, ticket #637] +sbin/gpt/gpt.c 1.16-1.17 + + Endianness fixes. + [riz, ticket #619] +
CVS commit: [netbsd-6] src/sbin/gpt
Module Name:src Committed By: sborrill Date: Fri Oct 26 09:02:28 UTC 2012 Modified Files: src/sbin/gpt [netbsd-6]: gpt.c Log Message: Pull up the following revisions(s) (requested by riz in ticket #619): sbin/gpt/gpt.c: revision 1.16-1.17 Endianness fixes. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.4.1 src/sbin/gpt/gpt.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/gpt/gpt.c diff -u src/sbin/gpt/gpt.c:1.15 src/sbin/gpt/gpt.c:1.15.4.1 --- src/sbin/gpt/gpt.c:1.15 Sat Aug 27 17:38:16 2011 +++ src/sbin/gpt/gpt.c Fri Oct 26 09:02:27 2012 @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: gpt.c,v 1.15 2011/08/27 17:38:16 joerg Exp $"); +__RCSID("$NetBSD: gpt.c,v 1.15.4.1 2012/10/26 09:02:27 sborrill Exp $"); #endif #include @@ -196,7 +196,7 @@ utf8_to_utf16(const uint8_t *s8, uint16_ /* Initial characters. */ if (utfbytes != 0) { /* Incomplete encoding. */ -s16[s16idx++] = 0xfffd; +s16[s16idx++] = htole16(0xfffd); if (s16idx == s16len) { s16[--s16idx] = 0; return; @@ -227,10 +227,12 @@ utf8_to_utf16(const uint8_t *s8, uint16_ if (utfchar >= 0x1 && s16idx + 2 >= s16len) utfchar = 0xfffd; if (utfchar >= 0x1) { -s16[s16idx++] = 0xd800 | ((utfchar>>10)-0x40); -s16[s16idx++] = 0xdc00 | (utfchar & 0x3ff); +s16[s16idx++] = +htole16(0xd800 | ((utfchar>>10)-0x40)); +s16[s16idx++] = +htole16(0xdc00 | (utfchar & 0x3ff)); } else -s16[s16idx++] = utfchar; +s16[s16idx++] = htole16(utfchar); if (s16idx == s16len) { s16[--s16idx] = 0; return;
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: sborrill Date: Fri Oct 26 08:05:00 UTC 2012 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.1 Log Message: Ticket #641 To generate a diff of this commit: cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-6.0.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.0.1 diff -u src/doc/CHANGES-6.0.1:1.1.2.7 src/doc/CHANGES-6.0.1:1.1.2.8 --- src/doc/CHANGES-6.0.1:1.1.2.7 Thu Oct 25 17:26:34 2012 +++ src/doc/CHANGES-6.0.1 Fri Oct 26 08:05:00 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.1,v 1.1.2.7 2012/10/25 17:26:34 riz Exp $ +# $NetBSD: CHANGES-6.0.1,v 1.1.2.8 2012/10/26 08:05:00 sborrill Exp $ A complete list of changes from the NetBSD 6.0 release to the NetBSD 6.0.1 release: @@ -51,3 +51,10 @@ sys/netinet6/frag6.c1.54 Fix "atomic fragments" for IPv6. [christos, ticket #637] +share/misc/bsd-family-tree 1.46-1.47 + + Re-add a line from NetBSD 0.8 to FreeBSD 1.0. + Add some missing NetBSD releases: 4.0.1, 5.0.1, 5.0.2 and + 5.1.2. + [riz, ticket #641] +
CVS commit: [netbsd-6-0] src/share/misc
Module Name:src Committed By: sborrill Date: Fri Oct 26 08:03:00 UTC 2012 Modified Files: src/share/misc [netbsd-6-0]: bsd-family-tree Log Message: Pull up the following revisions(s) (requested by riz in ticket #641): share/misc/bsd-family-tree: revision 1.46-1.47 Re-add a line from NetBSD 0.8 to FreeBSD 1.0. Add some missing NetBSD releases: 4.0.1, 5.0.1, 5.0.2 and 5.1.2. To generate a diff of this commit: cvs rdiff -u -r1.43.6.1 -r1.43.6.2 src/share/misc/bsd-family-tree Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/bsd-family-tree diff -u src/share/misc/bsd-family-tree:1.43.6.1 src/share/misc/bsd-family-tree:1.43.6.2 --- src/share/misc/bsd-family-tree:1.43.6.1 Wed Oct 24 03:27:13 2012 +++ src/share/misc/bsd-family-tree Fri Oct 26 08:02:59 2012 @@ -62,9 +62,9 @@ Tenth Edition | || 4.4BSD| ||/ | | || 4.4BSD-Encumbered | | - | NetBSD 0.8| BSD/386 1.0 - || | | -FreeBSD 1.0 NetBSD 0.9| BSD/386 1.1 + |-NetBSD 0.8| BSD/386 1.0 + | /| | | +FreeBSD 1.0 <-' NetBSD 0.9| BSD/386 1.1 || .- 4.4BSD Lite | FreeBSD 1.1 | / / | \ | || / /| \ | @@ -216,42 +216,42 @@ FreeBSD 5.2 | | | | 10.5| | | | | | | OpenBSD 4.2 | | | | NetBSD 4.0 | | - | FreeBSD 6.3| | | | - |\ | | | | - *--FreeBSD| | | |DragonFly 1.12.0 - |7.0 | | | | | - | | | | | OpenBSD 4.3 | - | | | | | |DragonFly 2.0.0 + | FreeBSD 6.3| ||| | + |\ | ||| | + *--FreeBSD| | |||DragonFly 1.12.0 + |7.0 | | ||| | + | | | | ||OpenBSD 4.3 | + | | | | | NetBSD 4.0.1|DragonFly 2.0.0 | |FreeBSD | | OpenBSD 4.4 | | | 6.4 | | | | | | | | | | | FreeBSD 7.1 | | | | | | | | |DragonFly 2.2.0 | FreeBSD 7.2 | NetBSD 5.0 OpenBSD 4.5 | - | \ | ||| | - | | Mac OS X ||| | - | |10.6||| | - | | | |||DragonFly 2.4.0 - | | | ||OpenBSD 4.6 | - | | | ||| | - *--FreeBSD | | ||| | - |8.0 | | ||| | - | | FreeBSD | ||| | - | | 7.3| |||DragonFly 2.6.0 - | || | ||OpenBSD 4.7 | - | FreeBSD | | ||| | - |8.1 | | ||| | - | || | |||DragonFly 2.8.2 - | || | ||OpenBSD 4.8 | - | || | | NetBSD 5.1 | | - | FreeBSD FreeBSD | | | | - |8.2 7.4| | | DragonFly 2.10.1 - | | | | OpenBSD 4.9 | - | `-. Mac OS X | | | - |\ 10.7| | |
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Fri Oct 26 07:42:56 UTC 2012 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: Ticket #1808 To generate a diff of this commit: cvs rdiff -u -r1.1.2.190 -r1.1.2.191 src/doc/CHANGES-5.2 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-5.2 diff -u src/doc/CHANGES-5.2:1.1.2.190 src/doc/CHANGES-5.2:1.1.2.191 --- src/doc/CHANGES-5.2:1.1.2.190 Thu Oct 25 09:10:39 2012 +++ src/doc/CHANGES-5.2 Fri Oct 26 07:42:55 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.190 2012/10/25 09:10:39 sborrill Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.191 2012/10/26 07:42:55 sborrill Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -8703,3 +8703,8 @@ share/misc/bsd-family-tree 1.46-1.47 5.1.2. [riz, ticket #1806] +share/man/man3/bits.31.13-1.14 via patch + + Document the correct return value of __BIT() and __BITS(). + [msaitoh, ticket #1808] +
CVS commit: [netbsd-5] src/share/man/man3
Module Name:src Committed By: sborrill Date: Fri Oct 26 07:41:24 UTC 2012 Modified Files: src/share/man/man3 [netbsd-5]: bits.3 Log Message: Pull up the following revisions(s) (requested by msaitoh in ticket #1808): share/man/man3/bits.3: revision 1.13-1.14 via patch Document the correct return value of __BIT() and __BITS(). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.2.1 src/share/man/man3/bits.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man3/bits.3 diff -u src/share/man/man3/bits.3:1.3 src/share/man/man3/bits.3:1.3.2.1 --- src/share/man/man3/bits.3:1.3 Tue Aug 19 22:54:53 2008 +++ src/share/man/man3/bits.3 Fri Oct 26 07:41:23 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: bits.3,v 1.3 2008/08/19 22:54:53 jnemeth Exp $ +.\" $NetBSD: bits.3,v 1.3.2.1 2012/10/26 07:41:23 sborrill Exp $ .\" .\" Copyright (c) 2006 David Young. All rights reserved. .\" @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 9, 2006 +.Dd October 17, 2012 .Dt BITS 3 .Os .Sh NAME @@ -40,9 +40,9 @@ .Nd "macros for preparing bitmasks and operating on bit fields" .Sh SYNOPSIS .In sys/cdefs.h -.Ft uint32_t +.Ft uintmax_t .Fn __BIT "n" -.Ft uint32_t +.Ft uintmax_t .Fn __BITS "m" "n" .Fn __SHIFTIN "v" "mask" .Fn __SHIFTOUT "v" "mask"