CVS commit: src/sys/dev/i2c
Module Name:src Committed By: christos Date: Mon Jan 4 19:24:15 UTC 2016 Modified Files: src/sys/dev/i2c: adm1021.c Log Message: PR/50621: David Binderman: Wrap iic_exec() in a simpler utility function and fix all the pointer/sizeof botches in the proces. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/i2c/adm1021.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/i2c/adm1021.c diff -u src/sys/dev/i2c/adm1021.c:1.11 src/sys/dev/i2c/adm1021.c:1.12 --- src/sys/dev/i2c/adm1021.c:1.11 Sun Jan 3 12:27:26 2016 +++ src/sys/dev/i2c/adm1021.c Mon Jan 4 14:24:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: adm1021.c,v 1.11 2016/01/03 17:27:26 jdc Exp $ */ +/* $NetBSD: adm1021.c,v 1.12 2016/01/04 19:24:15 christos Exp $ */ /* $OpenBSD: adm1021.c,v 1.27 2007/06/24 05:34:35 dlg Exp $ */ /* @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.11 2016/01/03 17:27:26 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.12 2016/01/04 19:24:15 christos Exp $"); #include #include @@ -117,10 +117,10 @@ struct admtemp_softc { struct sysmon_envsys *sc_sme; envsys_data_t sc_sensor[ADMTEMP_NUM_SENSORS]; int sc_setdef[ADMTEMP_NUM_SENSORS]; - u_int8_t sc_highlim[ADMTEMP_NUM_SENSORS]; - u_int8_t sc_lowlim[ADMTEMP_NUM_SENSORS]; - u_int8_t sc_highlim2, sc_lowlim2; - u_int8_t sc_thermlim[ADMTEMP_NUM_SENSORS]; + uint8_t sc_highlim[ADMTEMP_NUM_SENSORS]; + uint8_t sc_lowlim[ADMTEMP_NUM_SENSORS]; + uint8_t sc_highlim2, sc_lowlim2; + uint8_t sc_thermlim[ADMTEMP_NUM_SENSORS]; }; int admtemp_match(device_t, cfdata_t, void *); @@ -179,6 +179,14 @@ admtemp_match(device_t parent, cfdata_t return 0; } +static int +admtemp_exec(struct admtemp_softc *sc, i2c_op_t op, uint8_t *cmd, +uint8_t *data) +{ + return iic_exec(sc->sc_tag, op, sc->sc_addr, cmd, sizeof(*cmd), data, + sizeof(*data), 0); +} + /* * Set flags based on chip type for direct config, or by testing for * indirect config. @@ -199,21 +207,19 @@ admtemp_match(device_t parent, cfdata_t */ static void admtemp_setflags(struct admtemp_softc *sc, struct i2c_attach_args *ia, -u_int8_t* comp, u_int8_t *rev, char* name) +uint8_t* comp, uint8_t *rev, char* name) { - u_int8_t cmd, data, tmp; + uint8_t cmd, data, tmp; int i; *comp = 0; *rev = 0; cmd = ADM1021_COMPANY; - iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, - sc->sc_addr, , sizeof cmd, comp, sizeof comp, 0); + admtemp_exec(sc, I2C_OP_READ_WITH_STOP, , comp); cmd = ADM1021_DIE_REVISION; - iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, - sc->sc_addr, , sizeof cmd, rev, sizeof rev, 0); + admtemp_exec(sc, I2C_OP_READ_WITH_STOP, , rev); sc->sc_noneg = 1; sc->sc_nolow = 0; @@ -233,9 +239,8 @@ admtemp_setflags(struct admtemp_softc *s if (*comp == 0) { sc->sc_noneg = 0; cmd = ADM1021_INT_LOW_READ; - if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, - , sizeof cmd, , sizeof comp, 0) == 0 && - data != ADMTEMP_LOW_DEFAULT) { + if (admtemp_exec(sc, I2C_OP_READ_WITH_STOP, , comp) == 0 && + *comp != ADMTEMP_LOW_DEFAULT) { sc->sc_nolow = 1; strlcpy(name, "LM84", ADMTEMP_NAMELEN); } else @@ -255,28 +260,20 @@ admtemp_setflags(struct admtemp_softc *s if (*comp == ADM1021_COMPANY_ADM) { cmd = ADM1023_EXT_HIGH2; - if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, - , sizeof cmd, , sizeof data, 0) == 0) { + if (admtemp_exec(sc, I2C_OP_READ_WITH_STOP, , ) == 0) { tmp = 1 << ADM1023_EXT2_SHIFT; - iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP, - sc->sc_addr, , sizeof cmd, - , sizeof tmp, 0); - if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, - sc->sc_addr, , sizeof cmd, - , sizeof tmp, 0) == 0 && - tmp == 1 << ADM1023_EXT2_SHIFT) { + admtemp_exec(sc, I2C_OP_WRITE_WITH_STOP, , ); + if (admtemp_exec(sc, I2C_OP_READ_WITH_STOP, , + ) == 0 && tmp == 1 << ADM1023_EXT2_SHIFT) { sc->sc_ext11 = 1; strlcpy(name, "ADM1023", ADMTEMP_NAMELEN); } - iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP, - sc->sc_addr, , sizeof cmd, - , sizeof data, 0); + admtemp_exec(sc, I2C_OP_WRITE_WITH_STOP, , ); } cmd = ADM1032_EXT_THERM; if (sc->sc_ext11 && - iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, - , sizeof cmd, , sizeof data, 0) == 0 && - data == 0x55) { + admtemp_exec(sc, I2C_OP_READ_WITH_STOP, , ) == 0 + && data == 0x55) { sc->sc_therm = 1; strlcpy(name, "ADM1032", ADMTEMP_NAMELEN); } @@ -294,7 +291,7 @@ admtemp_attach(device_t parent, device_t { struct admtemp_softc *sc = device_private(self); struct i2c_attach_args *ia = aux; - u_int8_t cmd, data, stat, comp, rev; + uint8_t cmd, data, stat, comp, rev; char name[ADMTEMP_NAMELEN]; sc->sc_tag = ia->ia_tag; @@ -302,25 +299,22 @@ admtemp_attach(device_t parent, device_t
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdc Date: Mon Jan 4 10:00:33 UTC 2016 Modified Files: src/sys/dev/ic: pcf8584.c Log Message: Redo r1.12 - process cmd and value buffers in pcfiic_xmit(). Avoids allocating a temporary buffer for writes using both buffers. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/pcf8584.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/pcf8584.c diff -u src/sys/dev/ic/pcf8584.c:1.13 src/sys/dev/ic/pcf8584.c:1.14 --- src/sys/dev/ic/pcf8584.c:1.13 Sun Jan 3 17:32:17 2016 +++ src/sys/dev/ic/pcf8584.c Mon Jan 4 10:00:33 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pcf8584.c,v 1.13 2016/01/03 17:32:17 jdc Exp $ */ +/* $NetBSD: pcf8584.c,v 1.14 2016/01/04 10:00:33 jdc Exp $ */ /* $OpenBSD: pcf8584.c,v 1.9 2007/10/20 18:46:21 kettenis Exp $ */ /* @@ -31,7 +31,7 @@ #include #include -/* Internal egisters */ +/* Internal registers */ #define PCF8584_S0 0x00 #define PCF8584_S1 0x01 #define PCF8584_S2 0x02 @@ -44,7 +44,7 @@ int pcfiic_i2c_exec(void *, i2c_op_t, i size_t, void *, size_t, int); int pcfiic_xmit(struct pcfiic_softc *, u_int8_t, const u_int8_t *, - size_t); + size_t, const u_int8_t *, size_t); int pcfiic_recv(struct pcfiic_softc *, u_int8_t, u_int8_t *, size_t); @@ -157,21 +157,9 @@ pcfiic_i2c_exec(void *arg, i2c_op_t op, * If we are reading, write address, cmdbuf, then read address, buf. */ if (I2C_OP_WRITE_P(op)) { - if (len > 0) { - uint8_t *tmp; - - tmp = malloc(cmdlen + len, M_DEVBUF, - flags & I2C_F_POLL ? M_NOWAIT : M_WAITOK); - if (tmp == NULL) -return (1); - memcpy(tmp, cmdbuf, cmdlen); - memcpy(tmp + cmdlen, buf, len); - ret = pcfiic_xmit(sc, addr & 0x7f, tmp, cmdlen + len); - free(tmp, M_DEVBUF); - } else - ret = pcfiic_xmit(sc, addr & 0x7f, cmdbuf, cmdlen); + ret = pcfiic_xmit(sc, addr & 0x7f, cmdbuf, cmdlen, buf, len); } else { - if (pcfiic_xmit(sc, addr & 0x7f, cmdbuf, cmdlen) != 0) + if (pcfiic_xmit(sc, addr & 0x7f, cmdbuf, cmdlen, NULL, 0) != 0) return (1); ret = pcfiic_recv(sc, addr & 0x7f, buf, len); } @@ -179,8 +167,8 @@ pcfiic_i2c_exec(void *arg, i2c_op_t op, } int -pcfiic_xmit(struct pcfiic_softc *sc, u_int8_t addr, const u_int8_t *buf, -size_t len) +pcfiic_xmit(struct pcfiic_softc *sc, u_int8_t addr, const u_int8_t *cmdbuf, +size_t cmdlen, const u_int8_t *buf, size_t len) { int i, err = 0; volatile u_int8_t r; @@ -191,7 +179,7 @@ pcfiic_xmit(struct pcfiic_softc *sc, u_i pcfiic_write(sc, PCF8584_S0, addr << 1); pcfiic_write(sc, PCF8584_S1, PCF8584_CMD_START); - for (i = 0; i <= len; i++) { + for (i = 0; i <= cmdlen + len; i++) { if (pcfiic_wait_pin(sc, ) != 0) { pcfiic_write(sc, PCF8584_S1, PCF8584_CMD_STOP); return (1); @@ -202,8 +190,10 @@ pcfiic_xmit(struct pcfiic_softc *sc, u_i break; } - if (i < len) - pcfiic_write(sc, PCF8584_S0, buf[i]); + if (i < cmdlen) + pcfiic_write(sc, PCF8584_S0, cmdbuf[i]); + else if (i < cmdlen + len) + pcfiic_write(sc, PCF8584_S0, buf[i - cmdlen]); } pcfiic_write(sc, PCF8584_S1, PCF8584_CMD_STOP); return (err);
CVS commit: src/sys/dev
Module Name:src Committed By: mlelstv Date: Mon Jan 4 10:02:15 UTC 2016 Modified Files: src/sys/dev: dksubr.c Log Message: erase dangling pointer to prevent reuse To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/dksubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dksubr.c diff -u src/sys/dev/dksubr.c:1.85 src/sys/dev/dksubr.c:1.86 --- src/sys/dev/dksubr.c:1.85 Mon Dec 21 12:33:12 2015 +++ src/sys/dev/dksubr.c Mon Jan 4 10:02:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dksubr.c,v 1.85 2015/12/21 12:33:12 mlelstv Exp $ */ +/* $NetBSD: dksubr.c,v 1.86 2016/01/04 10:02:15 mlelstv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.85 2015/12/21 12:33:12 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.86 2016/01/04 10:02:15 mlelstv Exp $"); #include #include @@ -451,6 +451,7 @@ dk_drain(struct dk_softc *dksc) mutex_enter(>sc_iolock); bp = dksc->sc_deferred; + dksc->sc_deferred = NULL; if (bp != NULL) { bp->b_error = EIO; bp->b_resid = bp->b_bcount;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: mlelstv Date: Mon Jan 4 11:12:40 UTC 2016 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Fix dump on raid. - offset dump by RF_PROTECTED_SECTORS (thanks oster@ for noticing) - call component dump function with byte count instead of block count - return -1 instead of errno values in dk_size for error conditions. There are still issues with dumping. - the raid device must be open, neither reading the disklabel nor flushing the component labels in rfmarkdirty is possible when dumping. - dumping to a wedge component fails because the wedge driver only allows dumping to swap partitions, not raid partitions. To generate a diff of this commit: cvs rdiff -u -r1.335 -r1.336 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.335 src/sys/dev/raidframe/rf_netbsdkintf.c:1.336 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.335 Sun Jan 3 08:17:24 2016 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Mon Jan 4 11:12:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.335 2016/01/03 08:17:24 mlelstv Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.336 2016/01/04 11:12:40 mlelstv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.335 2016/01/03 08:17:24 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.336 2016/01/04 11:12:40 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -598,11 +598,11 @@ raidsize(dev_t dev) unit = raidunit(dev); if ((rs = raidget(unit, false)) == NULL) - return ENXIO; + return -1; dksc = >sc_dksc; if ((rs->sc_flags & RAIDF_INITED) == 0) - return (ENODEV); + return -1; return dk_size(dksc, dev); } @@ -622,6 +622,13 @@ raiddump(dev_t dev, daddr_t blkno, void if ((rs->sc_flags & RAIDF_INITED) == 0) return ENODEV; +/* + Note that blkno is relative to this particular partition. + By adding adding RF_PROTECTED_SECTORS, we get a value that + is relative to the partition used for the underlying component. +*/ + blkno += RF_PROTECTED_SECTORS; + return dk_dump(dksc, dev, blkno, va, size); } @@ -719,7 +726,7 @@ raid_dumpblocks(device_t dev, void *va, bdev = bdevsw_lookup(raidPtr->Disks[dumpto].dev); error = (*bdev->d_dump)(raidPtr->Disks[dumpto].dev, -blkno, va, nblk); +blkno, va, nblk * raidPtr->bytesPerSector); out: raidunlock(rs);
CVS commit: src/usr.bin/kdump
Module Name:src Committed By: martin Date: Mon Jan 4 08:24:42 UTC 2016 Modified Files: src/usr.bin/kdump: kdump.c Log Message: Cast register_t to unsigned long before printf'ing it with %lx. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/usr.bin/kdump/kdump.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/kdump/kdump.c diff -u src/usr.bin/kdump/kdump.c:1.121 src/usr.bin/kdump/kdump.c:1.122 --- src/usr.bin/kdump/kdump.c:1.121 Sun Jan 3 22:05:18 2016 +++ src/usr.bin/kdump/kdump.c Mon Jan 4 08:24:42 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: kdump.c,v 1.121 2016/01/03 22:05:18 christos Exp $ */ +/* $NetBSD: kdump.c,v 1.122 2016/01/04 08:24:42 martin Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)kdump.c 8.4 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: kdump.c,v 1.121 2016/01/03 22:05:18 christos Exp $"); +__RCSID("$NetBSD: kdump.c,v 1.122 2016/01/04 08:24:42 martin Exp $"); #endif #endif /* not lint */ @@ -577,7 +577,7 @@ ktrsyscall(struct ktr_syscall *ktr) if ((cp = fcntlname(*ap)) != NULL) (void)printf(",%s", cp); else { -(void)printf(",%#lx", *ap); +(void)printf(",%#lx", (unsigned long)*ap); } ap++; argcount--;
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Mon Jan 4 09:08:38 UTC 2016 Modified Files: src/sys/net: if.c if.h Log Message: Fix the destruction of the afdata lock Pointed out by mlelstv@ To generate a diff of this commit: cvs rdiff -u -r1.319 -r1.320 src/sys/net/if.c cvs rdiff -u -r1.193 -r1.194 src/sys/net/if.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/net/if.c diff -u src/sys/net/if.c:1.319 src/sys/net/if.c:1.320 --- src/sys/net/if.c:1.319 Fri Nov 20 08:10:36 2015 +++ src/sys/net/if.c Mon Jan 4 09:08:38 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.319 2015/11/20 08:10:36 ozaki-r Exp $ */ +/* $NetBSD: if.c,v 1.320 2016/01/04 09:08:38 ozaki-r Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.319 2015/11/20 08:10:36 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.320 2016/01/04 09:08:38 ozaki-r Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -895,6 +895,8 @@ again: ifioctl_detach(ifp); + IF_AFDATA_LOCK_DESTROY(ifp); + /* * remove packets that came from ifp, from software interrupt queues. */ Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.193 src/sys/net/if.h:1.194 --- src/sys/net/if.h:1.193 Fri Oct 2 03:08:26 2015 +++ src/sys/net/if.h Mon Jan 4 09:08:38 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.193 2015/10/02 03:08:26 ozaki-r Exp $ */ +/* $NetBSD: if.h,v 1.194 2016/01/04 09:08:38 ozaki-r Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -452,6 +452,8 @@ typedef struct ifnet { (ifp)->if_afdata_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET); \ } while (0) +#define IF_AFDATA_LOCK_DESTROY(ifp) mutex_obj_free((ifp)->if_afdata_lock) + #define IF_AFDATA_WLOCK(ifp) mutex_enter((ifp)->if_afdata_lock) #define IF_AFDATA_RLOCK(ifp) mutex_enter((ifp)->if_afdata_lock) #define IF_AFDATA_WUNLOCK(ifp) mutex_exit((ifp)->if_afdata_lock) @@ -459,7 +461,6 @@ typedef struct ifnet { #define IF_AFDATA_LOCK(ifp) IF_AFDATA_WLOCK(ifp) #define IF_AFDATA_UNLOCK(ifp) IF_AFDATA_WUNLOCK(ifp) #define IF_AFDATA_TRYLOCK(ifp) mutex_tryenter((ifp)->if_afdata_lock) -#define IF_AFDATA_DESTROY(ifp) mutex_destroy((ifp)->if_afdata_lock) #define IF_AFDATA_LOCK_ASSERT(ifp) \ KASSERT(mutex_owned((ifp)->if_afdata_lock)) @@ -474,6 +475,8 @@ typedef struct ifnet { #define IF_AFDATA_LOCK_INIT(ifp) \ do {(ifp)->if_afdata_lock = rw_obj_alloc();} while (0) +#define IF_AFDATA_LOCK_DESTROY(ifp) rw_obj_free((ifp)->if_afdata_lock) + #define IF_AFDATA_WLOCK(ifp) rw_enter((ifp)->if_afdata_lock, RW_WRITER) #define IF_AFDATA_RLOCK(ifp) rw_enter((ifp)->if_afdata_lock, RW_READER) #define IF_AFDATA_WUNLOCK(ifp) rw_exit((ifp)->if_afdata_lock) @@ -481,7 +484,6 @@ typedef struct ifnet { #define IF_AFDATA_LOCK(ifp) IF_AFDATA_WLOCK(ifp) #define IF_AFDATA_UNLOCK(ifp) IF_AFDATA_WUNLOCK(ifp) #define IF_AFDATA_TRYLOCK(ifp) rw_tryenter((ifp)->if_afdata_lock, RW_WRITER) -#define IF_AFDATA_DESTROY(ifp) rw_destroy((ifp)->if_afdata_lock) #define IF_AFDATA_LOCK_ASSERT(ifp) \ KASSERT(rw_lock_held((ifp)->if_afdata_lock))
CVS commit: src/usr.bin/jot
Module Name:src Committed By: kamil Date: Mon Jan 4 23:32:45 UTC 2016 Modified Files: src/usr.bin/jot: jot.1 Log Message: Add HISTORY and AUTHORS to jot John A. Kunze requested to add himself as the author of jot on the FreeBSD bugzilla with the following text: Please re-instate my name (as "John A. Kunze") as AUTHOR of the jot, rs, and lam utilities. I wrote these in 1982, around or before the time that I worked with Jordan at UCB (he left to work at FreeBSD and later at Apple). Thank you! -- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196786 While there add a note that this tool first appeared in BSD 4.2. This information is based on the FreeBSD manual pages. Patch submitted by Michal Mazurek . Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/jot/jot.1 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/jot/jot.1 diff -u src/usr.bin/jot/jot.1:1.12 src/usr.bin/jot/jot.1:1.13 --- src/usr.bin/jot/jot.1:1.12 Sun Apr 8 22:00:39 2012 +++ src/usr.bin/jot/jot.1 Mon Jan 4 23:32:45 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: jot.1,v 1.12 2012/04/08 22:00:39 wiz Exp $ +.\" $NetBSD: jot.1,v 1.13 2016/01/04 23:32:45 kamil Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -201,3 +201,10 @@ prints all lines 80 characters or longer .Xr yes 1 , .Xr printf 3 , .Xr random 3 +.Sh HISTORY +The +.Nm +utility first appeared in +.Bx 4.2 . +.Sh AUTHORS +.An John A. Kunze
CVS commit: src/usr.bin/rs
Module Name:src Committed By: kamil Date: Mon Jan 4 23:55:36 UTC 2016 Modified Files: src/usr.bin/rs: rs.1 Log Message: Bump date for previous To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.bin/rs/rs.1 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/rs/rs.1 diff -u src/usr.bin/rs/rs.1:1.9 src/usr.bin/rs/rs.1:1.10 --- src/usr.bin/rs/rs.1:1.9 Mon Jan 4 23:30:57 2016 +++ src/usr.bin/rs/rs.1 Mon Jan 4 23:55:36 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: rs.1,v 1.9 2016/01/04 23:30:57 kamil Exp $ +.\" $NetBSD: rs.1,v 1.10 2016/01/04 23:55:36 kamil Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)rs.1 8.2 (Berkeley) 12/30/93 .\" -.Dd December 18, 2001 +.Dd January 1, 2016 .Dt RS 1 .Os .Sh NAME
CVS commit: src/tests/lib/libusbhid
Module Name:src Committed By: jakllsch Date: Mon Jan 4 22:07:17 UTC 2016 Modified Files: src/tests/lib/libusbhid: t_usbhid.c Added Files: src/tests/lib/libusbhid: hid_test_data.c Log Message: Move libusbhid tests' Report Descriptors and Report Data to seperate file, so future tests of the kernel HID functions can use them too. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tests/lib/libusbhid/hid_test_data.c cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libusbhid/t_usbhid.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libusbhid/t_usbhid.c diff -u src/tests/lib/libusbhid/t_usbhid.c:1.8 src/tests/lib/libusbhid/t_usbhid.c:1.9 --- src/tests/lib/libusbhid/t_usbhid.c:1.8 Sun Jan 3 15:26:39 2016 +++ src/tests/lib/libusbhid/t_usbhid.c Mon Jan 4 22:07:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_usbhid.c,v 1.8 2016/01/03 15:26:39 jakllsch Exp $ */ +/* $NetBSD: t_usbhid.c,v 1.9 2016/01/04 22:07:16 jakllsch Exp $ */ /* * Copyright (c) 2016 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_usbhid.c,v 1.8 2016/01/03 15:26:39 jakllsch Exp $"); +__RCSID("$NetBSD: t_usbhid.c,v 1.9 2016/01/04 22:07:16 jakllsch Exp $"); #include @@ -55,111 +55,7 @@ ATF_TC(check_hid_set_data); #define MYx_ATF_CHECK_EQ(d, v) \ ATF_CHECK_EQ_MSG(d, v, "== 0x%x", (d)) -static const uint8_t range_test_report_descriptor[] = { - 0x0b, 0x03, 0x00, 0x00, 0xff, // Usage - 0x75, 0x20, // Report Size - 0x95, 0x01, // Report Count - 0x17, 0x00, 0x00, 0x00, 0x80, // Logical Minimum - 0x27, 0xff, 0xff, 0xff, 0x7f, // Logical Maximum - 0x37, 0x00, 0x00, 0x00, 0x80, // Physical Minimum - 0x47, 0xff, 0xff, 0xff, 0x7f, // Physical Maximum - 0x81, 0x00, // Input - - 0x0b, 0x02, 0x00, 0x00, 0xff, // Usage - 0x75, 0x10, // Report Size - 0x95, 0x01, // Report Count - 0x16, 0x00, 0x80, // Logical Minimum - 0x26, 0xff, 0x7f, // Logical Maximum - 0x36, 0x00, 0x80, // Physical Minimum - 0x46, 0xff, 0x7f, // Physical Maximum - 0x81, 0x00, // Input - - 0x0b, 0x01, 0x00, 0x00, 0xff, // Usage - 0x75, 0x08, // Report Size - 0x95, 0x01, // Report Count - 0x15, 0x80, // Logical Minimum - 0x25, 0x7f, // Logical Maximum - 0x35, 0x80, // Physical Minimum - 0x45, 0x7f, // Physical Maximum - 0x81, 0x00, // Input -}; - -static const uint8_t range_test_minimum_report[7] = { - 0x00, 0x00, 0x00, 0x80, - 0x00, 0x80, - 0x80, -}; - -static const uint8_t range_test_negative_one_report[7] = { - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, - 0xff, -}; - -static const uint8_t range_test_positive_one_report[7] = { - 0x01, 0x00, 0x00, 0x00, - 0x01, 0x00, - 0x01, -}; - -static const uint8_t range_test_maximum_report[7] = { - 0xff, 0xff, 0xff, 0x7f, - 0xff, 0x7f, - 0x7f, -}; - -static const uint8_t unsigned_range_test_report_descriptor[] = { - 0x0b, 0x13, 0x00, 0x00, 0xff, // Usage - 0x75, 0x20, // Report Size - 0x95, 0x01, // Report Count - 0x17, 0x00, 0x00, 0x00, 0x00, // Logical Minimum - 0x27, 0xff, 0xff, 0xff, 0xff, // Logical Maximum - 0x37, 0x00, 0x00, 0x00, 0x00, // Physical Minimum - 0x47, 0xff, 0xff, 0xff, 0xff, // Physical Maximum - 0x81, 0x00, // Input - - 0x0b, 0x12, 0x00, 0x00, 0xff, // Usage - 0x75, 0x10, // Report Size - 0x95, 0x01, // Report Count - 0x16, 0x00, 0x00, // Logical Minimum - 0x26, 0xff, 0xff, // Logical Maximum - 0x36, 0x00, 0x00, // Physical Minimum - 0x46, 0xff, 0xff, // Physical Maximum - 0x81, 0x00, // Input - - 0x0b, 0x11, 0x00, 0x00, 0xff, // Usage - 0x75, 0x08, // Report Size - 0x95, 0x01, // Report Count - 0x15, 0x00, // Logical Minimum - 0x25, 0xff, // Logical Maximum - 0x35, 0x00, // Physical Minimum - 0x45, 0xff, // Physical Maximum - 0x81, 0x00, // Input -}; - -static const uint8_t unsigned_range_test_minimum_report[7] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, - 0x00, -}; - -static const uint8_t unsigned_range_test_positive_one_report[7] = { - 0x01, 0x00, 0x00, 0x00, - 0x01, 0x00, - 0x01, -}; - -static const uint8_t unsigned_range_test_negative_one_report[7] = { - 0xfe, 0xff, 0xff, 0xff, - 0xfe, 0xff, - 0xfe, -}; - -static const uint8_t unsigned_range_test_maximum_report[7] = { - 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, - 0xff, -}; +#include "hid_test_data.c" ATF_TC_HEAD(check_hid_usage, tc) { Added files: Index: src/tests/lib/libusbhid/hid_test_data.c diff -u /dev/null src/tests/lib/libusbhid/hid_test_data.c:1.1 --- /dev/null Mon Jan 4 22:07:17 2016 +++ src/tests/lib/libusbhid/hid_test_data.c Mon Jan 4 22:07:16 2016 @@ -0,0 +1,134 @@ +/* $NetBSD: hid_test_data.c,v 1.1 2016/01/04 22:07:16 jakllsch Exp $ */ + +/* + * Copyright (c) 2016 Jonathan A. Kollasch + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright +
CVS commit: src/usr.bin/rs
Module Name:src Committed By: kamil Date: Mon Jan 4 23:30:57 UTC 2016 Modified Files: src/usr.bin/rs: rs.1 Log Message: Add HISTORY and AUTHORS to rs John A. Kunze requested to add himself as the authord of rs on the FreeBSD bugzilla with the following text: Please re-instate my name (as "John A. Kunze") as AUTHOR of the jot, rs, and lam utilities. I wrote these in 1982, around or before the time that I worked with Jordan at UCB (he left to work at FreeBSD and later at Apple). Thank you! -- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196786 While there add a note that this tool first appeared in BSD 4.2. This information is based on the FreeBSD manual pages. Patch submitted by Michal Mazurek . Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/rs/rs.1 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/rs/rs.1 diff -u src/usr.bin/rs/rs.1:1.8 src/usr.bin/rs/rs.1:1.9 --- src/usr.bin/rs/rs.1:1.8 Sun Sep 11 23:22:03 2005 +++ src/usr.bin/rs/rs.1 Mon Jan 4 23:30:57 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: rs.1,v 1.8 2005/09/11 23:22:03 wiz Exp $ +.\" $NetBSD: rs.1,v 1.9 2016/01/04 23:30:57 kamil Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -207,6 +207,13 @@ Finally, to sort a database by the first .Xr pr 1 , .Xr sort 1 , .Xr vi 1 +.Sh HISTORY +The +.Nm +utility first appeared in +.Bx 4.2 . +.Sh AUTHORS +.An John A. Kunze .Sh BUGS Handles only two dimensional arrays. .Pp
CVS commit: src/usr.bin/lam
Module Name:src Committed By: kamil Date: Mon Jan 4 23:31:44 UTC 2016 Modified Files: src/usr.bin/lam: lam.1 Log Message: Add HISTORY and AUTHORS to lam John A. Kunze requested to add himself as the authord of rs on the FreeBSD bugzilla with the following text: Please re-instate my name (as "John A. Kunze") as AUTHOR of the jot, rs, and lam utilities. I wrote these in 1982, around or before the time that I worked with Jordan at UCB (he left to work at FreeBSD and later at Apple). Thank you! -- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196786 While there add a note that this tool first appeared in BSD 4.2. This information is based on the FreeBSD manual pages. Patch submitted by Michal Mazurek . Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/lam/lam.1 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/lam/lam.1 diff -u src/usr.bin/lam/lam.1:1.8 src/usr.bin/lam/lam.1:1.9 --- src/usr.bin/lam/lam.1:1.8 Thu Dec 13 21:09:34 2012 +++ src/usr.bin/lam/lam.1 Mon Jan 4 23:31:44 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: lam.1,v 1.8 2012/12/13 21:09:34 pgoyette Exp $ +.\" $NetBSD: lam.1,v 1.9 2016/01/04 23:31:44 kamil Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -126,3 +126,10 @@ lam \-t @ letter changes .Xr join 1 , .Xr pr 1 , .Xr printf 3 +.Sh HISTORY +The +.Nm +utility first appeared in +.Bx 4.2 . +.Sh AUTHORS +.An John A. Kunze
CVS commit: src/usr.bin/jot
Module Name:src Committed By: kamil Date: Mon Jan 4 23:56:22 UTC 2016 Modified Files: src/usr.bin/jot: jot.1 Log Message: Bump date for previous To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/jot/jot.1 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/jot/jot.1 diff -u src/usr.bin/jot/jot.1:1.13 src/usr.bin/jot/jot.1:1.14 --- src/usr.bin/jot/jot.1:1.13 Mon Jan 4 23:32:45 2016 +++ src/usr.bin/jot/jot.1 Mon Jan 4 23:56:22 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: jot.1,v 1.13 2016/01/04 23:32:45 kamil Exp $ +.\" $NetBSD: jot.1,v 1.14 2016/01/04 23:56:22 kamil Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)jot.1 8.1 (Berkeley) 6/6/93 .\" -.Dd January 5, 2010 +.Dd January 5, 2016 .Dt JOT 1 .Os .Sh NAME
CVS commit: src/usr.bin/lam
Module Name:src Committed By: kamil Date: Mon Jan 4 23:57:23 UTC 2016 Modified Files: src/usr.bin/lam: lam.1 Log Message: Bump date for previous To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.bin/lam/lam.1 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/lam/lam.1 diff -u src/usr.bin/lam/lam.1:1.9 src/usr.bin/lam/lam.1:1.10 --- src/usr.bin/lam/lam.1:1.9 Mon Jan 4 23:31:44 2016 +++ src/usr.bin/lam/lam.1 Mon Jan 4 23:57:23 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: lam.1,v 1.9 2016/01/04 23:31:44 kamil Exp $ +.\" $NetBSD: lam.1,v 1.10 2016/01/04 23:57:23 kamil Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)lam.1 8.1 (Berkeley) 6/6/93 .\" -.Dd December 1, 2001 +.Dd January 5, 2016 .Dt LAM 1 .Os .Sh NAME
CVS commit: src/external/public-domain/xz/include
Module Name:src Committed By: christos Date: Tue Jan 5 02:44:57 UTC 2016 Modified Files: src/external/public-domain/xz/include: config.h Log Message: fix lint build To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/public-domain/xz/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/public-domain/xz/include/config.h diff -u src/external/public-domain/xz/include/config.h:1.6 src/external/public-domain/xz/include/config.h:1.7 --- src/external/public-domain/xz/include/config.h:1.6 Sat Apr 18 13:00:09 2015 +++ src/external/public-domain/xz/include/config.h Mon Jan 4 21:44:57 2016 @@ -146,7 +146,7 @@ #define HAVE_ICONV 1 /* Define to 1 if you have the header file. */ -#if defined(__i386__) || defined(__x86_64__) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(__lint__) #define HAVE_IMMINTRIN_H 1 #endif
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: khorben Date: Tue Jan 5 00:41:30 UTC 2016 Modified Files: src/usr.sbin/syslogd: syslog.conf.5 Log Message: Typo To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/syslogd/syslog.conf.5 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/syslogd/syslog.conf.5 diff -u src/usr.sbin/syslogd/syslog.conf.5:1.21 src/usr.sbin/syslogd/syslog.conf.5:1.22 --- src/usr.sbin/syslogd/syslog.conf.5:1.21 Sun Nov 10 00:13:50 2013 +++ src/usr.sbin/syslogd/syslog.conf.5 Tue Jan 5 00:41:30 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: syslog.conf.5,v 1.21 2013/11/10 00:13:50 wiz Exp $ +.\" $NetBSD: syslog.conf.5,v 1.22 2016/01/05 00:41:30 khorben Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -297,7 +297,7 @@ To ensure that kernel messages are writt calls .Xr fsync 2 after writing messages from the kernel. -Other messages are not synced explcitly. +Other messages are not synced explicitly. You may disable syncing of files specified to receive kernel messages by prefixing the pathname with a minus sign .Ql - .
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: christos Date: Tue Jan 5 03:40:41 UTC 2016 Modified Files: src/distrib/sets/lists/comp: mi Log Message: add missing lint library To generate a diff of this commit: cvs rdiff -u -r1.2010 -r1.2011 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2010 src/distrib/sets/lists/comp/mi:1.2011 --- src/distrib/sets/lists/comp/mi:1.2010 Tue Dec 29 12:54:43 2015 +++ src/distrib/sets/lists/comp/mi Mon Jan 4 22:40:41 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2010 2015/12/29 17:54:43 christos Exp $ +# $NetBSD: mi,v 1.2011 2016/01/05 03:40:41 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -3722,6 +3722,7 @@ ./usr/libdata/lint/llib-lwrap.ln comp-c-lintlib lint ./usr/libdata/lint/llib-ly.ln comp-c-lintlib lint ./usr/libdata/lint/llib-lz.ln comp-c-lintlib lint +./usr/libdata/lint/llib-llzma.ln comp-c-lintlib lint ./usr/libexec/cc1comp-c-bin gcccmds ./usr/libexec/cc1objcomp-objc-bin gcccmds ./usr/libexec/cc1pluscomp-cxx-bin gcccmds
CVS commit: src/sys/arch/m68k/include
Module Name:src Committed By: ozaki-r Date: Tue Jan 5 00:47:08 UTC 2016 Modified Files: src/sys/arch/m68k/include: fenv.h Log Message: Fix #endif; it should be after __END_DECLS This unbreaks the build of sun2. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/m68k/include/fenv.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/m68k/include/fenv.h diff -u src/sys/arch/m68k/include/fenv.h:1.3 src/sys/arch/m68k/include/fenv.h:1.4 --- src/sys/arch/m68k/include/fenv.h:1.3 Tue Dec 29 16:02:37 2015 +++ src/sys/arch/m68k/include/fenv.h Tue Jan 5 00:47:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.3 2015/12/29 16:02:37 christos Exp $ */ +/* $NetBSD: fenv.h,v 1.4 2016/01/05 00:47:08 ozaki-r Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -301,8 +301,8 @@ fegetexcept(void) #endif /* _NETBSD_SOURCE || _GNU_SOURCE */ -#endif /* !__m68010__ && !__mcoldfire__ */ - __END_DECLS +#endif /* !__m68010__ && !__mcoldfire__ */ + #endif /* _M68K_FENV_H_ */
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: mlelstv Date: Mon Jan 4 13:15:17 UTC 2016 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: prevent unconfigure/detach while background threads are running. To generate a diff of this commit: cvs rdiff -u -r1.336 -r1.337 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.336 src/sys/dev/raidframe/rf_netbsdkintf.c:1.337 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.336 Mon Jan 4 11:12:40 2016 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Mon Jan 4 13:15:17 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.336 2016/01/04 11:12:40 mlelstv Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.337 2016/01/04 13:15:17 mlelstv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.336 2016/01/04 11:12:40 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.337 2016/01/04 13:15:17 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -967,7 +967,10 @@ raid_detach_unlocked(struct raid_softc * raidPtr = >sc_r; - if (DK_BUSY(dksc, 0)) + if (DK_BUSY(dksc, 0) || + raidPtr->recon_in_progress != 0 || + raidPtr->parity_rewrite_in_progress != 0 || + raidPtr->copyback_in_progress != 0) return EBUSY; if ((rs->sc_flags & RAIDF_INITED) == 0) @@ -1180,7 +1183,10 @@ raidioctl(dev_t dev, u_long cmd, void *d if ((error = raidlock(rs)) != 0) return (error); - if (DK_BUSY(dksc, pmask)) + if (DK_BUSY(dksc, pmask) || + raidPtr->recon_in_progress != 0 || + raidPtr->parity_rewrite_in_progress != 0 || + raidPtr->copyback_in_progress != 0) retcode = EBUSY; else { /* detach and free on close */
CVS commit: src/sys/arch/amiga/stand/bootblock/boot
Module Name:src Committed By: phx Date: Mon Jan 4 14:10:15 UTC 2016 Modified Files: src/sys/arch/amiga/stand/bootblock/boot: amigatypes.h main.c Log Message: Make the -p option work, like with loadbsd. Otherwise the kernel could load into a low-priority 512MB Z3 RAM segment. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h cvs rdiff -u -r1.29 -r1.30 src/sys/arch/amiga/stand/bootblock/boot/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h diff -u src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h:1.7 src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h:1.8 --- src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h:1.7 Mon Apr 28 20:23:13 2008 +++ src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h Mon Jan 4 14:10:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: amigatypes.h,v 1.7 2008/04/28 20:23:13 martin Exp $ */ +/* $NetBSD: amigatypes.h,v 1.8 2016/01/04 14:10:15 phx Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ struct Library { struct MemHead { struct MemHead *next; u_int8_t Dmy1[ 9- 4]; - u_int8_t Pri; + int8_t Pri; u_int8_t Dmy2[ 14- 10]; u_int16_t Attribs; u_int32_t First, Lower, Upper, Free; Index: src/sys/arch/amiga/stand/bootblock/boot/main.c diff -u src/sys/arch/amiga/stand/bootblock/boot/main.c:1.29 src/sys/arch/amiga/stand/bootblock/boot/main.c:1.30 --- src/sys/arch/amiga/stand/bootblock/boot/main.c:1.29 Sat Mar 29 12:49:15 2014 +++ src/sys/arch/amiga/stand/bootblock/boot/main.c Mon Jan 4 14:10:15 2016 @@ -1,5 +1,5 @@ /* - * $NetBSD: main.c,v 1.29 2014/03/29 12:49:15 mlelstv Exp $ + * $NetBSD: main.c,v 1.30 2016/01/04 14:10:15 phx Exp $ * * * Copyright (c) 1996,1999 Ignatios Souvatzis @@ -122,6 +122,7 @@ pain(void *aio, void *cons) struct MemHead *mh; u_int32_t from, size, vfrom, vsize; int contflag, mapped1to1; + int8_t mempri; int ncd, nseg; char c; @@ -200,7 +201,7 @@ again: (get_number() & 3) << 1; break; case 'p': /* Select fastmem by priority */ - p_flag++; + p_flag = 1; break; case 'q': boothowto |= AB_QUIET; @@ -274,6 +275,7 @@ again: vfrom = mh->Lower & -__PGSZ; vsize = (mh->Upper & -__PGSZ) - vfrom; contflag = mapped1to1 = 0; + mempri = -128; do { size = vsize; @@ -318,9 +320,12 @@ again: size += from; cmemsz = size; from = 0; - } else if ((fmemsz < size) && mapped1to1) { + } else if (mapped1to1 && ((!p_flag && fmemsz < size) || + (p_flag && (mempri < mh->Pri || + (mempri == mh->Pri && fmemsz < size) { fmem = from; fmemsz = size; + mempri = mh->Pri; } memseg[nseg].ms_start = from;
CVS commit: src/bin/sh
Module Name:src Committed By: christos Date: Mon Jan 4 13:57:15 UTC 2016 Modified Files: src/bin/sh: redir.c Log Message: PR/50619: Fix reversed test. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/bin/sh/redir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/redir.c diff -u src/bin/sh/redir.c:1.38 src/bin/sh/redir.c:1.39 --- src/bin/sh/redir.c:1.38 Sun Jan 3 22:00:24 2016 +++ src/bin/sh/redir.c Mon Jan 4 08:57:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: redir.c,v 1.38 2016/01/04 03:00:24 christos Exp $ */ +/* $NetBSD: redir.c,v 1.39 2016/01/04 13:57:15 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)redir.c 8.2 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: redir.c,v 1.38 2016/01/04 03:00:24 christos Exp $"); +__RCSID("$NetBSD: redir.c,v 1.39 2016/01/04 13:57:15 christos Exp $"); #endif #endif /* not lint */ @@ -231,7 +231,7 @@ openredirect(union node *redir, char mem memory[fd] = 1; else copyfd(redir->ndup.dupfd, fd, 1, -(flags & REDIR_PUSH) == 0); +(flags & REDIR_PUSH) != 0); } INTON; return;
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Jan 5 06:05:11 UTC 2016 Modified Files: src/sys/dev/usb [nick-nhusb]: usb_mem.c Log Message: Fix usb_block_allocmem locking To generate a diff of this commit: cvs rdiff -u -r1.65.2.11 -r1.65.2.12 src/sys/dev/usb/usb_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/usb/usb_mem.c diff -u src/sys/dev/usb/usb_mem.c:1.65.2.11 src/sys/dev/usb/usb_mem.c:1.65.2.12 --- src/sys/dev/usb/usb_mem.c:1.65.2.11 Tue Nov 10 13:41:49 2015 +++ src/sys/dev/usb/usb_mem.c Tue Jan 5 06:05:11 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_mem.c,v 1.65.2.11 2015/11/10 13:41:49 skrll Exp $ */ +/* $NetBSD: usb_mem.c,v 1.65.2.12 2016/01/05 06:05:11 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.65.2.11 2015/11/10 13:41:49 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.65.2.12 2016/01/05 06:05:11 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -140,12 +140,14 @@ usb_block_allocmem(bus_dma_tag_t tag, si mutex_exit(_blk_lock); b = kmem_zalloc(sizeof(*b), KM_SLEEP); - if (b == NULL) - return USBD_NOMEM; + if (b == NULL) { + goto fail; + } b->tag = tag; b->size = size; b->align = align; + free: if (!multiseg) /* Caller wants one segment */ @@ -156,7 +158,7 @@ usb_block_allocmem(bus_dma_tag_t tag, si b->segs = kmem_alloc(b->nsegs * sizeof(*b->segs), KM_SLEEP); if (b->segs == NULL) { kmem_free(b, sizeof(*b)); - return USBD_NOMEM; + goto fail; } b->nsegs_alloc = b->nsegs; @@ -198,6 +200,9 @@ usb_block_allocmem(bus_dma_tag_t tag, si free0: kmem_free(b->segs, b->nsegs_alloc * sizeof(*b->segs)); kmem_free(b, sizeof(*b)); + fail: + mutex_enter(_blk_lock); + return USBD_NOMEM; }
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Jan 5 05:53:38 UTC 2016 Modified Files: src/sys/dev/usb [nick-nhusb]: ehci.c Log Message: Don't leak sqtds in ehci_free_sqtds To generate a diff of this commit: cvs rdiff -u -r1.234.2.75 -r1.234.2.76 src/sys/dev/usb/ehci.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/ehci.c diff -u src/sys/dev/usb/ehci.c:1.234.2.75 src/sys/dev/usb/ehci.c:1.234.2.76 --- src/sys/dev/usb/ehci.c:1.234.2.75 Sun Jan 3 08:30:37 2016 +++ src/sys/dev/usb/ehci.c Tue Jan 5 05:53:38 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.234.2.75 2016/01/03 08:30:37 skrll Exp $ */ +/* $NetBSD: ehci.c,v 1.234.2.76 2016/01/05 05:53:38 skrll Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.75 2016/01/03 08:30:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.76 2016/01/05 05:53:38 skrll Exp $"); #include "ohci.h" #include "uhci.h" @@ -2961,7 +2961,7 @@ ehci_free_sqtds(ehci_softc_t *sc, struct break; sqtd->nextqtd = sc->sc_freeqtds; - sc->sc_freeqtds = sqtd->nextqtd; + sc->sc_freeqtds = sqtd; } mutex_exit(>sc_lock); }
CVS commit: src/sys/netinet
Module Name:src Committed By: ozaki-r Date: Tue Jan 5 05:37:06 UTC 2016 Modified Files: src/sys/netinet: if_arp.c Log Message: Make revarprequest static To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/sys/netinet/if_arp.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/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.198 src/sys/netinet/if_arp.c:1.199 --- src/sys/netinet/if_arp.c:1.198 Thu Dec 17 02:38:33 2015 +++ src/sys/netinet/if_arp.c Tue Jan 5 05:37:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.198 2015/12/17 02:38:33 ozaki-r Exp $ */ +/* $NetBSD: if_arp.c,v 1.199 2016/01/05 05:37:06 ozaki-r Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.198 2015/12/17 02:38:33 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.199 2016/01/05 05:37:06 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1973,7 +1973,7 @@ out: * Send a RARP request for the ip address of the specified interface. * The request should be RFC 903-compliant. */ -void +static void revarprequest(struct ifnet *ifp) { struct sockaddr sa;
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Jan 5 06:09:26 UTC 2016 Modified Files: src/sys/dev/usb [nick-nhusb]: usb_mem.c Log Message: Remove stray label from previous To generate a diff of this commit: cvs rdiff -u -r1.65.2.12 -r1.65.2.13 src/sys/dev/usb/usb_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/usb/usb_mem.c diff -u src/sys/dev/usb/usb_mem.c:1.65.2.12 src/sys/dev/usb/usb_mem.c:1.65.2.13 --- src/sys/dev/usb/usb_mem.c:1.65.2.12 Tue Jan 5 06:05:11 2016 +++ src/sys/dev/usb/usb_mem.c Tue Jan 5 06:09:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_mem.c,v 1.65.2.12 2016/01/05 06:05:11 skrll Exp $ */ +/* $NetBSD: usb_mem.c,v 1.65.2.13 2016/01/05 06:09:26 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.65.2.12 2016/01/05 06:05:11 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.65.2.13 2016/01/05 06:09:26 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -147,7 +147,6 @@ usb_block_allocmem(bus_dma_tag_t tag, si b->tag = tag; b->size = size; b->align = align; - free: if (!multiseg) /* Caller wants one segment */
CVS commit: src/sys/dev
Module Name:src Committed By: hannken Date: Mon Jan 4 16:24:52 UTC 2016 Modified Files: src/sys/dev: md.c Log Message: Notify disk subsystem of the current geometry. Ok: Michael van Elst To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/dev/md.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/md.c diff -u src/sys/dev/md.c:1.75 src/sys/dev/md.c:1.76 --- src/sys/dev/md.c:1.75 Thu Aug 20 14:40:17 2015 +++ src/sys/dev/md.c Mon Jan 4 16:24:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.75 2015/08/20 14:40:17 christos Exp $ */ +/* $NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.75 2015/08/20 14:40:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.76 2016/01/04 16:24:52 hannken Exp $"); #ifdef _KERNEL_OPT #include "opt_md.h" @@ -528,6 +528,7 @@ mdioctl(dev_t dev, u_long cmd, void *dat static void md_set_disklabel(struct md_softc *sc) { + struct disk_geom *dg = >sc_dkdev.dk_geom; struct disklabel *lp = sc->sc_dkdev.dk_label; struct partition *pp; @@ -567,6 +568,16 @@ md_set_disklabel(struct md_softc *sc) lp->d_magic = DISKMAGIC; lp->d_magic2 = DISKMAGIC; lp->d_checksum = dkcksum(lp); + + memset(dg, 0, sizeof(*dg)); + + dg->dg_secsize = lp->d_secsize; + dg->dg_secperunit = lp->d_secperunit; + dg->dg_nsectors = lp->d_nsectors; + dg->dg_ntracks = lp->d_ntracks = 64;; + dg->dg_ncylinders = lp->d_ncylinders; + + disk_set_info(sc->sc_dev, >sc_dkdev, NULL); } /*
CVS commit: src/sys/arch/i386/stand/bootxx
Module Name:src Committed By: christos Date: Mon Jan 4 18:17:31 UTC 2016 Modified Files: src/sys/arch/i386/stand/bootxx: pbr.S Log Message: revert, this has to do with the bootloader protocol version and should stay the same until there is a reason for it to change. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/stand/bootxx/pbr.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/stand/bootxx/pbr.S diff -u src/sys/arch/i386/stand/bootxx/pbr.S:1.21 src/sys/arch/i386/stand/bootxx/pbr.S:1.22 --- src/sys/arch/i386/stand/bootxx/pbr.S:1.21 Sun Jan 3 15:59:47 2016 +++ src/sys/arch/i386/stand/bootxx/pbr.S Mon Jan 4 13:17:31 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pbr.S,v 1.21 2016/01/03 20:59:47 christos Exp $ */ +/* $NetBSD: pbr.S,v 1.22 2016/01/04 18:17:31 christos Exp $ */ /*- * Copyright (c) 2003,2004 The NetBSD Foundation, Inc. @@ -115,7 +115,7 @@ ENTRY(start) */ jmp start0 nop - .ascii "NetBSD70" /* oemname (8 bytes) */ + .ascii "NetBSD60" /* oemname (8 bytes) */ . = start + MBR_BPB_OFFSET /* move to start of BPB */ /* (ensures oemname doesn't overflow) */