CVS commit: src/usr.bin/unzip
Module Name:src Committed By: wiz Date: Thu Jul 14 06:35:30 UTC 2011 Modified Files: src/usr.bin/unzip: unzip.c Log Message: Fix a logic error: when renaming a file, strip trailing \n from file name. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/unzip/unzip.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/unzip/unzip.c diff -u src/usr.bin/unzip/unzip.c:1.14 src/usr.bin/unzip/unzip.c:1.15 --- src/usr.bin/unzip/unzip.c:1.14 Mon May 10 15:45:22 2010 +++ src/usr.bin/unzip/unzip.c Thu Jul 14 06:35:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: unzip.c,v 1.14 2010/05/10 15:45:22 joerg Exp $ */ +/* $NetBSD: unzip.c,v 1.15 2011/07/14 06:35:30 wiz Exp $ */ /*- * Copyright (c) 2009, 2010 Joerg Sonnenberger @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: unzip.c,v 1.14 2010/05/10 15:45:22 joerg Exp $"); +__RCSID("$NetBSD: unzip.c,v 1.15 2011/07/14 06:35:30 wiz Exp $"); #include #include @@ -449,7 +449,7 @@ *path = NULL; alen = 0; len = getline(path, &alen, stdin); - if ((*path)[len - 1] != '\n') + if ((*path)[len - 1] == '\n') (*path)[len - 1] = '\0'; return 0; default:
CVS commit: src/tests/lib/libc/string
Module Name:src Committed By: jruoho Date: Thu Jul 14 05:46:04 UTC 2011 Modified Files: src/tests/lib/libc/string: t_memchr.c t_memcpy.c t_strcat.c Log Message: Add few simple test cases. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/string/t_memchr.c \ src/tests/lib/libc/string/t_strcat.c cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/string/t_memcpy.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/libc/string/t_memchr.c diff -u src/tests/lib/libc/string/t_memchr.c:1.1 src/tests/lib/libc/string/t_memchr.c:1.2 --- src/tests/lib/libc/string/t_memchr.c:1.1 Thu Jul 7 08:59:32 2011 +++ src/tests/lib/libc/string/t_memchr.c Thu Jul 14 05:46:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_memchr.c,v 1.1 2011/07/07 08:59:32 jruoho Exp $ */ +/* $NetBSD: t_memchr.c,v 1.2 2011/07/14 05:46:04 jruoho Exp $ */ /* * Written by J.T. Conklin @@ -14,7 +14,7 @@ ATF_TC(memchr_basic); ATF_TC_HEAD(memchr_basic, tc) { -atf_tc_set_md_var(tc, "descr", "Test memchr(3) results"); +atf_tc_set_md_var(tc, "descr", "Test memchr(3) results, #1"); } ATF_TC_BODY(memchr_basic, tc) @@ -128,10 +128,73 @@ } } +ATF_TC(memchr_simple); +ATF_TC_HEAD(memchr_simple, tc) +{ +atf_tc_set_md_var(tc, "descr", "Test memchr(3) results, #2"); +} + +ATF_TC_BODY(memchr_simple, tc) +{ + char buf[] = "abcdefg"; + short i = 7; + + ATF_CHECK(memchr(buf, 'a', 0) == NULL); + ATF_CHECK(memchr(buf, 'g', 0) == NULL); + ATF_CHECK(memchr(buf, 'x', 7) == NULL); + + ATF_CHECK(memchr("\0", 'x', 0) == NULL); + ATF_CHECK(memchr("\0", 'x', 1) == NULL); + + while (i <= 14) { + + ATF_CHECK(memchr(buf, 'a', i) == buf + 0); + ATF_CHECK(memchr(buf, 'b', i) == buf + 1); + ATF_CHECK(memchr(buf, 'c', i) == buf + 2); + ATF_CHECK(memchr(buf, 'd', i) == buf + 3); + ATF_CHECK(memchr(buf, 'e', i) == buf + 4); + ATF_CHECK(memchr(buf, 'f', i) == buf + 5); + ATF_CHECK(memchr(buf, 'g', i) == buf + 6); + + i *= 2; + } +} + +ATF_TC(memrchr_simple); +ATF_TC_HEAD(memrchr_simple, tc) +{ +atf_tc_set_md_var(tc, "descr", "Test memrchr(3) results"); +} + +ATF_TC_BODY(memrchr_simple, tc) +{ + char buf[] = "abcdabcd"; + short i = 8; + + ATF_CHECK(memrchr(buf, 'a', 0) == NULL); + ATF_CHECK(memrchr(buf, 'g', 0) == NULL); + ATF_CHECK(memrchr(buf, 'x', 8) == NULL); + + ATF_CHECK(memrchr("\0", 'x', 0) == NULL); + ATF_CHECK(memrchr("\0", 'x', 1) == NULL); + + while (i <= 16) { + + ATF_CHECK(memrchr(buf, 'a', i) == buf + 4); + ATF_CHECK(memrchr(buf, 'b', i) == buf + 5); + ATF_CHECK(memrchr(buf, 'c', i) == buf + 6); + ATF_CHECK(memrchr(buf, 'd', i) == buf + 7); + + i *= 2; + } +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, memchr_basic); + ATF_TP_ADD_TC(tp, memchr_simple); + ATF_TP_ADD_TC(tp, memrchr_simple); return atf_no_error(); } Index: src/tests/lib/libc/string/t_strcat.c diff -u src/tests/lib/libc/string/t_strcat.c:1.1 src/tests/lib/libc/string/t_strcat.c:1.2 --- src/tests/lib/libc/string/t_strcat.c:1.1 Thu Jul 7 08:59:32 2011 +++ src/tests/lib/libc/string/t_strcat.c Thu Jul 14 05:46:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strcat.c,v 1.1 2011/07/07 08:59:32 jruoho Exp $ */ +/* $NetBSD: t_strcat.c,v 1.2 2011/07/14 05:46:04 jruoho Exp $ */ /* * Written by J.T. Conklin @@ -123,10 +123,31 @@ } } +ATF_TC(strncat_simple); +ATF_TC_HEAD(strncat_simple, tc) +{ +atf_tc_set_md_var(tc, "descr", "Test strncat(3) results"); +} + +ATF_TC_BODY(strncat_simple, tc) +{ + char buf[100] = "abcdefg"; + + ATF_CHECK(strncat(buf, "xxx", 0) == buf); + ATF_CHECK(strcmp(buf, "abcdefg") == 0); + ATF_CHECK(strncat(buf, "xxx", 1) == buf); + ATF_CHECK(strcmp(buf, "abcdefgx") == 0); + ATF_CHECK(strncat(buf, "xxx", 2) == buf); + ATF_CHECK(strcmp(buf, "abcdefgxxx") == 0); + ATF_CHECK(strncat(buf, "\0", 1) == buf); + ATF_CHECK(strcmp(buf, "abcdefgxxx") == 0); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, strcat_basic); + ATF_TP_ADD_TC(tp, strncat_simple); return atf_no_error(); } Index: src/tests/lib/libc/string/t_memcpy.c diff -u src/tests/lib/libc/string/t_memcpy.c:1.3 src/tests/lib/libc/string/t_memcpy.c:1.4 --- src/tests/lib/libc/string/t_memcpy.c:1.3 Thu Jul 7 08:27:36 2011 +++ src/tests/lib/libc/string/t_memcpy.c Thu Jul 14 05:46:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_memcpy.c,v 1.3 2011/07/07 08:27:36 jruoho Exp $ */ +/* $NetBSD: t_memcpy.c,v 1.4 2011/07/14 05:46:04 jruoho Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -99,10 +99,37 @@ ATF_REQUIRE_EQ(strcmp(result, goodResult), 0); } +ATF_TC(memccpy_simple); +ATF_TC_HEAD(memccpy_simple, tc) +{ +atf_tc_set_md_var(tc, "descr", "Test memccpy(3) results"); +} + +ATF_TC_BODY(memccpy_simple, tc) +{ + char buf[100]; + char c = ' '; + + (void)memset(buf, c, sizeof(buf)); + + ATF_CHECK(memccpy(buf, "foo bar", c, sizeof(buf)) != NULL); + ATF_CHECK(buf[4] == c); + + ATF_CHECK(memccpy(buf, "foo bar", '\0',
CVS commit: src/etc/etc.evbmips
Module Name:src Committed By: matt Date: Thu Jul 14 05:31:16 UTC 2011 Modified Files: src/etc/etc.evbmips: Makefile.inc Log Message: Don't build 64bit kernel for evbmips-el To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/etc/etc.evbmips/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/etc/etc.evbmips/Makefile.inc diff -u src/etc/etc.evbmips/Makefile.inc:1.14 src/etc/etc.evbmips/Makefile.inc:1.15 --- src/etc/etc.evbmips/Makefile.inc:1.14 Sun Jul 10 23:49:31 2011 +++ src/etc/etc.evbmips/Makefile.inc Thu Jul 14 05:31:16 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.14 2011/07/10 23:49:31 matt Exp $ +# $NetBSD: Makefile.inc,v 1.15 2011/07/14 05:31:16 matt Exp $ # # etc.evbmips/Makefile.inc -- evbmips-specific etc Makefile targets # @@ -12,7 +12,7 @@ KERNEL_SETS= ALCHEMY DBAU1500 DBAU1550 MALTA MTX-1 OMSAL400 BUILD_KERNELS= INSTALL_OMSAL400 INSTALL_MALTA -KERNEL_SETS+= P4032 P5064-64 P6032 +KERNEL_SETS+= P4032 P5064 P6032 .elif ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" KERNEL_SETS= MALTA32 MALTA64 XLSATX32 XLSATX64
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: jruoho Date: Thu Jul 14 04:59:14 UTC 2011 Modified Files: src/tests/lib/libc/sys: t_getcontext.c Log Message: Adjust. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_getcontext.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/libc/sys/t_getcontext.c diff -u src/tests/lib/libc/sys/t_getcontext.c:1.2 src/tests/lib/libc/sys/t_getcontext.c:1.3 --- src/tests/lib/libc/sys/t_getcontext.c:1.2 Thu Jul 7 07:27:49 2011 +++ src/tests/lib/libc/sys/t_getcontext.c Thu Jul 14 04:59:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_getcontext.c,v 1.2 2011/07/07 07:27:49 jruoho Exp $ */ +/* $NetBSD: t_getcontext.c,v 1.3 2011/07/14 04:59:14 jruoho Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_getcontext.c,v 1.2 2011/07/07 07:27:49 jruoho Exp $"); +__RCSID("$NetBSD: t_getcontext.c,v 1.3 2011/07/14 04:59:14 jruoho Exp $"); #include #include @@ -81,13 +81,6 @@ ATF_TC_BODY(setcontext_err, tc) { - ucontext_t uc; - - uc.uc_link = NULL; - uc.uc_flags = -1; - - errno = 0; - ATF_REQUIRE_ERRNO(EINVAL, setcontext(&uc) == -1); errno = 0; ATF_REQUIRE_ERRNO(EFAULT, setcontext((void *)-1) == -1);
CVS commit: src/sys/dev/dtv
Module Name:src Committed By: jmcneill Date: Thu Jul 14 01:37:09 UTC 2011 Modified Files: src/sys/dev/dtv: dtv_demux.c Log Message: sections can't be > 4KB To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/dtv/dtv_demux.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/dtv/dtv_demux.c diff -u src/sys/dev/dtv/dtv_demux.c:1.2 src/sys/dev/dtv/dtv_demux.c:1.3 --- src/sys/dev/dtv/dtv_demux.c:1.2 Wed Jul 13 22:50:24 2011 +++ src/sys/dev/dtv/dtv_demux.c Thu Jul 14 01:37:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dtv_demux.c,v 1.2 2011/07/13 22:50:24 jmcneill Exp $ */ +/* $NetBSD: dtv_demux.c,v 1.3 2011/07/14 01:37:09 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtv_demux.c,v 1.2 2011/07/13 22:50:24 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtv_demux.c,v 1.3 2011/07/14 01:37:09 jmcneill Exp $"); #include #include @@ -469,6 +469,13 @@ } sec->sec_length = section_length + 3; + + /* maximum section length is 4KB */ + if (sec->sec_length > sizeof(sec->sec_buf)) { + sec->sec_bytesused = sec->sec_length = 0; + goto done; + } + } /* If we have bytes pending and we see payload unit start, flush buf */
CVS commit: src
Module Name:src Committed By: joerg Date: Wed Jul 13 23:48:30 UTC 2011 Modified Files: src/external/bsd/llvm: Makefile.inc src/external/bsd/llvm/bin/clang: Makefile src/external/bsd/llvm/bin/llc: Makefile src/external/bsd/llvm/bin/llvm-mc: Makefile src/external/bsd/llvm/bin/tblgen: Makefile src/external/bsd/llvm/lib: Makefile src/external/bsd/llvm/lib/libLLVMARMCodeGen: Makefile src/external/bsd/llvm/lib/libLLVMCore: Makefile src/external/bsd/llvm/lib/libLLVMRuntimeDyld: Makefile src/external/bsd/llvm/lib/libLLVMipo: Makefile src/external/bsd/llvm/lib/libclangFrontend: Makefile Added Files: src/external/bsd/llvm/lib/libLLVMMipsAsmPrinter: Makefile src/tools/llvm-lib/libLLVMMipsAsmPrinter: Makefile src/tools/llvm-lib/libLLVMX86MCTargetDesc: Makefile Log Message: Update to LLVM/Clang r135100 to get past the type system rewrite. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/external/bsd/llvm/Makefile.inc cvs rdiff -u -r1.11 -r1.12 src/external/bsd/llvm/bin/clang/Makefile cvs rdiff -u -r1.7 -r1.8 src/external/bsd/llvm/bin/llc/Makefile cvs rdiff -u -r1.7 -r1.8 src/external/bsd/llvm/bin/llvm-mc/Makefile cvs rdiff -u -r1.5 -r1.6 src/external/bsd/llvm/bin/tblgen/Makefile cvs rdiff -u -r1.13 -r1.14 src/external/bsd/llvm/lib/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/llvm/lib/libLLVMARMCodeGen/Makefile cvs rdiff -u -r1.4 -r1.5 src/external/bsd/llvm/lib/libLLVMCore/Makefile cvs rdiff -u -r0 -r1.1 \ src/external/bsd/llvm/lib/libLLVMMipsAsmPrinter/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/llvm/lib/libLLVMRuntimeDyld/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/bsd/llvm/lib/libLLVMipo/Makefile cvs rdiff -u -r1.4 -r1.5 src/external/bsd/llvm/lib/libclangFrontend/Makefile cvs rdiff -u -r0 -r1.1 src/tools/llvm-lib/libLLVMMipsAsmPrinter/Makefile cvs rdiff -u -r0 -r1.1 src/tools/llvm-lib/libLLVMX86MCTargetDesc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/llvm/Makefile.inc diff -u src/external/bsd/llvm/Makefile.inc:1.15 src/external/bsd/llvm/Makefile.inc:1.16 --- src/external/bsd/llvm/Makefile.inc:1.15 Thu Jul 7 21:59:14 2011 +++ src/external/bsd/llvm/Makefile.inc Wed Jul 13 23:48:29 2011 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.15 2011/07/07 21:59:14 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.16 2011/07/13 23:48:29 joerg Exp $ .if !defined(LLVM_TOPLEVEL_MK) LLVM_TOPLEVEL_MK= .include -LLVM_REVISION= 134635 -CLANG_REVISION= 134635 +LLVM_REVISION= 135100 +CLANG_REVISION= 135100 LLVM_SRCDIR:= ${.PARSEDIR}/dist/llvm CLANG_SRCDIR:= ${.PARSEDIR}/dist/clang Index: src/external/bsd/llvm/bin/clang/Makefile diff -u src/external/bsd/llvm/bin/clang/Makefile:1.11 src/external/bsd/llvm/bin/clang/Makefile:1.12 --- src/external/bsd/llvm/bin/clang/Makefile:1.11 Thu Jul 7 21:59:14 2011 +++ src/external/bsd/llvm/bin/clang/Makefile Wed Jul 13 23:48:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2011/07/07 21:59:14 joerg Exp $ +# $NetBSD: Makefile,v 1.12 2011/07/13 23:48:29 joerg Exp $ PROG_CXX= clang NOMAN= yes @@ -45,12 +45,14 @@ ARMAsmPrinter \ MipsCodeGen \ MipsTargetInfo \ + MipsAsmPrinter \ PowerPCCodeGen \ PowerPCTargetInfo \ PowerPCAsmPrinter \ SparcCodeGen \ SparcTargetInfo \ X86CodeGen \ + X86MCTargetDesc \ X86TargetInfo \ X86Utils \ X86AsmParser \ Index: src/external/bsd/llvm/bin/llc/Makefile diff -u src/external/bsd/llvm/bin/llc/Makefile:1.7 src/external/bsd/llvm/bin/llc/Makefile:1.8 --- src/external/bsd/llvm/bin/llc/Makefile:1.7 Thu Jul 7 21:59:14 2011 +++ src/external/bsd/llvm/bin/llc/Makefile Wed Jul 13 23:48:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2011/07/07 21:59:14 joerg Exp $ +# $NetBSD: Makefile,v 1.8 2011/07/13 23:48:29 joerg Exp $ PROG_CXX= llc NOMAN= yes @@ -20,6 +20,7 @@ ARMAsmPrinter \ MipsCodeGen \ MipsTargetInfo \ + MipsAsmPrinter \ PowerPCCodeGen \ PowerPCTargetInfo \ PowerPCAsmPrinter \ Index: src/external/bsd/llvm/bin/llvm-mc/Makefile diff -u src/external/bsd/llvm/bin/llvm-mc/Makefile:1.7 src/external/bsd/llvm/bin/llvm-mc/Makefile:1.8 --- src/external/bsd/llvm/bin/llvm-mc/Makefile:1.7 Thu Jul 7 21:59:15 2011 +++ src/external/bsd/llvm/bin/llvm-mc/Makefile Wed Jul 13 23:48:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2011/07/07 21:59:15 joerg Exp $ +# $NetBSD: Makefile,v 1.8 2011/07/13 23:48:29 joerg Exp $ PROG_CXX= llvm-mc NOMAN= yes @@ -20,6 +20,7 @@ ARMDisassembler \ MipsCodeGen \ MipsTargetInfo \ + MipsAsmPrinter \ PowerPCCodeGen \ PowerPCTargetInfo \ PowerPCAsmPrinter \ Index: src/external/bsd/llvm/bin/tblgen/Makefile diff -u src/external/bsd/llvm/bin/tblgen/Makefile:1.5 src/external/bsd/llvm/bin/tblgen/Makefile:1.6 --- src/external/bsd/llvm/bin/tblgen/Makefile:1.5 Mon Jul 4 16:10:39 2011 +++ src/external/bsd/l
CVS commit: src/sys/dev/dtv
Module Name:src Committed By: jmcneill Date: Wed Jul 13 23:16:55 UTC 2011 Modified Files: src/sys/dev/dtv: dtvio_frontend.h Log Message: fe_sec_voltage_t: add SEC_VOLTAGE_OFF To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/dtv/dtvio_frontend.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dtv/dtvio_frontend.h diff -u src/sys/dev/dtv/dtvio_frontend.h:1.1 src/sys/dev/dtv/dtvio_frontend.h:1.2 --- src/sys/dev/dtv/dtvio_frontend.h:1.1 Sat Jul 9 14:46:56 2011 +++ src/sys/dev/dtv/dtvio_frontend.h Wed Jul 13 23:16:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dtvio_frontend.h,v 1.1 2011/07/09 14:46:56 jmcneill Exp $ */ +/* $NetBSD: dtvio_frontend.h,v 1.2 2011/07/13 23:16:55 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -256,6 +256,7 @@ typedef enum fe_sec_voltage { SEC_VOLTAGE_13, SEC_VOLTAGE_18, + SEC_VOLTAGE_OFF, } fe_sec_voltage_t; /* SEC continuous tone */
CVS commit: src/sys/arch/macppc
Module Name:src Committed By: macallan Date: Wed Jul 13 22:54:33 UTC 2011 Modified Files: src/sys/arch/macppc/conf: files.macppc src/sys/arch/macppc/macppc: machdep.c Added Files: src/sys/arch/macppc/macppc: static_edid.c static_edid.h Log Message: provide EDID blocks for hardware where we know the parameters but neither the firmware nor DDC provide any. So far there's only a parameter block for the PowerBook Pismo's built-in TFT, now Xorg works out of the box without config. The same parameter block will probably do the right thing on Lombard, PDQ and TFT-equipped Wallstreet PowerBooks. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/macppc/conf/files.macppc cvs rdiff -u -r1.160 -r1.161 src/sys/arch/macppc/macppc/machdep.c cvs rdiff -u -r0 -r1.1 src/sys/arch/macppc/macppc/static_edid.c \ src/sys/arch/macppc/macppc/static_edid.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/macppc/conf/files.macppc diff -u src/sys/arch/macppc/conf/files.macppc:1.97 src/sys/arch/macppc/conf/files.macppc:1.98 --- src/sys/arch/macppc/conf/files.macppc:1.97 Wed Jun 22 18:06:33 2011 +++ src/sys/arch/macppc/conf/files.macppc Wed Jul 13 22:54:33 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.macppc,v 1.97 2011/06/22 18:06:33 matt Exp $ +# $NetBSD: files.macppc,v 1.98 2011/07/13 22:54:33 macallan Exp $ # # macppc-specific configuration info @@ -18,6 +18,7 @@ file arch/powerpc/oea/ofwoea_machdep.c file arch/powerpc/oea/ofw_consinit.c file arch/macppc/macppc/machdep.c +file arch/macppc/macppc/static_edid.c file arch/powerpc/oea/ofw_rascons.c file arch/macppc/dev/dbdma.c Index: src/sys/arch/macppc/macppc/machdep.c diff -u src/sys/arch/macppc/macppc/machdep.c:1.160 src/sys/arch/macppc/macppc/machdep.c:1.161 --- src/sys/arch/macppc/macppc/machdep.c:1.160 Wed Jul 13 22:50:11 2011 +++ src/sys/arch/macppc/macppc/machdep.c Wed Jul 13 22:54:33 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.160 2011/07/13 22:50:11 macallan Exp $ */ +/* $NetBSD: machdep.c,v 1.161 2011/07/13 22:54:33 macallan Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.160 2011/07/13 22:50:11 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.161 2011/07/13 22:54:33 macallan Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -99,6 +99,8 @@ #include #include +#include + #include "ksyms.h" #include "pmu.h" #include "cuda.h" @@ -364,6 +366,8 @@ { const char *bl_rev_models[] = { "PowerBook4,3", "PowerBook6,3", "PowerBook6,5", NULL}; + const char *pismo[] = { + "PowerBook3,1", NULL}; int node; node = OF_finddevice("/"); @@ -371,6 +375,13 @@ if (of_compatible(node, bl_rev_models) != -1) { prop_dictionary_set_bool(dict, "backlight_level_reverted", 1); } + if (of_compatible(node, pismo) != -1) { + prop_data_t edid; + + edid = prop_data_create_data(edid_pismo, sizeof(edid_pismo)); + prop_dictionary_set(dict, "EDID", edid); + prop_object_release(edid); + } } static void Added files: Index: src/sys/arch/macppc/macppc/static_edid.c diff -u /dev/null src/sys/arch/macppc/macppc/static_edid.c:1.1 --- /dev/null Wed Jul 13 22:54:33 2011 +++ src/sys/arch/macppc/macppc/static_edid.c Wed Jul 13 22:54:33 2011 @@ -0,0 +1,57 @@ +/* $NetBSD: static_edid.c,v 1.1 2011/07/13 22:54:33 macallan Exp $ */ + +/*- + * Copyright (c) 2011 Michael Lorenz + * 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 + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: static_edid.c,v 1.1 2011/07/13 22:54:33 ma
CVS commit: src/sys/dev/dtv
Module Name:src Committed By: jmcneill Date: Wed Jul 13 22:51:10 UTC 2011 Modified Files: src/sys/dev/dtv: dtv_device.c Log Message: add missing mutex_destroy on detach To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/dtv/dtv_device.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/dtv/dtv_device.c diff -u src/sys/dev/dtv/dtv_device.c:1.5 src/sys/dev/dtv/dtv_device.c:1.6 --- src/sys/dev/dtv/dtv_device.c:1.5 Wed Jul 13 22:43:04 2011 +++ src/sys/dev/dtv/dtv_device.c Wed Jul 13 22:51:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dtv_device.c,v 1.5 2011/07/13 22:43:04 jmcneill Exp $ */ +/* $NetBSD: dtv_device.c,v 1.6 2011/07/13 22:51:10 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtv_device.c,v 1.5 2011/07/13 22:43:04 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtv_device.c,v 1.6 2011/07/13 22:51:10 jmcneill Exp $"); #include #include @@ -154,6 +154,7 @@ dtv_scatter_buf_destroy(&ds->ds_data); mutex_destroy(&sc->sc_demux_lock); + mutex_destroy(&sc->sc_lock); return 0; }
CVS commit: src/sys/dev/dtv
Module Name:src Committed By: jmcneill Date: Wed Jul 13 22:50:24 UTC 2011 Modified Files: src/sys/dev/dtv: dtv_demux.c Log Message: dtv_demux_write: make sure to unlock muted in all error paths To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/dtv/dtv_demux.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/dtv/dtv_demux.c diff -u src/sys/dev/dtv/dtv_demux.c:1.1 src/sys/dev/dtv/dtv_demux.c:1.2 --- src/sys/dev/dtv/dtv_demux.c:1.1 Wed Jul 13 22:43:04 2011 +++ src/sys/dev/dtv/dtv_demux.c Wed Jul 13 22:50:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dtv_demux.c,v 1.1 2011/07/13 22:43:04 jmcneill Exp $ */ +/* $NetBSD: dtv_demux.c,v 1.2 2011/07/13 22:50:24 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtv_demux.c,v 1.1 2011/07/13 22:43:04 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtv_demux.c,v 1.2 2011/07/13 22:50:24 jmcneill Exp $"); #include #include @@ -449,7 +449,7 @@ if (TS_HAS_PUSI(tspkt)) { if (brem < 16) - return 0; + goto done; section_length = ((p[1] & 0xf) << 8) | p[2]; @@ -477,7 +477,7 @@ avail = min(sec->sec_length - sec->sec_bytesused, brem); if (avail < 0) - return 0; + goto done; memcpy(&sec->sec_buf[sec->sec_bytesused], p, avail); sec->sec_bytesused += avail;
CVS commit: src/sys/arch/macppc/macppc
Module Name:src Committed By: macallan Date: Wed Jul 13 22:50:11 UTC 2011 Modified Files: src/sys/arch/macppc/macppc: machdep.c Log Message: follow genfb changes in backlight control To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sys/arch/macppc/macppc/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/macppc/macppc/machdep.c diff -u src/sys/arch/macppc/macppc/machdep.c:1.159 src/sys/arch/macppc/macppc/machdep.c:1.160 --- src/sys/arch/macppc/macppc/machdep.c:1.159 Thu Jul 7 01:26:16 2011 +++ src/sys/arch/macppc/macppc/machdep.c Wed Jul 13 22:50:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.159 2011/07/07 01:26:16 mrg Exp $ */ +/* $NetBSD: machdep.c,v 1.160 2011/07/13 22:50:11 macallan Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.159 2011/07/07 01:26:16 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.160 2011/07/13 22:50:11 macallan Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -104,18 +104,23 @@ #include "cuda.h" struct genfb_colormap_callback gfb_cb; -struct genfb_parameter_callback gpc; +struct genfb_parameter_callback gpc_backlight, gpc_brightness; /* - * this is bogus - we need to read the actual default from the PMU and then - * put it here + * OpenFirmware gives us no way to check the brightness level or the backlight + * state so we assume the backlight is on and about 4/5 up which seems + * reasonable for most laptops */ -int backlight_level = 200; +int backlight_state = 1; +int brightness_level = 200; static void of_set_palette(void *, int, int, int, int); static void add_model_specifics(prop_dictionary_t); -static void of_set_backlight(void *, int); -static int of_get_backlight(void *); +static int of_get_backlight(void *, int *); +static int of_set_backlight(void *, int); +static int of_get_brightness(void *, int *); +static int of_set_brightness(void *, int); +static int of_upd_brightness(void *, int); void initppc(u_int startkernel, u_int endkernel, char *args) @@ -264,7 +269,7 @@ copy_disp_props(device_t dev, int node, prop_dictionary_t dict) { uint32_t temp; - uint64_t cmap_cb, backlight_cb; + uint64_t cmap_cb, backlight_cb, brightness_cb; int have_backlight = 0; if (node != console_node) { @@ -336,19 +341,21 @@ have_backlight = 1; } if (have_backlight) { - gpc.gpc_cookie = (void *)console_instance; - gpc.gpc_set_parameter = of_set_backlight; - gpc.gpc_get_parameter = of_get_backlight; - backlight_cb = (uint64_t)(uintptr_t)&gpc; - prop_dictionary_set_uint64(dict, "backlight_callback", + gpc_backlight.gpc_cookie = (void *)console_instance; + gpc_backlight.gpc_set_parameter = of_set_backlight; + gpc_backlight.gpc_get_parameter = of_get_backlight; + gpc_backlight.gpc_upd_parameter = NULL; + backlight_cb = (uint64_t)&gpc_backlight; + prop_dictionary_set_uint64(dict, "backlight_callback", backlight_cb); - /* - * since we don't know how to read the backlight level without - * access to the PMU we just set it to the default defined - * above so the hotkeys work as expected - */ - OF_call_method_1("set-contrast", console_instance, 1, - backlight_level); + + gpc_brightness.gpc_cookie = (void *)console_instance; + gpc_brightness.gpc_set_parameter = of_set_brightness; + gpc_brightness.gpc_get_parameter = of_get_brightness; + gpc_brightness.gpc_upd_parameter = of_upd_brightness; + brightness_cb = (uint64_t)&gpc_brightness; + prop_dictionary_set_uint64(dict, "brightness_callback", + brightness_cb); } } @@ -374,25 +381,70 @@ OF_call_method_1("color!", ih, 4, r, g, b, index); } -static void -of_set_backlight(void *cookie, int level) +static int +of_get_backlight(void *cookie, int *state) +{ + if (backlight_state < 0) + return ENODEV; + *state = backlight_state; + return 0; +} + +static int +of_set_backlight(void *cookie, int state) { int ih = (int)cookie; - if (level < 0) level = 0; - if (level > 255) level = 255; - backlight_level = level; - OF_call_method_1("set-contrast", ih, 1, level); + KASSERT(state >= 0 && state <= 1); + + backlight_state = state; + if (state) + OF_call_method_1("backlight-on", ih, 0); + else + OF_call_method_1("backlight-off", ih, 0); + + return 0; /* XXX or use return value of OF_call_method_1? */ } static int -of_get_backlight(void *cookie) +of_get_brightness(void *cookie, int *level) { - /* - * we don't know how to read the backlight level from OF alone - we - * should read the default from the PMU and then just cache whatever - * we set last + * We don't know how to read the brightness level from OF alone - we + * should read the value from the PMU. Here, we just return whatever + * we set last (if any). */ - return backlight_level; + if (brightness_level < 0) + return ENODEV;
CVS commit: src/sys/dev/wsfb
Module Name:src Committed By: macallan Date: Wed Jul 13 22:47:29 UTC 2011 Modified Files: src/sys/dev/wsfb: genfb.c genfbvar.h Log Message: use callbacks that match the ioctl() interface to control backlight To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/wsfb/genfb.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/wsfb/genfbvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/wsfb/genfb.c diff -u src/sys/dev/wsfb/genfb.c:1.41 src/sys/dev/wsfb/genfb.c:1.42 --- src/sys/dev/wsfb/genfb.c:1.41 Thu Jun 2 02:33:42 2011 +++ src/sys/dev/wsfb/genfb.c Wed Jul 13 22:47:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb.c,v 1.41 2011/06/02 02:33:42 macallan Exp $ */ +/* $NetBSD: genfb.c,v 1.42 2011/07/13 22:47:29 macallan Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.41 2011/06/02 02:33:42 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.42 2011/07/13 22:47:29 macallan Exp $"); #include #include @@ -64,6 +64,8 @@ #define GPRINTF aprint_verbose #endif +#define GENFB_BRIGHTNESS_STEP 15 + static int genfb_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t genfb_mmap(void *, void *, off_t, int); static void genfb_init_screen(void *, struct vcons_screen *, int, long *); @@ -75,10 +77,6 @@ static void genfb_brightness_up(device_t); static void genfb_brightness_down(device_t); -/* set backlight level */ -static void genfb_set_backlight(struct genfb_softc *, int); -/* turn backlight on and off without messing with the level */ -static void genfb_switch_backlight(struct genfb_softc *, int); extern const u_char rasops_cmap[768]; @@ -91,7 +89,7 @@ genfb_init(struct genfb_softc *sc) { prop_dictionary_t dict; - uint64_t cmap_cb, pmf_cb, mode_cb, bl_cb, fbaddr; + uint64_t cmap_cb, pmf_cb, mode_cb, bl_cb, br_cb, fbaddr; uint32_t fboffset; bool console; @@ -165,17 +163,24 @@ if (prop_dictionary_get_uint64(dict, "backlight_callback", &bl_cb)) { if (bl_cb != 0) { sc->sc_backlight = (void *)(vaddr_t)bl_cb; - sc->sc_backlight_on = 1; - aprint_naive_dev(sc->sc_dev, + aprint_naive_dev(sc->sc_dev, "enabling backlight control\n"); - sc->sc_backlight_level = - sc->sc_backlight->gpc_get_parameter( - sc->sc_backlight->gpc_cookie); - if (console) { -pmf_event_register(sc->sc_dev, + } + } + + /* optional brightness control callback */ + sc->sc_brightness = NULL; + if (prop_dictionary_get_uint64(dict, "brightness_callback", &br_cb)) { + if (br_cb != 0) { + sc->sc_brightness = (void *)(vaddr_t)br_cb; + aprint_naive_dev(sc->sc_dev, + "enabling brightness control\n"); + if (console && + sc->sc_brightness->gpc_upd_parameter != NULL) { +pmf_event_register(sc->sc_dev, PMFE_DISPLAY_BRIGHTNESS_UP, genfb_brightness_up, TRUE); -pmf_event_register(sc->sc_dev, +pmf_event_register(sc->sc_dev, PMFE_DISPLAY_BRIGHTNESS_DOWN, genfb_brightness_down, TRUE); } @@ -206,8 +211,8 @@ == false) sc->sc_want_clear = true; - aprint_verbose_dev(sc->sc_dev, "framebuffer at %p, size %dx%d," - "depth %d, stride %d\n", + aprint_verbose_dev(sc->sc_dev, "framebuffer at %p, size %dx%d, depth %d, " + "stride %d\n", sc->sc_fboffset ? (void *)(intptr_t)sc->sc_fboffset : sc->sc_fbaddr, sc->sc_width, sc->sc_height, sc->sc_depth, sc->sc_stride); @@ -341,7 +346,7 @@ struct wsdisplay_fbinfo *wdf; struct vcons_screen *ms = vd->active; struct wsdisplay_param *param; - int new_mode, error; + int new_mode, error, val; switch (cmd) { case WSDISPLAYIO_GINFO: @@ -404,35 +409,51 @@ #endif case WSDISPLAYIO_GETPARAM: param = (struct wsdisplay_param *)data; - if (sc->sc_backlight == NULL) -return EPASSTHROUGH; switch (param->param) { case WSDISPLAYIO_PARAM_BRIGHTNESS: +if (sc->sc_brightness == NULL) + return EPASSTHROUGH; param->min = 0; param->max = 255; -param->curval = sc->sc_backlight_level; -return 0; +return sc->sc_brightness->gpc_get_parameter( +sc->sc_brightness->gpc_cookie, +¶m->curval); case WSDISPLAYIO_PARAM_BACKLIGHT: +if (sc->sc_backlight == NULL) + return EPASSTHROUGH; param->min = 0; param->max = 1; -param->curval = sc->sc_backlight_on; -return 0; +return sc->sc_backlight->gpc_get_parameter( +sc->sc_backlight->gpc_cookie, +¶m->curval); } return EPASSTHROUGH; case WSDISPLAYIO_SETPARAM: param = (struct wsdisplay_param *)data; - if (sc->sc_backlight == NULL) -return EPASSTHROUGH; switch (param->param) { case WSDISPLAYIO_PARAM_BRIGHTNESS: -genfb_set_backlight(sc, param->curval); -return 0; +if (sc->sc_brightness == NULL) + return EPASSTHROUGH; +val = param->curval; +if (val <
CVS commit: src/sys/modules/dtv
Module Name:src Committed By: jmcneill Date: Wed Jul 13 22:43:33 UTC 2011 Modified Files: src/sys/modules/dtv: Makefile Log Message: build dtv_demux.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/modules/dtv/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/dtv/Makefile diff -u src/sys/modules/dtv/Makefile:1.1 src/sys/modules/dtv/Makefile:1.2 --- src/sys/modules/dtv/Makefile:1.1 Sat Jul 9 14:53:37 2011 +++ src/sys/modules/dtv/Makefile Wed Jul 13 22:43:33 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/07/09 14:53:37 jmcneill Exp $ +# $NetBSD: Makefile,v 1.2 2011/07/13 22:43:33 jmcneill Exp $ .include "../Makefile.inc" @@ -7,6 +7,7 @@ KMOD= dtv IOCONF= dtv.ioconf SRCS= dtv_buffer.c \ + dtv_demux.c \ dtv_device.c \ dtv_ioctl.c \ dtv_scatter.c
CVS commit: src/sys/dev/dtv
Module Name:src Committed By: jmcneill Date: Wed Jul 13 22:43:04 UTC 2011 Modified Files: src/sys/dev/dtv: dtv_buffer.c dtv_device.c dtv_ioctl.c dtvvar.h files.dtv Added Files: src/sys/dev/dtv: dtv_demux.c Log Message: add section filter support To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/dtv/dtv_buffer.c \ src/sys/dev/dtv/dtv_device.c cvs rdiff -u -r0 -r1.1 src/sys/dev/dtv/dtv_demux.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/dtv/dtv_ioctl.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/dtv/dtvvar.h cvs rdiff -u -r1.1 -r1.2 src/sys/dev/dtv/files.dtv 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/dtv/dtv_buffer.c diff -u src/sys/dev/dtv/dtv_buffer.c:1.4 src/sys/dev/dtv/dtv_buffer.c:1.5 --- src/sys/dev/dtv/dtv_buffer.c:1.4 Tue Jul 12 00:57:19 2011 +++ src/sys/dev/dtv/dtv_buffer.c Wed Jul 13 22:43:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dtv_buffer.c,v 1.4 2011/07/12 00:57:19 jmcneill Exp $ */ +/* $NetBSD: dtv_buffer.c,v 1.5 2011/07/13 22:43:04 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtv_buffer.c,v 1.4 2011/07/12 00:57:19 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtv_buffer.c,v 1.5 2011/07/13 22:43:04 jmcneill Exp $"); #include #include @@ -99,6 +99,7 @@ dtv_submit_payload(device_t self, const struct dtv_payload *payload) { struct dtv_softc *sc = device_private(self); + struct dtv_demux *demux; struct dtv_ts *ts = &sc->sc_ts; const uint8_t *tspkt; unsigned int npkts, i; @@ -106,8 +107,15 @@ tspkt = payload->data; npkts = payload->size / TS_PKTLEN; for (i = 0; i < npkts; i++) { - if (TS_HAS_SYNC(tspkt) && ts->ts_pidfilter[TS_PID(tspkt)]) { - dtv_buffer_write(sc, tspkt, TS_PKTLEN); + if (TS_HAS_SYNC(tspkt)) { + if (ts->ts_pidfilter[TS_PID(tspkt)]) { +dtv_buffer_write(sc, tspkt, TS_PKTLEN); + } + mutex_enter(&sc->sc_demux_lock); + TAILQ_FOREACH(demux, &sc->sc_demux_list, dd_entries) { +dtv_demux_write(demux, tspkt, TS_PKTLEN); + } + mutex_exit(&sc->sc_demux_lock); } tspkt += TS_PKTLEN; } Index: src/sys/dev/dtv/dtv_device.c diff -u src/sys/dev/dtv/dtv_device.c:1.4 src/sys/dev/dtv/dtv_device.c:1.5 --- src/sys/dev/dtv/dtv_device.c:1.4 Tue Jul 12 00:57:19 2011 +++ src/sys/dev/dtv/dtv_device.c Wed Jul 13 22:43:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dtv_device.c,v 1.4 2011/07/12 00:57:19 jmcneill Exp $ */ +/* $NetBSD: dtv_device.c,v 1.5 2011/07/13 22:43:04 jmcneill Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtv_device.c,v 1.4 2011/07/12 00:57:19 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtv_device.c,v 1.5 2011/07/13 22:43:04 jmcneill Exp $"); #include #include @@ -98,7 +98,8 @@ sc->sc_dev = self; sc->sc_hw = daa->hw; sc->sc_priv = daa->priv; - atomic_swap_uint(&sc->sc_open, 0); + sc->sc_open = 0; + mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE); ds->ds_nbufs = 0; ds->ds_buf = NULL; @@ -115,6 +116,9 @@ return; } + mutex_init(&sc->sc_demux_lock, MUTEX_DEFAULT, IPL_VM); + TAILQ_INIT(&sc->sc_demux_list); + dtv_device_get_devinfo(sc, &info); aprint_naive("\n"); @@ -149,6 +153,8 @@ dtv_buffer_realloc(sc, 0); dtv_scatter_buf_destroy(&ds->ds_data); + mutex_destroy(&sc->sc_demux_lock); + return 0; } @@ -196,7 +202,6 @@ { struct dtv_softc *sc; struct dtv_ts *ts; - unsigned int n; int error; if ((sc = device_lookup_private(&dtv_cd, DTVUNIT(dev))) == NULL) @@ -205,17 +210,20 @@ return ENODEV; ts = &sc->sc_ts; - n = atomic_cas_uint(&sc->sc_open, 0, 1); - if (n == 0) { + mutex_enter(&sc->sc_lock); + if (sc->sc_open == 0) { error = dtv_device_open(sc, flags); - if (error) { - atomic_swap_uint(&sc->sc_open, 0); + if (error) return error; - } sc->sc_bufsize = DTV_DEFAULT_BUFSIZE; sc->sc_bufsize_chg = true; memset(ts->ts_pidfilter, 0, sizeof(ts->ts_pidfilter)); } + ++sc->sc_open; + mutex_exit(&sc->sc_lock); + + if (ISDTVDEMUX(dev)) + return dtv_demux_open(sc, flags, mode, l); return 0; } @@ -228,9 +236,7 @@ if ((sc = device_lookup_private(&dtv_cd, DTVUNIT(dev))) == NULL) return ENXIO; - dtv_device_close(sc); - dtv_buffer_destroy(sc); - atomic_swap_uint(&sc->sc_open, 0); + dtv_close_common(sc); return 0; } @@ -259,8 +265,6 @@ if (ISDTVFRONTEND(dev)) { return dtv_frontend_ioctl(sc, cmd, ptr, flags); - } else if (ISDTVDEMUX(dev)) { - return dtv_demux_ioctl(sc, cmd, ptr, flags); } return EINVAL; @@ -276,8 +280,6 @@ if (ISDTVFRONTEND(dev)) { return POLLPRI|POLLIN; /* XXX event */ - } else if (ISDTVDEMUX(dev)) { - return POLLIN|POLLOUT; /* XXX */ } else if (ISDTVDVR(dev)) { return dtv_buffer_poll(sc, events, l); } @@ -285,6 +287,19 @@ return POLLERR; } +void +dtv_close_common(struct dtv_softc *sc) +{ + mutex_enter(&s
CVS commit: xsrc/external/mit/xf86-video-r128/dist/src
Module Name:xsrc Committed By: macallan Date: Wed Jul 13 22:43:04 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-r128/dist/src: r128_driver.c Log Message: Rage 128 M3 can have DFP output To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c diff -u xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.6 xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.7 --- xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.6 Wed Jun 29 04:11:31 2011 +++ xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c Wed Jul 13 22:43:04 2011 @@ -1059,7 +1059,8 @@ case PCI_CHIP_RAGE128LF: case PCI_CHIP_RAGE128MF: case PCI_CHIP_RAGE128ML: - info->HasPanelRegs = TRUE; + info->HasPanelRegs = TRUE; + info->isDFP = TRUE; /* which chips support dualhead? */ info->HasCRTC2 = TRUE; break; @@ -1421,7 +1422,7 @@ MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, info->pI2CBus); #ifdef __NetBSD__ -{ +if (MonInfo == NULL) { struct wsdisplayio_edid_info ei; char buffer[1024]; int i, j;
CVS commit: src/sys/fs/sysvbfs
Module Name:src Committed By: njoly Date: Wed Jul 13 19:51:29 UTC 2011 Modified Files: src/sys/fs/sysvbfs: sysvbfs_vfsops.c Log Message: Add function name to a few debug messages. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/fs/sysvbfs/sysvbfs_vfsops.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/fs/sysvbfs/sysvbfs_vfsops.c diff -u src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.36 src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.37 --- src/sys/fs/sysvbfs/sysvbfs_vfsops.c:1.36 Sun Jun 12 03:35:54 2011 +++ src/sys/fs/sysvbfs/sysvbfs_vfsops.c Wed Jul 13 19:51:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysvbfs_vfsops.c,v 1.36 2011/06/12 03:35:54 rmind Exp $ */ +/* $NetBSD: sysvbfs_vfsops.c,v 1.37 2011/07/13 19:51:29 njoly Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.36 2011/06/12 03:35:54 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.37 2011/07/13 19:51:29 njoly Exp $"); #include #include @@ -207,8 +207,9 @@ mp->mnt_dev_bshift = BFS_BSHIFT; mp->mnt_fs_bshift = BFS_BSHIFT; - DPRINTF("fstype=%d dtype=%d bsize=%d\n", dpart.part->p_fstype, - dpart.disklab->d_type, dpart.disklab->d_secsize); + DPRINTF("%s: fstype=%d dtype=%d bsize=%d\n", __func__, + dpart.part->p_fstype, dpart.disklab->d_type, + dpart.disklab->d_secsize); out: if (devopen && error) @@ -341,7 +342,7 @@ DPRINTF("%s: i-node=%lld\n", __func__, (long long)ino); /* Lookup requested i-node */ if (!bfs_inode_lookup(bfs, ino, &inode)) { - DPRINTF("bfs_inode_lookup failed.\n"); + DPRINTF("%s: bfs_inode_lookup failed.\n", __func__); return ENOENT; }
CVS commit: src
Module Name:src Committed By: dyoung Date: Wed Jul 13 15:32:57 UTC 2011 Modified Files: src/distrib/sets/lists/comp: md.algor src/sys/arch/algor/include: Makefile Log Message: Havard Eidnes points out that on algor we must not install any longer. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/comp/md.algor cvs rdiff -u -r1.12 -r1.13 src/sys/arch/algor/include/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/md.algor diff -u src/distrib/sets/lists/comp/md.algor:1.14 src/distrib/sets/lists/comp/md.algor:1.15 --- src/distrib/sets/lists/comp/md.algor:1.14 Wed Aug 19 08:24:43 2009 +++ src/distrib/sets/lists/comp/md.algor Wed Jul 13 15:32:57 2011 @@ -1,4 +1,4 @@ -# $NetBSD: md.algor,v 1.14 2009/08/19 08:24:43 he Exp $ +# $NetBSD: md.algor,v 1.15 2011/07/13 15:32:57 dyoung Exp $ ./usr/include/algorcomp-c-include ./usr/include/algor/_G_config.h comp-obsolete obsolete ./usr/include/algor/ansi.h comp-c-include @@ -7,7 +7,7 @@ ./usr/include/algor/autoconf.h comp-c-include ./usr/include/algor/bsd-aout.h comp-obsolete obsolete ./usr/include/algor/bswap.h comp-c-include -./usr/include/algor/bus.h comp-c-include +./usr/include/algor/bus.h comp-obsolete obsolete ./usr/include/algor/cdefs.h comp-c-include ./usr/include/algor/cpu.h comp-c-include ./usr/include/algor/db_machdep.h comp-obsolete obsolete Index: src/sys/arch/algor/include/Makefile diff -u src/sys/arch/algor/include/Makefile:1.12 src/sys/arch/algor/include/Makefile:1.13 --- src/sys/arch/algor/include/Makefile:1.12 Wed Aug 12 23:29:18 2009 +++ src/sys/arch/algor/include/Makefile Wed Jul 13 15:32:57 2011 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.12 2009/08/12 23:29:18 matt Exp $ +# $NetBSD: Makefile,v 1.13 2011/07/13 15:32:57 dyoung Exp $ INCSDIR=/usr/include/algor INCS= ansi.h asm.h autoconf.h \ - bswap.h bus.h \ + bswap.h \ cdefs.h cpu.h \ disklabel.h \ ecoff_machdep.h elf_machdep.h endian.h endian_machdep.h \
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Wed Jul 13 14:36:29 UTC 2011 Modified Files: src/sys/dev/usb: emdtv.c Log Message: emdtv(4): add Pinnacle PCTV 800E To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/emdtv.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/emdtv.c diff -u src/sys/dev/usb/emdtv.c:1.1 src/sys/dev/usb/emdtv.c:1.2 --- src/sys/dev/usb/emdtv.c:1.1 Mon Jul 11 18:02:04 2011 +++ src/sys/dev/usb/emdtv.c Wed Jul 13 14:36:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: emdtv.c,v 1.1 2011/07/11 18:02:04 jmcneill Exp $ */ +/* $NetBSD: emdtv.c,v 1.2 2011/07/13 14:36:29 jakllsch Exp $ */ /*- * Copyright (c) 2008, 2011 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: emdtv.c,v 1.1 2011/07/11 18:02:04 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emdtv.c,v 1.2 2011/07/13 14:36:29 jakllsch Exp $"); #include #include @@ -60,6 +60,7 @@ static const struct usb_devno emdtv_devices[] = { { USB_VENDOR_AMD, USB_PRODUCT_AMD_TV_WONDER_600_USB }, + { USB_VENDOR_PINNACLE, USB_PRODUCT_PINNACLE_PCTV800E }, }; int emdtv_debug_regs = 0;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Wed Jul 13 14:34:45 UTC 2011 Modified Files: src/sys/dev/usb: emdtv_dtv.c Log Message: Support XC3028 tuner in emdtv. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/emdtv_dtv.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/emdtv_dtv.c diff -u src/sys/dev/usb/emdtv_dtv.c:1.1 src/sys/dev/usb/emdtv_dtv.c:1.2 --- src/sys/dev/usb/emdtv_dtv.c:1.1 Mon Jul 11 18:02:04 2011 +++ src/sys/dev/usb/emdtv_dtv.c Wed Jul 13 14:34:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: emdtv_dtv.c,v 1.1 2011/07/11 18:02:04 jmcneill Exp $ */ +/* $NetBSD: emdtv_dtv.c,v 1.2 2011/07/13 14:34:45 jakllsch Exp $ */ /*- * Copyright (c) 2008, 2011 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: emdtv_dtv.c,v 1.1 2011/07/11 18:02:04 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emdtv_dtv.c,v 1.2 2011/07/13 14:34:45 jakllsch Exp $"); #include #include @@ -169,6 +169,17 @@ return ENXIO; switch (sc->sc_board->eb_tuner) { + case EMDTV_TUNER_XC3028: + if (sc->sc_xc3028 == NULL) { + sc->sc_xc3028 = xc3028_open(sc->sc_dev, + &sc->sc_i2c, 0x61 << 1, emdtv_dtv_tuner_reset, sc, + XC3028); + } + if (sc->sc_xc3028 == NULL) { + aprint_error_dev(sc->sc_dev, "couldn't open xc3028\n"); + return ENXIO; + } + break; case EMDTV_TUNER_XC3028L: if (sc->sc_xc3028 == NULL) { sc->sc_xc3028 = xc3028_open(sc->sc_dev,
CVS commit: src/doc
Module Name:src Committed By: jruoho Date: Wed Jul 13 14:31:40 UTC 2011 Modified Files: src/doc: CHANGES Log Message: Fix a typo in previous. To generate a diff of this commit: cvs rdiff -u -r1.1577 -r1.1578 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.1577 src/doc/CHANGES:1.1578 --- src/doc/CHANGES:1.1577 Wed Jul 13 07:52:49 2011 +++ src/doc/CHANGES Wed Jul 13 14:31:40 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1577 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1578 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1061,5 +1061,5 @@ for AR71xx (24K) and AR9344 (74K) SoCs. dtv(4): Add digital TV framework. [jmcneill 20110709] auvitek(4): Add digital capture support. [jmcneill 20110709] - hpacel(4): Add a driver for HP 3D DriverGuard; a LIS3LV02DL-based + hpacel(4): Add a driver for HP 3D DriveGuard; a LIS3LV02DL-based accelerometer. [jruoho 20110713]
CVS commit: src/sys/arch/arc/stand/boot
Module Name:src Committed By: mrg Date: Wed Jul 13 14:09:36 UTC 2011 Modified Files: src/sys/arch/arc/stand/boot: Makefile Log Message: build this as a o32 application. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arc/stand/boot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arc/stand/boot/Makefile diff -u src/sys/arch/arc/stand/boot/Makefile:1.12 src/sys/arch/arc/stand/boot/Makefile:1.13 --- src/sys/arch/arc/stand/boot/Makefile:1.12 Sun Feb 20 07:52:43 2011 +++ src/sys/arch/arc/stand/boot/Makefile Wed Jul 13 14:09:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2011/02/20 07:52:43 matt Exp $ +# $NetBSD: Makefile,v 1.13 2011/07/13 14:09:36 mrg Exp $ .include .include # for ${HOST_SH} @@ -25,7 +25,7 @@ LIBCRTBEGIN= LIBCRTEND= -AFLAGS=-x assembler-with-cpp -mno-abicalls -mips2 +AFLAGS=-x assembler-with-cpp -mno-abicalls -mips2 -mabi=32 AFLAGS+= -D_LOCORE -D_KERNEL CFLAGS=-Os -mmemcpy -G 1024 CFLAGS+= -ffreestanding -mno-abicalls -msoft-float -mips2 -mabi=32 @@ -36,6 +36,7 @@ #CPPFLAGS+= -DBOOT_DEBUG LDSCRIPT= ${S}/arch/mips/conf/stand.ldscript TEXTADDR= 0x80f0 +LD+= -m elf32ltsmip # if there is a 'version' file, add rule for vers.c and add it to SRCS # and CLEANFILES
CVS commit: src/sys/fs/v7fs
Module Name:src Committed By: uch Date: Wed Jul 13 12:28:57 UTC 2011 Modified Files: src/sys/fs/v7fs: v7fs_vnops.c Log Message: Fix readdir eofflag(bogus eofflags was setted). getcwd works. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/fs/v7fs/v7fs_vnops.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/fs/v7fs/v7fs_vnops.c diff -u src/sys/fs/v7fs/v7fs_vnops.c:1.2 src/sys/fs/v7fs/v7fs_vnops.c:1.3 --- src/sys/fs/v7fs/v7fs_vnops.c:1.2 Wed Jul 13 12:22:49 2011 +++ src/sys/fs/v7fs/v7fs_vnops.c Wed Jul 13 12:28:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: v7fs_vnops.c,v 1.2 2011/07/13 12:22:49 uch Exp $ */ +/* $NetBSD: v7fs_vnops.c,v 1.3 2011/07/13 12:28:57 uch Exp $ */ /*- * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: v7fs_vnops.c,v 1.2 2011/07/13 12:22:49 uch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: v7fs_vnops.c,v 1.3 2011/07/13 12:28:57 uch Exp $"); #if defined _KERNEL_OPT #include "opt_v7fs.h" #endif @@ -887,6 +887,9 @@ } scratch_free(fs, buf); + if (p->cnt == p->end) + return V7FS_ITERATOR_BREAK; + return error; }
CVS commit: src/sys/fs/v7fs
Module Name:src Committed By: uch Date: Wed Jul 13 12:22:49 UTC 2011 Modified Files: src/sys/fs/v7fs: v7fs_vnops.c Log Message: Fix inode update method. chown and chmod works. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/fs/v7fs/v7fs_vnops.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/fs/v7fs/v7fs_vnops.c diff -u src/sys/fs/v7fs/v7fs_vnops.c:1.1 src/sys/fs/v7fs/v7fs_vnops.c:1.2 --- src/sys/fs/v7fs/v7fs_vnops.c:1.1 Mon Jun 27 11:52:25 2011 +++ src/sys/fs/v7fs/v7fs_vnops.c Wed Jul 13 12:22:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: v7fs_vnops.c,v 1.1 2011/06/27 11:52:25 uch Exp $ */ +/* $NetBSD: v7fs_vnops.c,v 1.2 2011/07/13 12:22:49 uch Exp $ */ /*- * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: v7fs_vnops.c,v 1.1 2011/06/27 11:52:25 uch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: v7fs_vnops.c,v 1.2 2011/07/13 12:22:49 uch Exp $"); #if defined _KERNEL_OPT #include "opt_v7fs.h" #endif @@ -439,7 +439,9 @@ struct v7fs_node *v7node = vp->v_data; struct v7fs_self *fs = v7node->v7fsmount->core; struct v7fs_inode *inode = &v7node->inode; + struct timespec *acc, *mod; int error = 0; + acc = mod = NULL; DPRINTF("\n"); @@ -476,20 +478,28 @@ uvm_vnp_setsize(vp, vap->va_size); } - if (vap->va_uid != (uid_t)VNOVAL) + if (vap->va_uid != (uid_t)VNOVAL) { inode->uid = vap->va_uid; - if (vap->va_gid != (uid_t)VNOVAL) + } + if (vap->va_gid != (uid_t)VNOVAL) { inode->gid = vap->va_gid; - if (vap->va_mode != (mode_t)VNOVAL) + } + if (vap->va_mode != (mode_t)VNOVAL) { v7fs_inode_chmod(inode, vap->va_mode); - if (vap->va_atime.tv_sec != VNOVAL) - inode->atime = vap->va_atime.tv_sec; - if (vap->va_mtime.tv_sec != VNOVAL) - inode->mtime = vap->va_mtime.tv_sec; - if (vap->va_ctime.tv_sec != VNOVAL) - inode->ctime = vap->va_ctime.tv_sec; + } + if (vap->va_atime.tv_sec != VNOVAL) { + acc = &vap->va_atime; + } + if (vap->va_mtime.tv_sec != VNOVAL) { + mod = &vap->va_mtime; + v7node->update_mtime = true; + } + if (vap->va_ctime.tv_sec != VNOVAL) { + v7node->update_ctime = true; + } - v7fs_update(vp, 0, 0, 0); + v7node->update_atime = true; + v7fs_update(vp, acc, mod, 0); return error; }
CVS commit: src/share/man/man4
Module Name:src Committed By: jruoho Date: Wed Jul 13 12:22:36 UTC 2011 Modified Files: src/share/man/man4: acpi.4 Log Message: Update. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/share/man/man4/acpi.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/acpi.4 diff -u src/share/man/man4/acpi.4:1.70 src/share/man/man4/acpi.4:1.71 --- src/share/man/man4/acpi.4:1.70 Tue May 3 09:36:24 2011 +++ src/share/man/man4/acpi.4 Wed Jul 13 12:22:36 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: acpi.4,v 1.70 2011/05/03 09:36:24 wiz Exp $ +.\" $NetBSD: acpi.4,v 1.71 2011/07/13 12:22:36 jruoho Exp $ .\" .\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 17, 2011 +.Dd July 13, 2011 .Dt ACPI 4 .Os .Sh NAME @@ -275,6 +275,8 @@ Floppy disk controllers. .It Xr fujitsu 4 Fujitsu brightness, pointer, and hotkeys. +.It Xr hpacel 4 +HP 3D DriveGuard accelerometer. .It Xr hpet 4 High Precision Event Timer .Pq Tn HPET .
CVS commit: src/sys/fs/v7fs
Module Name:src Committed By: uch Date: Wed Jul 13 12:18:22 UTC 2011 Modified Files: src/sys/fs/v7fs: v7fs_datablock.c Log Message: When filesize is zero, correctly return V7FS_ITERATOR_END To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/fs/v7fs/v7fs_datablock.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/fs/v7fs/v7fs_datablock.c diff -u src/sys/fs/v7fs/v7fs_datablock.c:1.1 src/sys/fs/v7fs/v7fs_datablock.c:1.2 --- src/sys/fs/v7fs/v7fs_datablock.c:1.1 Mon Jun 27 11:52:24 2011 +++ src/sys/fs/v7fs/v7fs_datablock.c Wed Jul 13 12:18:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: v7fs_datablock.c,v 1.1 2011/06/27 11:52:24 uch Exp $ */ +/* $NetBSD: v7fs_datablock.c,v 1.2 2011/07/13 12:18:22 uch Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: v7fs_datablock.c,v 1.1 2011/06/27 11:52:24 uch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: v7fs_datablock.c,v 1.2 2011/07/13 12:18:22 uch Exp $"); #if defined _KERNEL_OPT #include "opt_v7fs.h" #endif @@ -262,7 +262,7 @@ int ret; if (!(filesize = v7fs_inode_filesize(p))) - return 0; + return V7FS_ITERATOR_END; #ifdef V7FS_DATABLOCK_DEBUG size_t sz = filesize; #endif
CVS commit: src/tests/lib/libc/stdio
Module Name:src Committed By: jruoho Date: Wed Jul 13 11:17:03 UTC 2011 Modified Files: src/tests/lib/libc/stdio: t_popen.c t_printf.c Log Message: Rename few test case names. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdio/t_popen.c cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdio/t_printf.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/libc/stdio/t_popen.c diff -u src/tests/lib/libc/stdio/t_popen.c:1.2 src/tests/lib/libc/stdio/t_popen.c:1.3 --- src/tests/lib/libc/stdio/t_popen.c:1.2 Sat Jun 11 18:03:18 2011 +++ src/tests/lib/libc/stdio/t_popen.c Wed Jul 13 11:17:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_popen.c,v 1.2 2011/06/11 18:03:18 christos Exp $ */ +/* $NetBSD: t_popen.c,v 1.3 2011/07/13 11:17:03 jruoho Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -19,7 +19,7 @@ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS @@ -36,7 +36,7 @@ #endif /* not lint */ #ifndef lint -__RCSID("$NetBSD: t_popen.c,v 1.2 2011/06/11 18:03:18 christos Exp $"); +__RCSID("$NetBSD: t_popen.c,v 1.3 2011/07/13 11:17:03 jruoho Exp $"); #endif /* not lint */ #include @@ -63,28 +63,30 @@ atf_tc_fail("Check stderr for error details."); \ } while ( /*CONSTCOND*/ 0 ) -ATF_TC_WITH_CLEANUP(popen); - -ATF_TC_HEAD(popen, tc) +ATF_TC_WITH_CLEANUP(popen_zeropad); +ATF_TC_HEAD(popen_zeropad, tc) { - + atf_tc_set_md_var(tc, "descr", "output format zero padding"); } - -ATF_TC_BODY(popen, tc) + +ATF_TC_BODY(popen_zeropad, tc) { char *buffer, command[MAXPATHLEN]; int index, in; FILE *my_pipe; - if ((buffer = malloc(BUFSIZE*sizeof(char))) == NULL) + if ((buffer = malloc(BUFSIZE)) == NULL) atf_tc_skip("Unable to allocate buffer."); srand ((unsigned int)time(NULL)); - for (index=0; index%s", _PATH_CAT, DATAFILE); + (void)snprintf(command, sizeof(command), "%s >%s", + _PATH_CAT, DATAFILE); + if ((my_pipe = popen(command, "w")) == NULL) TEST_ERROR("popen write"); @@ -95,6 +97,7 @@ TEST_ERROR("pclose"); (void)snprintf(command, sizeof(command), "%s %s", _PATH_CAT, DATAFILE); + if ((my_pipe = popen(command, "r")) == NULL) TEST_ERROR("popen read"); @@ -118,14 +121,15 @@ TEST_ERROR("pclose"); } -ATF_TC_CLEANUP(popen, tc) +ATF_TC_CLEANUP(popen_zeropad, tc) { (void)unlink(DATAFILE); } ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, popen); + + ATF_TP_ADD_TC(tp, popen_zeropad); return atf_no_error(); } Index: src/tests/lib/libc/stdio/t_printf.c diff -u src/tests/lib/libc/stdio/t_printf.c:1.1 src/tests/lib/libc/stdio/t_printf.c:1.2 --- src/tests/lib/libc/stdio/t_printf.c:1.1 Fri Jul 8 06:38:04 2011 +++ src/tests/lib/libc/stdio/t_printf.c Wed Jul 13 11:17:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_printf.c,v 1.1 2011/07/08 06:38:04 jruoho Exp $ */ +/* $NetBSD: t_printf.c,v 1.2 2011/07/13 11:17:03 jruoho Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,15 +31,15 @@ #include #include -ATF_TC(sprintf_dotzero); -ATF_TC_HEAD(sprintf_dotzero, tc) +ATF_TC(snprintf_dotzero); +ATF_TC_HEAD(snprintf_dotzero, tc) { atf_tc_set_md_var(tc, "descr", \ "PR lib/32951: %.0f formats (0.0,0.5] to \"0.\""); } -ATF_TC_BODY(sprintf_dotzero, tc) +ATF_TC_BODY(snprintf_dotzero, tc) { char s[4]; @@ -74,7 +74,7 @@ ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, sprintf_dotzero); + ATF_TP_ADD_TC(tp, snprintf_dotzero); ATF_TP_ADD_TC(tp, sprintf_zeropad); return atf_no_error();
CVS commit: src/share/man/man4
Module Name:src Committed By: jruoho Date: Wed Jul 13 11:03:07 UTC 2011 Modified Files: src/share/man/man4: aps.4 Log Message: Xref hpacel(4). To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/aps.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/aps.4 diff -u src/share/man/man4/aps.4:1.4 src/share/man/man4/aps.4:1.5 --- src/share/man/man4/aps.4:1.4 Sun Feb 20 19:49:28 2011 +++ src/share/man/man4/aps.4 Wed Jul 13 11:03:07 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: aps.4,v 1.4 2011/02/20 19:49:28 jruoho Exp $ +.\" $NetBSD: aps.4,v 1.5 2011/07/13 11:03:07 jruoho Exp $ .\" $OpenBSD: aps.4,v 1.7 2007/05/31 19:19:49 jmc Exp $ .\" .\" Copyright (c) 2005 Jonathan Gray @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd February 20, 2010 +.Dd July 13, 2011 .Dt APS 4 .Os .Sh NAME @@ -45,6 +45,7 @@ .El .Sh SEE ALSO .Xr envsys 4 , +.Xr hpacel 4 , .Xr thinkpad 4 , .Xr envstat 8 .Sh HISTORY
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Wed Jul 13 10:59:36 UTC 2011 Modified Files: src/sys/dev/acpi: hpacel_acpi.c Log Message: Fix autoconf(9) attach message. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/hpacel_acpi.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/acpi/hpacel_acpi.c diff -u src/sys/dev/acpi/hpacel_acpi.c:1.1 src/sys/dev/acpi/hpacel_acpi.c:1.2 --- src/sys/dev/acpi/hpacel_acpi.c:1.1 Wed Jul 13 07:52:48 2011 +++ src/sys/dev/acpi/hpacel_acpi.c Wed Jul 13 10:59:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hpacel_acpi.c,v 1.1 2011/07/13 07:52:48 jruoho Exp $ */ +/* $NetBSD: hpacel_acpi.c,v 1.2 2011/07/13 10:59:35 jruoho Exp $ */ /*- * Copyright (c) 2009, 2011 Jukka Ruohonen @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: hpacel_acpi.c,v 1.1 2011/07/13 07:52:48 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpacel_acpi.c,v 1.2 2011/07/13 10:59:35 jruoho Exp $"); #include #include @@ -190,8 +190,7 @@ sc->sc_node = aa->aa_node; aprint_naive("\n"); - aprint_normal(": HP 3D DriveGuard accelerometer (rev. 0x%02x)\n", - sc->sc_whoami); + aprint_normal(": HP 3D DriveGuard accelerometer\n"); if (hpacel_reg_init(self) != true) return;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Wed Jul 13 09:58:53 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_bat.c Log Message: In revision 1.103 the serial number was used to determine whether the battery was changed to another one. However, this is unreliable as many vendors hardcode the serial number string in the DSDT. Thus, use the design capacity and voltage instead; these are likely read from the battery itself. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/dev/acpi/acpi_bat.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/acpi/acpi_bat.c diff -u src/sys/dev/acpi/acpi_bat.c:1.110 src/sys/dev/acpi/acpi_bat.c:1.111 --- src/sys/dev/acpi/acpi_bat.c:1.110 Mon Jun 20 20:24:59 2011 +++ src/sys/dev/acpi/acpi_bat.c Wed Jul 13 09:58:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_bat.c,v 1.110 2011/06/20 20:24:59 pgoyette Exp $ */ +/* $NetBSD: acpi_bat.c,v 1.111 2011/07/13 09:58:53 jruoho Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.110 2011/06/20 20:24:59 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.111 2011/07/13 09:58:53 jruoho Exp $"); #include #include @@ -150,9 +150,10 @@ struct sysmon_envsys *sc_sme; struct timeval sc_last; envsys_data_t *sc_sensor; - char sc_serial[64]; kmutex_t sc_mutex; kcondvar_t sc_condvar; + int32_t sc_dcapacity; + int32_t sc_dvoltage; int32_t sc_lcapacity; int32_t sc_wcapacity; int sc_present; @@ -231,6 +232,8 @@ sc->sc_node = aa->aa_node; sc->sc_present = 0; + sc->sc_dvoltage = 0; + sc->sc_dcapacity = 0; sc->sc_lcapacity = 0; sc->sc_wcapacity = 0; @@ -241,7 +244,6 @@ cv_init(&sc->sc_condvar, device_xname(self)); (void)pmf_device_register(self, NULL, acpibat_resume); - (void)memset(sc->sc_serial, '\0', sizeof(sc->sc_serial)); (void)acpi_register_notify(sc->sc_node, acpibat_notify_handler); sc->sc_sensor = kmem_zalloc(ACPIBAT_COUNT * @@ -442,7 +444,8 @@ acpibat_print_info(device_t dv, ACPI_OBJECT *elm) { struct acpibat_softc *sc = device_private(dv); - const char *model, *serial, *tech, *unit; + const char *tech, *unit; + int32_t dcap, dvol; int i; for (i = ACPIBAT_BIF_OEM; i > ACPIBAT_BIF_GRANULARITY2; i--) { @@ -457,20 +460,17 @@ return; } - model = elm[ACPIBAT_BIF_MODEL].String.Pointer; - serial = elm[ACPIBAT_BIF_SERIAL].String.Pointer; + dcap = elm[ACPIBAT_BIF_DCAPACITY].Integer.Value; + dvol = elm[ACPIBAT_BIF_DVOLTAGE].Integer.Value; - if (elm[ACPIBAT_BIF_SERIAL].String.Length > sizeof(sc->sc_serial)) + /* + * Try to detect whether the battery was switched. + */ + if (sc->sc_dcapacity == dcap && sc->sc_dvoltage == dvol) return; - - if (sc->sc_serial[0] == '\0') - (void)strlcpy(sc->sc_serial, serial, sizeof(sc->sc_serial)); else { - if (strcmp(sc->sc_serial, serial) == 0) - return; - - (void)memset(sc->sc_serial, '\0', sizeof(sc->sc_serial)); - (void)strlcpy(sc->sc_serial, serial, sizeof(sc->sc_serial)); + sc->sc_dcapacity = dcap; + sc->sc_dvoltage = dvol; } tech = (elm[ACPIBAT_BIF_TECHNOLOGY].Integer.Value != 0) ? @@ -480,8 +480,9 @@ elm[ACPIBAT_BIF_OEM].String.Pointer, elm[ACPIBAT_BIF_TYPE].String.Pointer, tech); - aprint_verbose_dev(dv, "model number %s, serial number %s\n", - model, serial); + aprint_debug_dev(dv, "model number %s, serial number %s\n", + elm[ACPIBAT_BIF_MODEL].String.Pointer, + elm[ACPIBAT_BIF_SERIAL].String.Pointer); #define SCALE(x) (((int)x) / 100), int)x) % 100) / 1000)
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Jul 13 08:38:16 UTC 2011 Modified Files: src/share/man/man4: hpacel.4 Log Message: Fix RCS Id. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/hpacel.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/hpacel.4 diff -u src/share/man/man4/hpacel.4:1.1 src/share/man/man4/hpacel.4:1.2 --- src/share/man/man4/hpacel.4:1.1 Wed Jul 13 07:52:49 2011 +++ src/share/man/man4/hpacel.4 Wed Jul 13 08:38:16 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD +.\" $NetBSD: hpacel.4,v 1.2 2011/07/13 08:38:16 wiz Exp $ .\" .\" Copyright (c) 2011 Jukka Ruohonen .\" All rights reserved.
CVS commit: src/usr.bin/locate/locate
Module Name:src Committed By: apb Date: Wed Jul 13 07:58:35 UTC 2011 Modified Files: src/usr.bin/locate/locate: updatedb.sh Log Message: Comments and white space changes, inspired by Greg Woods' remarks in PR 45130, but not directly copied from the patch in the PR. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/locate/locate/updatedb.sh 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/locate/locate/updatedb.sh diff -u src/usr.bin/locate/locate/updatedb.sh:1.13 src/usr.bin/locate/locate/updatedb.sh:1.14 --- src/usr.bin/locate/locate/updatedb.sh:1.13 Wed Jul 13 07:48:19 2011 +++ src/usr.bin/locate/locate/updatedb.sh Wed Jul 13 07:58:35 2011 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: updatedb.sh,v 1.13 2011/07/13 07:48:19 apb Exp $ +# $NetBSD: updatedb.sh,v 1.14 2011/07/13 07:58:35 apb Exp $ # # Copyright (c) 1989, 1993 # The Regents of the University of California. All rights reserved. @@ -83,34 +83,42 @@ ''|'#'*) continue ;; # skip blank lines and comment lines esac - eval "set -- $args" + eval "set -- $args" # set "$@" from $args, obeying quotes case "$com" in searchpath) - SRCHPATHS="${SRCHPATHS}${SRCHPATHS:+ }$(shell_quote "$@")";; + SRCHPATHS="${SRCHPATHS}${SRCHPATHS:+ }$(shell_quote "$@")" + ;; ignorefs) for i in "$@"; do q="$(shell_quote "${i#\!}")" fs= case "$i" in -none) ignorefs=;; -\!*) fs="! -fstype $q";; -*) fs="-fstype $q";; +none) ignorefs= + ;; +\!*) fs="! -fstype $q" + ;; +*) fs="-fstype $q" + ;; esac case "$fs" in '') ;; -*) ignorefs="${ignorefs:+${ignorefs} -o }${fs}";; +*) ignorefs="${ignorefs:+${ignorefs} -o }${fs}" + ;; esac - done;; + done + ;; ignore) for i in "$@"; do q="$(shell_quote "$i")" ignore="${ignore:+${ignore} -o }-path ${q}" - done;; + done + ;; ignorecontents) for i in "$@"; do q="$(shell_quote "$i")" ignore="${ignore:+${ignore} -o }-path ${q} -print" - done;; + done + ;; workdir) if [ $# -ne 1 ]; then echo "$CONF: workdir takes exactly one argument" >&2 @@ -118,10 +126,12 @@ TMPDIR="$1" else echo "$CONF: workdir: $1 nonexistent" >&2 - fi;; + fi + ;; *) echo "$CONF: $com: unknown config command" >&2 - exit 1;; + exit 1 + ;; esac done < "$CONF" fi @@ -137,7 +147,7 @@ # insert '-o' if neither $ignorefs or $ignore are empty case "$ignorefs $ignore" in ' '*|*' ') ;; -*) ignore="-o $ignore";; +*) ignore="-o $ignore" ;; esac FILELIST=$(mktemp -t locate.list) || exit 1 @@ -146,11 +156,11 @@ # Make a file list and compute common bigrams. # Entries of each directory shall be sorted (find -s). +# The "cat" process is not useless; it lets us detect write errors. (eval "find -s ${SRCHPATHS} $lp $ignorefs $ignore $rp -print"; true) \ | cat >> "$FILELIST" -if [ $? != 0 ] -then +if [ $? != 0 ]; then exit 1 fi
CVS commit: src
d ./@MODULEDIR@/acpibatbase-kernel-modules kmod @@ -59,6 +59,8 @@ ./@MODULEDIR@/fujbp/fujbp.kmod base-kernel-modules kmod ./@MODULEDIR@/fujhkbase-kernel-modules kmod ./@MODULEDIR@/fujhk/fujhk.kmod base-kernel-modules kmod +./@MODULEDIR@/hpacelbase-kernel-modules kmod +./@MODULEDIR@/hpacel/hpacel.kmod base-kernel-modules kmod ./@MODULEDIR@/hpetbase-kernel-modules kmod ./@MODULEDIR@/hpet/hpet.kmod base-kernel-modules kmod ./@MODULEDIR@/hpqlbbase-kernel-modules kmod Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1576 src/doc/CHANGES:1.1577 --- src/doc/CHANGES:1.1576 Sat Jul 9 15:53:38 2011 +++ src/doc/CHANGES Wed Jul 13 07:52:49 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1576 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1577 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1061,3 +1061,5 @@ for AR71xx (24K) and AR9344 (74K) SoCs. dtv(4): Add digital TV framework. [jmcneill 20110709] auvitek(4): Add digital capture support. [jmcneill 20110709] + hpacel(4): Add a driver for HP 3D DriverGuard; a LIS3LV02DL-based + accelerometer. [jruoho 20110713] Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.560 src/share/man/man4/Makefile:1.561 --- src/share/man/man4/Makefile:1.560 Wed Jun 22 20:29:38 2011 +++ src/share/man/man4/Makefile Wed Jul 13 07:52:49 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.560 2011/06/22 20:29:38 jruoho Exp $ +# $NetBSD: Makefile,v 1.561 2011/07/13 07:52:49 jruoho Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -27,7 +27,7 @@ fast_ipsec.4 fd.4 finsio.4 flash.4 fpa.4 fms.4 fss.4 fujbp.4 fxp.4 \ gcscaudio.4 gem.4 genfb.4 gentbi.4 geodeide.4 \ glxtphy.4 gpib.4 gpio.4 gpiolock.4 gpiosim.4 gre.4 gphyter.4 gsip.4 \ - hdaudio.4 hifn.4 hme.4 hpqlb.4 hptide.4 \ + hdaudio.4 hifn.4 hme.4 hpacel.4 hpqlb.4 hptide.4 \ ibmhawk.4 ichsmb.4 icmp.4 icp.4 icsphy.4 iee.4 ieee80211.4 \ ifmedia.4 igphy.4 igsfb.4 iha.4 ihphy.4 iic.4 inet.4 ikphy.4 inphy.4 \ intersil7170.4 \ Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.322 src/sys/arch/amd64/conf/GENERIC:1.323 --- src/sys/arch/amd64/conf/GENERIC:1.322 Sun Jul 3 10:40:16 2011 +++ src/sys/arch/amd64/conf/GENERIC Wed Jul 13 07:52:49 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.322 2011/07/03 10:40:16 bouyer Exp $ +# $NetBSD: GENERIC,v 1.323 2011/07/13 07:52:49 jruoho Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.322 $" +#ident "GENERIC-$Revision: 1.323 $" maxusers 64 # estimated number of users @@ -301,6 +301,7 @@ #fdc* at acpi? # Floppy disk controller fujbp* at acpi? # Fujitsu Brightness & Pointer fujhk* at acpi? # Fujitsu Hotkeys +#hpacel* at acpi? # HP 3D DriveGuard accelerometer #hpqlb* at acpi? # HP Quick Launch Buttons hpet* at acpihpetbus? # High Precision Event Timer (table) hpet* at acpinodebus? # High Precision Event Timer (device) Index: src/sys/arch/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.310 src/sys/arch/i386/conf/ALL:1.311 --- src/sys/arch/i386/conf/ALL:1.310 Mon Jul 11 18:31:10 2011 +++ src/sys/arch/i386/conf/ALL Wed Jul 13 07:52:48 2011 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.310 2011/07/11 18:31:10 jmcneill Exp $ +# $NetBSD: ALL,v 1.311 2011/07/13 07:52:48 jruoho Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.310 $" +#ident "ALL-$Revision: 1.311 $" maxusers 64 # estimated number of users @@ -376,6 +376,7 @@ fdc* at acpi? # Floppy disk controller fujbp* at acpi? # Fujitsu Brightness & Pointer fujhk* at acpi? # Fujitsu Hotkeys +hpacel* at acpi? # HP 3D DriveGuard accelerometer hpqlb* at acpi? # HP Quick Launch Buttons hpet* at acpihpetbus? # High Precision Event Timer (table) hpet* at acpinodebus? # High Precision Event Timer (device) Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1037 src/sys/arch/i386/conf/GENERIC:1.1038 --- src/sys/arch/i386/conf/GENERIC:1.1037 Mon Jul 11 18:31:10 2011 +++ src/sys/arch/i386/conf/GENERIC Wed Jul 13 07:52:48 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1037 2011/07/11 18:31:10 jmcneill Exp $ +# $NetBSD: GENERIC,v 1.1038 2011/07/13 07:52:48 jruoho Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1037 $" +#ident "GENERIC-$Revision: 1.1038 $" maxusers 64 # estimated number of users @@ -366,6 +366,7 @@ #fdc* at acpi? # Floppy disk controller fujbp* at acpi? # Fujitsu B
CVS commit: src/usr.bin/locate/locate
Module Name:src Committed By: apb Date: Wed Jul 13 07:48:19 UTC 2011 Modified Files: src/usr.bin/locate/locate: updatedb.sh Log Message: Fix error in previous: The first character of $i should be removed only if it is '!', but it was removed in the wrong case branch. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/locate/locate/updatedb.sh 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/locate/locate/updatedb.sh diff -u src/usr.bin/locate/locate/updatedb.sh:1.12 src/usr.bin/locate/locate/updatedb.sh:1.13 --- src/usr.bin/locate/locate/updatedb.sh:1.12 Sun Jul 10 13:42:49 2011 +++ src/usr.bin/locate/locate/updatedb.sh Wed Jul 13 07:48:19 2011 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: updatedb.sh,v 1.12 2011/07/10 13:42:49 apb Exp $ +# $NetBSD: updatedb.sh,v 1.13 2011/07/13 07:48:19 apb Exp $ # # Copyright (c) 1989, 1993 # The Regents of the University of California. All rights reserved. @@ -89,11 +89,12 @@ SRCHPATHS="${SRCHPATHS}${SRCHPATHS:+ }$(shell_quote "$@")";; ignorefs) for i in "$@"; do +q="$(shell_quote "${i#\!}")" fs= case "$i" in none) ignorefs=;; -\!*) fs="! -fstype $(shell_quote "$i")";; -*) fs="-fstype $(shell_quote "${i#?}")";; +\!*) fs="! -fstype $q";; +*) fs="-fstype $q";; esac case "$fs" in '') ;;
CVS commit: src/sys
Module Name:src Committed By: jruoho Date: Wed Jul 13 07:34:56 UTC 2011 Modified Files: src/sys/arch/x86/acpi: acpi_cpu_md.c src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: Do not disable interrupts at machine-level in the MI idle-loop entry. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/x86/acpi/acpi_cpu_md.c cvs rdiff -u -r1.53 -r1.54 src/sys/dev/acpi/acpi_cpu_cstate.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/x86/acpi/acpi_cpu_md.c diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.63 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.64 --- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.63 Thu Jun 23 08:10:35 2011 +++ src/sys/arch/x86/acpi/acpi_cpu_md.c Wed Jul 13 07:34:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_md.c,v 1.63 2011/06/23 08:10:35 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_md.c,v 1.64 2011/07/13 07:34:55 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.63 2011/06/23 08:10:35 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.64 2011/07/13 07:34:55 jruoho Exp $"); #include #include @@ -397,19 +397,19 @@ } /* - * Called with interrupts disabled. - * Caller should enable interrupts after return. + * Called with interrupts enabled. */ void acpicpu_md_cstate_enter(int method, int state) { struct cpu_info *ci = curcpu(); + KASSERT(ci->ci_ilevel == IPL_NONE); + switch (method) { case ACPICPU_C_STATE_FFH: - x86_enable_intr(); x86_monitor(&ci->ci_want_resched, 0, 0); if (__predict_false(ci->ci_want_resched != 0)) @@ -420,8 +420,12 @@ case ACPICPU_C_STATE_HALT: - if (__predict_false(ci->ci_want_resched != 0)) + x86_disable_intr(); + + if (__predict_false(ci->ci_want_resched != 0)) { + x86_enable_intr(); return; + } x86_stihlt(); break; Index: src/sys/dev/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.53 src/sys/dev/acpi/acpi_cpu_cstate.c:1.54 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.53 Wed Jun 22 08:49:54 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Wed Jul 13 07:34:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.53 2011/06/22 08:49:54 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.54 2011/07/13 07:34:55 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.53 2011/06/22 08:49:54 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.54 2011/07/13 07:34:55 jruoho Exp $"); #include #include @@ -629,6 +629,8 @@ struct acpicpu_cstate *cs; int i; + KASSERT(mutex_owned(&sc->sc_mtx) != 0); + for (i = cs_state_max; i > 0; i--) { cs = &sc->sc_cstate[i]; @@ -658,30 +660,25 @@ struct acpicpu_softc *sc; int state; - acpi_md_OsDisableInterrupt(); - - if (__predict_false(ci->ci_want_resched != 0)) - goto out; - KASSERT(acpicpu_sc != NULL); KASSERT(ci->ci_acpiid < maxcpus); sc = acpicpu_sc[ci->ci_acpiid]; if (__predict_false(sc == NULL)) - goto out; + return; KASSERT(ci->ci_ilevel == IPL_NONE); KASSERT((sc->sc_flags & ACPICPU_FLAG_C) != 0); if (__predict_false(sc->sc_cold != false)) - goto out; + return; if (__predict_false(mutex_tryenter(&sc->sc_mtx) == 0)) - goto out; + return; - mutex_exit(&sc->sc_mtx); state = acpicpu_cstate_latency(sc); + mutex_exit(&sc->sc_mtx); /* * Apply AMD C1E quirk. @@ -743,11 +740,6 @@ if ((sc->sc_flags & ACPICPU_FLAG_C_ARB) != 0) (void)AcpiWriteBitRegister(ACPI_BITREG_ARB_DISABLE, 0); - - return; - -out: - acpi_md_OsEnableInterrupt(); } static void @@ -770,8 +762,6 @@ break; } - acpi_md_OsEnableInterrupt(); - cs->cs_evcnt.ev_count++; end = acpitimer_read_fast(NULL); sc->sc_cstate_sleep = hztoms(acpitimer_delta(end, start)) * 1000;