Mon Aug 1 12:28:54 2011 UTC ()
According to the Oxford Dictionary of Etymology, a wether is a male sheep
or ram.


(mbalmer)
diff -r1.19 -r1.20 src/libexec/atrun/atrun.c
diff -r1.3 -r1.4 src/share/terminfo/terminfo
diff -r1.27 -r1.28 src/sys/arch/macppc/dev/ams.c
diff -r1.10 -r1.11 src/sys/dev/adb/adb_ms.c
diff -r1.9 -r1.10 src/sys/dev/ic/smc90cx6var.h
diff -r1.42 -r1.43 src/sys/dev/ic/tropic.c
diff -r1.68 -r1.69 src/sys/dev/pci/machfb.c
diff -r1.1 -r1.2 src/sys/dev/pci/n8/common/api/n8_sks.c
diff -r1.27 -r1.28 src/sys/dev/raidframe/rf_dagdegrd.c
diff -r1.30 -r1.31 src/sys/dev/raidframe/rf_dagdegwr.c
diff -r1.12 -r1.13 src/sys/dev/raidframe/rf_pqdegdags.c
diff -r1.116 -r1.117 src/sys/dev/sysmon/sysmon_envsys.c
diff -r1.6 -r1.7 src/usr.sbin/syslogd/tls.c

cvs diff -r1.19 -r1.20 src/libexec/atrun/atrun.c (expand / switch to unified diff)

--- src/libexec/atrun/atrun.c 2008/04/05 20:17:37 1.19
+++ src/libexec/atrun/atrun.c 2011/08/01 12:28:54 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: atrun.c,v 1.19 2008/04/05 20:17:37 christos Exp $ */ 1/* $NetBSD: atrun.c,v 1.20 2011/08/01 12:28:54 mbalmer Exp $ */
2 2
3/* 3/*
4 * atrun.c - run jobs queued by at; run with root privileges. 4 * atrun.c - run jobs queued by at; run with root privileges.
5 * Copyright (C) 1993, 1994 Thomas Koenig 5 * Copyright (C) 1993, 1994 Thomas Koenig
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. The name of the author(s) may not be used to endorse or promote 12 * 2. The name of the author(s) may not be used to endorse or promote
13 * products derived from this software without specific prior written 13 * products derived from this software without specific prior written
14 * permission. 14 * permission.
@@ -49,27 +49,27 @@ @@ -49,27 +49,27 @@
49 49
50/* Local headers */ 50/* Local headers */
51 51
52#define MAIN 52#define MAIN
53#include "privs.h" 53#include "privs.h"
54#include "pathnames.h" 54#include "pathnames.h"
55#include "atrun.h" 55#include "atrun.h"
56 56
57/* File scope variables */ 57/* File scope variables */
58 58
59#if 0 59#if 0
60static char rcsid[] = "$OpenBSD: atrun.c,v 1.7 1997/09/08 22:12:10 millert Exp $"; 60static char rcsid[] = "$OpenBSD: atrun.c,v 1.7 1997/09/08 22:12:10 millert Exp $";
61#else 61#else
62__RCSID("$NetBSD: atrun.c,v 1.19 2008/04/05 20:17:37 christos Exp $"); 62__RCSID("$NetBSD: atrun.c,v 1.20 2011/08/01 12:28:54 mbalmer Exp $");
63#endif 63#endif
64 64
65static int debug = 0; 65static int debug = 0;
66 66
67/* Local functions */ 67/* Local functions */
68static void perr(const char *, ...) __dead; 68static void perr(const char *, ...) __dead;
69static void perrx(const char *, ...) __dead; 69static void perrx(const char *, ...) __dead;
70static int write_string(int, const char *); 70static int write_string(int, const char *);
71static void run_file(const char *, uid_t, gid_t); 71static void run_file(const char *, uid_t, gid_t);
72static void become_user(struct passwd *, uid_t); 72static void become_user(struct passwd *, uid_t);
73 73
74static const char nobody[] = "nobody"; 74static const char nobody[] = "nobody";
75 75
@@ -356,27 +356,27 @@ run_file(const char *filename, uid_t uid @@ -356,27 +356,27 @@ run_file(const char *filename, uid_t uid
356 perr("Exec failed for mail command `%s'", _PATH_SENDMAIL); 356 perr("Exec failed for mail command `%s'", _PATH_SENDMAIL);
357 357
358 PRIV_END; 358 PRIV_END;
359 } 359 }
360 exit(EXIT_SUCCESS); 360 exit(EXIT_SUCCESS);
361} 361}
362 362
363/* Global functions */ 363/* Global functions */
364 364
365int 365int
366main(int argc, char *argv[]) 366main(int argc, char *argv[])
367{ 367{
368 /* 368 /*
369 * Browse through _PATH_ATJOBS, checking all the jobfiles wether 369 * Browse through _PATH_ATJOBS, checking all the jobfiles whether
370 * they should be executed and or deleted. The queue is coded into 370 * they should be executed and or deleted. The queue is coded into
371 * the first byte of the job filename, the date (in minutes since 371 * the first byte of the job filename, the date (in minutes since
372 * Eon) as a hex number in the following eight bytes, followed by 372 * Eon) as a hex number in the following eight bytes, followed by
373 * a dot and a serial number. A file which has not been executed 373 * a dot and a serial number. A file which has not been executed
374 * yet is denoted by its execute - bit set. For those files which 374 * yet is denoted by its execute - bit set. For those files which
375 * are to be executed, run_file() is called, which forks off a 375 * are to be executed, run_file() is called, which forks off a
376 * child which takes care of I/O redirection, forks off another 376 * child which takes care of I/O redirection, forks off another
377 * child for execution and yet another one, optionally, for sending 377 * child for execution and yet another one, optionally, for sending
378 * mail. Files which already have run are removed during the 378 * mail. Files which already have run are removed during the
379 * next invocation. 379 * next invocation.
380 */ 380 */
381 DIR *spool; 381 DIR *spool;
382 struct dirent *dirent; 382 struct dirent *dirent;

cvs diff -r1.3 -r1.4 src/share/terminfo/terminfo (expand / switch to unified diff)

--- src/share/terminfo/terminfo 2011/06/19 16:27:23 1.3
+++ src/share/terminfo/terminfo 2011/08/01 12:28:54 1.4
@@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
1######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE 1######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE
2# 2#
3# This version of terminfo.src is distributed with ncurses and is maintained 3# This version of terminfo.src is distributed with ncurses and is maintained
4# by Thomas E. Dickey (TD). 4# by Thomas E. Dickey (TD).
5# 5#
6# Report bugs and new terminal descriptions to 6# Report bugs and new terminal descriptions to
7# bug-ncurses@gnu.org 7# bug-ncurses@gnu.org
8# 8#
9# $Revision: 1.3 $ 9# $Revision: 1.4 $
10# $Date: 2011/06/19 16:27:23 $ 10# $Date: 2011/08/01 12:28:54 $
11# 11#
12# The original header is preserved below for reference. It is noted that there 12# The original header is preserved below for reference. It is noted that there
13# is a "newer" version which differs in some cosmetic details (but actually 13# is a "newer" version which differs in some cosmetic details (but actually
14# stopped updates several years ago); we have decided to not change the header 14# stopped updates several years ago); we have decided to not change the header
15# unless there is also a change in content. 15# unless there is also a change in content.
16# 16#
17# To further muddy the waters, it is noted that changes to this file as part of 17# To further muddy the waters, it is noted that changes to this file as part of
18# maintenance of ncurses (since 1996) are generally conceded to be copyright 18# maintenance of ncurses (since 1996) are generally conceded to be copyright
19# under the ncurses MIT-style license. That was the effect of the agreement 19# under the ncurses MIT-style license. That was the effect of the agreement
20# which the principal authors of ncurses made in 1998. However, since much of 20# which the principal authors of ncurses made in 1998. However, since much of
21# the file itself is of unknown authorship (and the disclaimer below makes it 21# the file itself is of unknown authorship (and the disclaimer below makes it
22# obvious that Raymond cannot or will not convey rights over those parts), 22# obvious that Raymond cannot or will not convey rights over those parts),
23# there is no explicit copyright notice on the file itself. 23# there is no explicit copyright notice on the file itself.
@@ -9071,27 +9071,27 @@ wy85-w|wyse85-w|wyse 85 in 132-column mo @@ -9071,27 +9071,27 @@ wy85-w|wyse85-w|wyse 85 in 132-column mo
9071 rs2=\E[35h\E[?3h$<70>, use=wy85, 9071 rs2=\E[35h\E[?3h$<70>, use=wy85,
9072# 9072#
9073# Wyse 85 in 132-column mode with visual bell. 9073# Wyse 85 in 132-column mode with visual bell.
9074wy85-wvb|wyse85-wvb|wyse 85 with visible bell 132-columns, 9074wy85-wvb|wyse85-wvb|wyse 85 with visible bell 132-columns,
9075 bel@, use=wy85-w, 9075 bel@, use=wy85-w,
9076 9076
9077# From: Kevin Turner <kevint@aracnet.com>, 12 Jul 1998 9077# From: Kevin Turner <kevint@aracnet.com>, 12 Jul 1998
9078# This copes with an apparent firmware bug in the wy85. He writes: 9078# This copes with an apparent firmware bug in the wy85. He writes:
9079# "What I did was change leave the terminal cursor keys set to Normal 9079# "What I did was change leave the terminal cursor keys set to Normal
9080# (instead of application), and change \E[ to \233 for all the keys in 9080# (instead of application), and change \E[ to \233 for all the keys in
9081# terminfo. At one point, I found some reference indicating that this 9081# terminfo. At one point, I found some reference indicating that this
9082# terminal bug (not sending \E[) was acknowledged by Wyse (so it's not just 9082# terminal bug (not sending \E[) was acknowledged by Wyse (so it's not just
9083# me), but I can't find that and the server under my bookmark to "Wyse 9083# me), but I can't find that and the server under my bookmark to "Wyse
9084# Technical" isn't responding. So there's the question of wether the wy85 9084# Technical" isn't responding. So there's the question of whether the wy85
9085# terminfo should reflect the manufactuer's intended behaviour of the terminal 9085# terminfo should reflect the manufactuer's intended behaviour of the terminal
9086# or the actual." 9086# or the actual."
9087wy85-8bit|wyse85-8bit|wyse 85 in 8-bit mode, 9087wy85-8bit|wyse85-8bit|wyse 85 in 8-bit mode,
9088 am, hs, mc5i, mir, msgr, xenl, xon, 9088 am, hs, mc5i, mir, msgr, xenl, xon,
9089 cols#80, it#8, lines#24, wsl#80, 9089 cols#80, it#8, lines#24, wsl#80,
9090 acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 9090 acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
9091 bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, 9091 bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
9092 clear=\E[H\E[J$<110>, cnorm=\E[?25h, cr=^M, 9092 clear=\E[H\E[J$<110>, cnorm=\E[?25h, cr=^M,
9093 csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 9093 csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
9094 cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, 9094 cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
9095 cup=\E[%i%p1%d;%p2%dH$<1>, cuu=\E[%p1%dA, cuu1=\E[A, 9095 cup=\E[%i%p1%d;%p2%dH$<1>, cuu=\E[%p1%dA, cuu1=\E[A,
9096 dch=\E[%p1%dP$<3*>, dch1=\E[P$<3>, dim=\E[2m, 9096 dch=\E[%p1%dP$<3*>, dch1=\E[P$<3>, dim=\E[2m,
9097 dl=\E[%p1%dM$<3*>, dl1=\E[M$<3>, dsl=\E[40l, 9097 dl=\E[%p1%dM$<3*>, dl1=\E[M$<3>, dsl=\E[40l,

cvs diff -r1.27 -r1.28 src/sys/arch/macppc/dev/ams.c (expand / switch to unified diff)

--- src/sys/arch/macppc/dev/ams.c 2011/06/18 08:08:28 1.27
+++ src/sys/arch/macppc/dev/ams.c 2011/08/01 12:28:53 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ams.c,v 1.27 2011/06/18 08:08:28 matt Exp $ */ 1/* $NetBSD: ams.c,v 1.28 2011/08/01 12:28:53 mbalmer Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1998 Colin Wood 4 * Copyright (C) 1998 Colin Wood
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: ams.c,v 1.27 2011/06/18 08:08:28 matt Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: ams.c,v 1.28 2011/08/01 12:28:53 mbalmer Exp $");
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/device.h> 37#include <sys/device.h>
38#include <sys/fcntl.h> 38#include <sys/fcntl.h>
39#include <sys/poll.h> 39#include <sys/poll.h>
40#include <sys/select.h> 40#include <sys/select.h>
41#include <sys/proc.h> 41#include <sys/proc.h>
42#include <sys/signalvar.h> 42#include <sys/signalvar.h>
43#include <sys/systm.h> 43#include <sys/systm.h>
44#include <sys/sysctl.h> 44#include <sys/sysctl.h>
45#include <sys/sysctl.h> 45#include <sys/sysctl.h>
46 46
47#include <machine/autoconf.h> 47#include <machine/autoconf.h>
@@ -666,27 +666,27 @@ init_trackpad(struct ams_softc *sc) @@ -666,27 +666,27 @@ init_trackpad(struct ams_softc *sc)
666 666
667 cmd = ADBLISTEN(sc->adbaddr, 2); 667 cmd = ADBLISTEN(sc->adbaddr, 2);
668 adb_op_sync((Ptr)b3, NULL, (Ptr)0, cmd); 668 adb_op_sync((Ptr)b3, NULL, (Ptr)0, cmd);
669 669
670 cmd = ADBLISTEN(sc->adbaddr, 1); 670 cmd = ADBLISTEN(sc->adbaddr, 1);
671 b2[7] = 0x03; 671 b2[7] = 0x03;
672 adb_op_sync((Ptr)b2, NULL, (Ptr)0, cmd); 672 adb_op_sync((Ptr)b2, NULL, (Ptr)0, cmd);
673 673
674 buffer[0] = 0; 674 buffer[0] = 0;
675 cmd = ADBFLUSH(sc->adbaddr); 675 cmd = ADBFLUSH(sc->adbaddr);
676 adb_op_sync((Ptr)buffer, NULL, (Ptr)0, cmd); 676 adb_op_sync((Ptr)buffer, NULL, (Ptr)0, cmd);
677 677
678 /* 678 /*
679 * setup a sysctl node to control wether tapping the pad should 679 * setup a sysctl node to control whether tapping the pad should
680 * trigger mouse button events 680 * trigger mouse button events
681 */ 681 */
682 682
683 sc->sc_tapping = 1; 683 sc->sc_tapping = 1;
684  684
685 ret = sysctl_createv(NULL, 0, NULL, (const struct sysctlnode **)&me, 685 ret = sysctl_createv(NULL, 0, NULL, (const struct sysctlnode **)&me,
686 CTLFLAG_READWRITE, 686 CTLFLAG_READWRITE,
687 CTLTYPE_NODE, sc->sc_dev.dv_xname, NULL, 687 CTLTYPE_NODE, sc->sc_dev.dv_xname, NULL,
688 NULL, 0, NULL, 0, 688 NULL, 0, NULL, 0,
689 CTL_MACHDEP, CTL_CREATE, CTL_EOL); 689 CTL_MACHDEP, CTL_CREATE, CTL_EOL);
690 690
691 ret=sysctl_createv(NULL, 0, NULL, (const struct sysctlnode **)&node, 691 ret=sysctl_createv(NULL, 0, NULL, (const struct sysctlnode **)&node,
692 CTLFLAG_READWRITE | CTLFLAG_OWNDESC | CTLFLAG_IMMEDIATE, 692 CTLFLAG_READWRITE | CTLFLAG_OWNDESC | CTLFLAG_IMMEDIATE,

cvs diff -r1.10 -r1.11 src/sys/dev/adb/adb_ms.c (expand / switch to unified diff)

--- src/sys/dev/adb/adb_ms.c 2011/07/28 16:28:12 1.10
+++ src/sys/dev/adb/adb_ms.c 2011/08/01 12:28:53 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: adb_ms.c,v 1.10 2011/07/28 16:28:12 macallan Exp $ */ 1/* $NetBSD: adb_ms.c,v 1.11 2011/08/01 12:28:53 mbalmer Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1998 Colin Wood 4 * Copyright (C) 1998 Colin Wood
5 * Copyright (C) 2006, 2007 Michael Lorenz 5 * Copyright (C) 2006, 2007 Michael Lorenz
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: adb_ms.c,v 1.10 2011/07/28 16:28:12 macallan Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: adb_ms.c,v 1.11 2011/08/01 12:28:53 mbalmer Exp $");
36 36
37#include <sys/param.h> 37#include <sys/param.h>
38#include <sys/device.h> 38#include <sys/device.h>
39#include <sys/fcntl.h> 39#include <sys/fcntl.h>
40#include <sys/poll.h> 40#include <sys/poll.h>
41#include <sys/select.h> 41#include <sys/select.h>
42#include <sys/proc.h> 42#include <sys/proc.h>
43#include <sys/signalvar.h> 43#include <sys/signalvar.h>
44#include <sys/systm.h> 44#include <sys/systm.h>
45#include <sys/kernel.h> 45#include <sys/kernel.h>
46#include <sys/sysctl.h> 46#include <sys/sysctl.h>
47 47
48#include <machine/autoconf.h> 48#include <machine/autoconf.h>
@@ -714,27 +714,27 @@ init_trackpad(struct adbms_softc *sc) @@ -714,27 +714,27 @@ init_trackpad(struct adbms_softc *sc)
714 cmd = ADBLISTEN(addr, 2); 714 cmd = ADBLISTEN(addr, 2);
715 adbms_send_sync(sc, cmd, 8, b2); 715 adbms_send_sync(sc, cmd, 8, b2);
716 716
717 delay(1000); 717 delay(1000);
718 cmd = ADBLISTEN(addr, 1); 718 cmd = ADBLISTEN(addr, 1);
719 buffer[6] = 0x03; 719 buffer[6] = 0x03;
720 adbms_send_sync(sc, cmd, 8, buffer); 720 adbms_send_sync(sc, cmd, 8, buffer);
721 721
722 cmd = ADBFLUSH(addr); 722 cmd = ADBFLUSH(addr);
723 adbms_send_sync(sc, cmd, 0, NULL); 723 adbms_send_sync(sc, cmd, 0, NULL);
724 delay(1000); 724 delay(1000);
725 725
726 /* 726 /*
727 * setup a sysctl node to control wether tapping the pad should 727 * setup a sysctl node to control whether tapping the pad should
728 * trigger mouse button events 728 * trigger mouse button events
729 */ 729 */
730 730
731 sc->sc_tapping = 1; 731 sc->sc_tapping = 1;
732  732
733 ret = sysctl_createv(NULL, 0, NULL, &me, 733 ret = sysctl_createv(NULL, 0, NULL, &me,
734 CTLFLAG_READWRITE, 734 CTLFLAG_READWRITE,
735 CTLTYPE_NODE, device_xname(sc->sc_dev), NULL, 735 CTLTYPE_NODE, device_xname(sc->sc_dev), NULL,
736 NULL, 0, NULL, 0, 736 NULL, 0, NULL, 0,
737 CTL_MACHDEP, CTL_CREATE, CTL_EOL); 737 CTL_MACHDEP, CTL_CREATE, CTL_EOL);
738 738
739 ret = sysctl_createv(NULL, 0, NULL, &node, 739 ret = sysctl_createv(NULL, 0, NULL, &node,
740 CTLFLAG_READWRITE | CTLFLAG_OWNDESC, 740 CTLFLAG_READWRITE | CTLFLAG_OWNDESC,

cvs diff -r1.9 -r1.10 src/sys/dev/ic/smc90cx6var.h (expand / switch to unified diff)

--- src/sys/dev/ic/smc90cx6var.h 2008/04/28 20:23:51 1.9
+++ src/sys/dev/ic/smc90cx6var.h 2011/08/01 12:28:53 1.10
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: smc90cx6var.h,v 1.9 2008/04/28 20:23:51 martin Exp $ */ 1/* $NetBSD: smc90cx6var.h,v 1.10 2011/08/01 12:28:53 mbalmer Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Ignatios Souvatzis. 8 * by Ignatios Souvatzis.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -28,27 +28,27 @@ @@ -28,27 +28,27 @@
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * BAH (SMC 8bit ARCnet chipset) k/dpi 33 * BAH (SMC 8bit ARCnet chipset) k/dpi
34 * 34 *
35 * The SMC 8bit ARCnet chip family uses a register and a memory window, which 35 * The SMC 8bit ARCnet chip family uses a register and a memory window, which
36 * we get passed via bus_space_tags and bus_space_handles. 36 * we get passed via bus_space_tags and bus_space_handles.
37 * 37 *
38 * As the reset functionality differs between the Amiga boards (using the 38 * As the reset functionality differs between the Amiga boards (using the
39 * 90c26 chip) and middle-aged ISA boards (using the 90c56 chip), we have 39 * 90c26 chip) and middle-aged ISA boards (using the 90c56 chip), we have
40 * a sc_reset callback function in the softc, which does a stop function 40 * a sc_reset callback function in the softc, which does a stop function
41 * (reset and leave dead) or a reset function depending on wether the 2nd 41 * (reset and leave dead) or a reset function depending on whether the 2nd
42 * parameter is 0 or 1. 42 * parameter is 0 or 1.
43 */ 43 */
44 44
45#ifndef _SMC90CX6VAR_H_ 45#ifndef _SMC90CX6VAR_H_
46#define _SMC90CX6VAR_H_ 46#define _SMC90CX6VAR_H_
47 47
48#include <sys/callout.h> 48#include <sys/callout.h>
49 49
50struct bah_softc { 50struct bah_softc {
51 struct device sc_dev; 51 struct device sc_dev;
52 struct arccom sc_arccom; /* Common arcnet structures */ 52 struct arccom sc_arccom; /* Common arcnet structures */
53 bus_space_tag_t sc_bst_r, sc_bst_m; 53 bus_space_tag_t sc_bst_r, sc_bst_m;
54 bus_space_handle_t sc_regs, sc_mem; 54 bus_space_handle_t sc_regs, sc_mem;

cvs diff -r1.42 -r1.43 src/sys/dev/ic/Attic/tropic.c (expand / switch to unified diff)

--- src/sys/dev/ic/Attic/tropic.c 2010/04/05 07:19:37 1.42
+++ src/sys/dev/ic/Attic/tropic.c 2011/08/01 12:28:53 1.43
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: tropic.c,v 1.42 2010/04/05 07:19:37 joerg Exp $ */ 1/* $NetBSD: tropic.c,v 1.43 2011/08/01 12:28:53 mbalmer Exp $ */
2 2
3/* 3/*
4 * Ported to NetBSD by Onno van der Linden 4 * Ported to NetBSD by Onno van der Linden
5 * Many thanks to Larry Lile for sending me the IBM TROPIC documentation. 5 * Many thanks to Larry Lile for sending me the IBM TROPIC documentation.
6 * 6 *
7 * Mach Operating System 7 * Mach Operating System
8 * Copyright (c) 1991 Carnegie Mellon University 8 * Copyright (c) 1991 Carnegie Mellon University
9 * Copyright (c) 1991 IBM Corporation 9 * Copyright (c) 1991 IBM Corporation
10 * All Rights Reserved. 10 * All Rights Reserved.
11 * 11 *
12 * Permission to use, copy, modify and distribute this software and its 12 * Permission to use, copy, modify and distribute this software and its
13 * documentation is hereby granted, provided that both the copyright 13 * documentation is hereby granted, provided that both the copyright
14 * notice and this permission notice appear in all copies of the 14 * notice and this permission notice appear in all copies of the
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * 24 *
25 * Carnegie Mellon requests users of this software to return to 25 * Carnegie Mellon requests users of this software to return to
26 * 26 *
27 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 27 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
28 * School of Computer Science 28 * School of Computer Science
29 * Carnegie Mellon University 29 * Carnegie Mellon University
30 * Pittsburgh PA 15213-3890 30 * Pittsburgh PA 15213-3890
31 * 31 *
32 * any improvements or extensions that they make and grant Carnegie Mellon 32 * any improvements or extensions that they make and grant Carnegie Mellon
33 * the rights to redistribute these changes. 33 * the rights to redistribute these changes.
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37__KERNEL_RCSID(0, "$NetBSD: tropic.c,v 1.42 2010/04/05 07:19:37 joerg Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: tropic.c,v 1.43 2011/08/01 12:28:53 mbalmer Exp $");
38 38
39#include "opt_inet.h" 39#include "opt_inet.h"
40 40
41#include <sys/param.h> 41#include <sys/param.h>
42#include <sys/systm.h> 42#include <sys/systm.h>
43#include <sys/callout.h> 43#include <sys/callout.h>
44#include <sys/kernel.h> 44#include <sys/kernel.h>
45#include <sys/proc.h> 45#include <sys/proc.h>
46#include <sys/mbuf.h> 46#include <sys/mbuf.h>
47#include <sys/buf.h> 47#include <sys/buf.h>
48#include <sys/socket.h> 48#include <sys/socket.h>
49#include <sys/syslog.h> 49#include <sys/syslog.h>
50#include <sys/ioctl.h> 50#include <sys/ioctl.h>
@@ -201,27 +201,27 @@ tr_config(struct tr_softc *sc) @@ -201,27 +201,27 @@ tr_config(struct tr_softc *sc)
201 } 201 }
202 202
203 sc->sc_txca = SRB_INW(sc, sc->sc_srb, SRB_CFPRESP_FPXMIT); 203 sc->sc_txca = SRB_INW(sc, sc->sc_srb, SRB_CFPRESP_FPXMIT);
204 sc->sc_srb = SRB_INW(sc, sc->sc_srb, SRB_CFPRESP_SRBADDR); 204 sc->sc_srb = SRB_INW(sc, sc->sc_srb, SRB_CFPRESP_SRBADDR);
205 } 205 }
206 else { 206 else {
207 if (sc->sc_init_status & RSP_16) 207 if (sc->sc_init_status & RSP_16)
208 sc->sc_maxmtu = sc->sc_dhb16maxsz; 208 sc->sc_maxmtu = sc->sc_dhb16maxsz;
209 else 209 else
210 sc->sc_maxmtu = sc->sc_dhb4maxsz; 210 sc->sc_maxmtu = sc->sc_dhb4maxsz;
211/* 211/*
212 * XXX Not completely true because Fast Path Transmit has 514 byte buffers 212 * XXX Not completely true because Fast Path Transmit has 514 byte buffers
213 * XXX and TR_MAX_LINK_HDR is only correct when source-routing is used. 213 * XXX and TR_MAX_LINK_HDR is only correct when source-routing is used.
214 * XXX depending on wether source routing is used change the calculation 214 * XXX depending on whether source routing is used change the calculation
215 * XXX use IFM_TOK_SRCRT (IFF_LINK0) 215 * XXX use IFM_TOK_SRCRT (IFF_LINK0)
216 * XXX recompute sc_minbuf !! 216 * XXX recompute sc_minbuf !!
217 */ 217 */
218 sc->sc_maxmtu -= TR_MAX_LINK_HDR; 218 sc->sc_maxmtu -= TR_MAX_LINK_HDR;
219 } 219 }
220 return 0; 220 return 0;
221} 221}
222 222
223int 223int
224tr_attach(struct tr_softc *sc) 224tr_attach(struct tr_softc *sc)
225{ 225{
226 int nmedia, *mediaptr, *defmediaptr; 226 int nmedia, *mediaptr, *defmediaptr;
227 int i, temp; 227 int i, temp;

cvs diff -r1.68 -r1.69 src/sys/dev/pci/machfb.c (expand / switch to unified diff)

--- src/sys/dev/pci/machfb.c 2011/06/29 03:15:18 1.68
+++ src/sys/dev/pci/machfb.c 2011/08/01 12:28:53 1.69
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machfb.c,v 1.68 2011/06/29 03:15:18 macallan Exp $ */ 1/* $NetBSD: machfb.c,v 1.69 2011/08/01 12:28:53 mbalmer Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2002 Bang Jun-Young 4 * Copyright (c) 2002 Bang Jun-Young
5 * Copyright (c) 2005, 2006, 2007 Michael Lorenz 5 * Copyright (c) 2005, 2006, 2007 Michael Lorenz
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31/* 31/*
32 * Some code is derived from ATI Rage Pro and Derivatives Programmer's Guide. 32 * Some code is derived from ATI Rage Pro and Derivatives Programmer's Guide.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0,  36__KERNEL_RCSID(0,
37 "$NetBSD: machfb.c,v 1.68 2011/06/29 03:15:18 macallan Exp $"); 37 "$NetBSD: machfb.c,v 1.69 2011/08/01 12:28:53 mbalmer Exp $");
38 38
39#include <sys/param.h> 39#include <sys/param.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/kernel.h> 41#include <sys/kernel.h>
42#include <sys/device.h> 42#include <sys/device.h>
43#include <sys/malloc.h> 43#include <sys/malloc.h>
44#include <sys/callout.h> 44#include <sys/callout.h>
45#include <sys/lwp.h> 45#include <sys/lwp.h>
46#include <sys/kauth.h> 46#include <sys/kauth.h>
47 47
48#include <dev/videomode/videomode.h> 48#include <dev/videomode/videomode.h>
49#include <dev/videomode/edidvar.h> 49#include <dev/videomode/edidvar.h>
50 50
@@ -845,27 +845,27 @@ mach64_init_screen(void *cookie, struct  @@ -845,27 +845,27 @@ mach64_init_screen(void *cookie, struct
845 ri->ri_ops.erasecols = mach64_erasecols; 845 ri->ri_ops.erasecols = mach64_erasecols;
846 ri->ri_ops.cursor = mach64_cursor; 846 ri->ri_ops.cursor = mach64_cursor;
847 ri->ri_ops.putchar = mach64_putchar; 847 ri->ri_ops.putchar = mach64_putchar;
848} 848}
849 849
850static void 850static void
851mach64_init(struct mach64_softc *sc) 851mach64_init(struct mach64_softc *sc)
852{ 852{
853 uint32_t *p32, saved_value; 853 uint32_t *p32, saved_value;
854 uint8_t *p; 854 uint8_t *p;
855 int need_swap; 855 int need_swap;
856 856
857 /* 857 /*
858 * Test wether the aperture is byte swapped or not 858 * Test whether the aperture is byte swapped or not
859 */ 859 */
860 p32 = (uint32_t*)sc->sc_aperture; 860 p32 = (uint32_t*)sc->sc_aperture;
861 saved_value = *p32; 861 saved_value = *p32;
862 p = (uint8_t*)(u_long)sc->sc_aperture; 862 p = (uint8_t*)(u_long)sc->sc_aperture;
863 *p32 = 0x12345678; 863 *p32 = 0x12345678;
864 if (p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78) 864 if (p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78)
865 need_swap = 0; 865 need_swap = 0;
866 else 866 else
867 need_swap = 1; 867 need_swap = 1;
868 if (need_swap) { 868 if (need_swap) {
869 sc->sc_aperture = (char *)sc->sc_aperture + 0x800000; 869 sc->sc_aperture = (char *)sc->sc_aperture + 0x800000;
870#if 0 870#if 0
871 /* what the fsck is this for? */ 871 /* what the fsck is this for? */

cvs diff -r1.1 -r1.2 src/sys/dev/pci/n8/common/api/Attic/n8_sks.c (expand / switch to unified diff)

--- src/sys/dev/pci/n8/common/api/Attic/n8_sks.c 2008/10/30 12:02:15 1.1
+++ src/sys/dev/pci/n8/common/api/Attic/n8_sks.c 2011/08/01 12:28:54 1.2
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35static char const n8_id[] = "$Id: n8_sks.c,v 1.1 2008/10/30 12:02:15 darran Exp $"; 35static char const n8_id[] = "$Id: n8_sks.c,v 1.2 2011/08/01 12:28:54 mbalmer Exp $";
36/*****************************************************************************/ 36/*****************************************************************************/
37/** @file SKS_Management_Interface 37/** @file SKS_Management_Interface
38 * @brief Implementation for the SKS Management Interface. 38 * @brief Implementation for the SKS Management Interface.
39 * 39 *
40 * Allows for the initialization and subsequent key management of associated 40 * Allows for the initialization and subsequent key management of associated
41 * SKS PROMs. 41 * SKS PROMs.
42 * 42 *
43 *****************************************************************************/ 43 *****************************************************************************/
44 44
45 45
46/***************************************************************************** 46/*****************************************************************************
47 * Revision history: 47 * Revision history:
48 * 48 *
@@ -1006,27 +1006,27 @@ N8_Status_t N8_SKSFree(N8_SKSKeyHandle_t @@ -1006,27 +1006,27 @@ N8_Status_t N8_SKSFree(N8_SKSKeyHandle_t
1006} /* N8_SKSFree */ 1006} /* N8_SKSFree */
1007 1007
1008 1008
1009/***************************************************************************** 1009/*****************************************************************************
1010 * N8_SKSGetKeyHandle 1010 * N8_SKSGetKeyHandle
1011 *****************************************************************************/ 1011 *****************************************************************************/
1012/** @ingroup n8_sks 1012/** @ingroup n8_sks
1013 * @brief Reads a key handle data from a named key entry for an SKS PROM. 1013 * @brief Reads a key handle data from a named key entry for an SKS PROM.
1014 * 1014 *
1015 * @param systemKeyNode RW: A char pointer, the named key entry. 1015 * @param systemKeyNode RW: A char pointer, the named key entry.
1016 * @param keyHandle_p WO: A N8_SKSKeyHandle_t pointer. 1016 * @param keyHandle_p WO: A N8_SKSKeyHandle_t pointer.
1017 * 1017 *
1018 * @par Externals: 1018 * @par Externals:
1019 * SKS_initialized_g RW: A boolean value that indicates wether the SKS 1019 * SKS_initialized_g RW: A boolean value that indicates whether the SKS
1020 * admin interface API has been initialized. 1020 * admin interface API has been initialized.
1021 * @return  1021 * @return
1022 * N8_STATUS_OK indicates the key read successfully completed. 1022 * N8_STATUS_OK indicates the key read successfully completed.
1023 * N8_UNEXPECTED_ERROR indicates an error reading the SKS key entry or that  1023 * N8_UNEXPECTED_ERROR indicates an error reading the SKS key entry or that
1024 * the API was not or could not be initialized. 1024 * the API was not or could not be initialized.
1025 * 1025 *
1026 *****************************************************************************/ 1026 *****************************************************************************/
1027N8_Status_t N8_SKSGetKeyHandle(const N8_Buffer_t* keyEntryName, 1027N8_Status_t N8_SKSGetKeyHandle(const N8_Buffer_t* keyEntryName,
1028 N8_SKSKeyHandle_t* keyHandle_p) 1028 N8_SKSKeyHandle_t* keyHandle_p)
1029{ 1029{
1030 1030
1031 N8_Status_t ret = N8_STATUS_OK; 1031 N8_Status_t ret = N8_STATUS_OK;
1032 char fullFileName[1024]; 1032 char fullFileName[1024];

cvs diff -r1.27 -r1.28 src/sys/dev/raidframe/rf_dagdegrd.c (expand / switch to unified diff)

--- src/sys/dev/raidframe/rf_dagdegrd.c 2006/11/16 01:33:23 1.27
+++ src/sys/dev/raidframe/rf_dagdegrd.c 2011/08/01 12:28:53 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rf_dagdegrd.c,v 1.27 2006/11/16 01:33:23 christos Exp $ */ 1/* $NetBSD: rf_dagdegrd.c,v 1.28 2011/08/01 12:28:53 mbalmer Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Carnegie-Mellon University. 3 * Copyright (c) 1995 Carnegie-Mellon University.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Author: Mark Holland, Daniel Stodolsky, William V. Courtright II 6 * Author: Mark Holland, Daniel Stodolsky, William V. Courtright II
7 * 7 *
8 * Permission to use, copy, modify and distribute this software and 8 * Permission to use, copy, modify and distribute this software and
9 * its documentation is hereby granted, provided that both the copyright 9 * its documentation is hereby granted, provided that both the copyright
10 * notice and this permission notice appear in all copies of the 10 * notice and this permission notice appear in all copies of the
11 * software, derivative works or modified versions, and any portions 11 * software, derivative works or modified versions, and any portions
12 * thereof, and that both notices appear in supporting documentation. 12 * thereof, and that both notices appear in supporting documentation.
13 * 13 *
14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * Pittsburgh PA 15213-3890 23 * Pittsburgh PA 15213-3890
24 * 24 *
25 * any improvements or extensions that they make and grant Carnegie the 25 * any improvements or extensions that they make and grant Carnegie the
26 * rights to redistribute these changes. 26 * rights to redistribute these changes.
27 */ 27 */
28 28
29/* 29/*
30 * rf_dagdegrd.c 30 * rf_dagdegrd.c
31 * 31 *
32 * code for creating degraded read DAGs 32 * code for creating degraded read DAGs
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: rf_dagdegrd.c,v 1.27 2006/11/16 01:33:23 christos Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: rf_dagdegrd.c,v 1.28 2011/08/01 12:28:53 mbalmer Exp $");
37 37
38#include <dev/raidframe/raidframevar.h> 38#include <dev/raidframe/raidframevar.h>
39 39
40#include "rf_archs.h" 40#include "rf_archs.h"
41#include "rf_raid.h" 41#include "rf_raid.h"
42#include "rf_dag.h" 42#include "rf_dag.h"
43#include "rf_dagutils.h" 43#include "rf_dagutils.h"
44#include "rf_dagfuncs.h" 44#include "rf_dagfuncs.h"
45#include "rf_debugMem.h" 45#include "rf_debugMem.h"
46#include "rf_general.h" 46#include "rf_general.h"
47#include "rf_dagdegrd.h" 47#include "rf_dagdegrd.h"
48#include "rf_map.h" 48#include "rf_map.h"
49 49
@@ -711,27 +711,27 @@ rf_DD_GenerateFailedAccessASMs(RF_Raid_t @@ -711,27 +711,27 @@ rf_DD_GenerateFailedAccessASMs(RF_Raid_t
711 RF_SectorCount_t secPerSU = layoutPtr->sectorsPerStripeUnit; 711 RF_SectorCount_t secPerSU = layoutPtr->sectorsPerStripeUnit;
712 int numDataCol = layoutPtr->numDataCol; 712 int numDataCol = layoutPtr->numDataCol;
713 int state; 713 int state;
714 RF_SectorNum_t suoff, suend; 714 RF_SectorNum_t suoff, suend;
715 unsigned firstDataCol, napdas, count; 715 unsigned firstDataCol, napdas, count;
716 RF_SectorNum_t fone_start, fone_end, ftwo_start = 0, ftwo_end = 0; 716 RF_SectorNum_t fone_start, fone_end, ftwo_start = 0, ftwo_end = 0;
717 RF_PhysDiskAddr_t *fone = asmap->failedPDAs[0], *ftwo = asmap->failedPDAs[1]; 717 RF_PhysDiskAddr_t *fone = asmap->failedPDAs[0], *ftwo = asmap->failedPDAs[1];
718 RF_PhysDiskAddr_t *pda_p; 718 RF_PhysDiskAddr_t *pda_p;
719 RF_PhysDiskAddr_t *phys_p; 719 RF_PhysDiskAddr_t *phys_p;
720 RF_RaidAddr_t sosAddr; 720 RF_RaidAddr_t sosAddr;
721 721
722 /* determine how many pda's we will have to generate per unaccess 722 /* determine how many pda's we will have to generate per unaccess
723 * stripe. If there is only one failed data unit, it is one; if two, 723 * stripe. If there is only one failed data unit, it is one; if two,
724 * possibly two, depending wether they overlap. */ 724 * possibly two, depending whether they overlap. */
725 725
726 fone_start = rf_StripeUnitOffset(layoutPtr, fone->startSector); 726 fone_start = rf_StripeUnitOffset(layoutPtr, fone->startSector);
727 fone_end = fone_start + fone->numSector; 727 fone_end = fone_start + fone->numSector;
728 728
729#define CONS_PDA(if,start,num) \ 729#define CONS_PDA(if,start,num) \
730 pda_p->col = asmap->if->col; \ 730 pda_p->col = asmap->if->col; \
731 pda_p->startSector = ((asmap->if->startSector / secPerSU) * secPerSU) + start; \ 731 pda_p->startSector = ((asmap->if->startSector / secPerSU) * secPerSU) + start; \
732 pda_p->numSector = num; \ 732 pda_p->numSector = num; \
733 pda_p->next = NULL; \ 733 pda_p->next = NULL; \
734 RF_MallocAndAdd(pda_p->bufPtr,rf_RaidAddressToByte(raidPtr,num),(char *), allocList) 734 RF_MallocAndAdd(pda_p->bufPtr,rf_RaidAddressToByte(raidPtr,num),(char *), allocList)
735 735
736 if (asmap->numDataFailed == 1) { 736 if (asmap->numDataFailed == 1) {
737 PDAPerDisk = 1; 737 PDAPerDisk = 1;

cvs diff -r1.30 -r1.31 src/sys/dev/raidframe/rf_dagdegwr.c (expand / switch to unified diff)

--- src/sys/dev/raidframe/rf_dagdegwr.c 2006/11/16 01:33:23 1.30
+++ src/sys/dev/raidframe/rf_dagdegwr.c 2011/08/01 12:28:53 1.31
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rf_dagdegwr.c,v 1.30 2006/11/16 01:33:23 christos Exp $ */ 1/* $NetBSD: rf_dagdegwr.c,v 1.31 2011/08/01 12:28:53 mbalmer Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Carnegie-Mellon University. 3 * Copyright (c) 1995 Carnegie-Mellon University.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Author: Mark Holland, Daniel Stodolsky, William V. Courtright II 6 * Author: Mark Holland, Daniel Stodolsky, William V. Courtright II
7 * 7 *
8 * Permission to use, copy, modify and distribute this software and 8 * Permission to use, copy, modify and distribute this software and
9 * its documentation is hereby granted, provided that both the copyright 9 * its documentation is hereby granted, provided that both the copyright
10 * notice and this permission notice appear in all copies of the 10 * notice and this permission notice appear in all copies of the
11 * software, derivative works or modified versions, and any portions 11 * software, derivative works or modified versions, and any portions
12 * thereof, and that both notices appear in supporting documentation. 12 * thereof, and that both notices appear in supporting documentation.
13 * 13 *
14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * 24 *
25 * any improvements or extensions that they make and grant Carnegie the 25 * any improvements or extensions that they make and grant Carnegie the
26 * rights to redistribute these changes. 26 * rights to redistribute these changes.
27 */ 27 */
28 28
29/* 29/*
30 * rf_dagdegwr.c 30 * rf_dagdegwr.c
31 * 31 *
32 * code for creating degraded write DAGs 32 * code for creating degraded write DAGs
33 * 33 *
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37__KERNEL_RCSID(0, "$NetBSD: rf_dagdegwr.c,v 1.30 2006/11/16 01:33:23 christos Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: rf_dagdegwr.c,v 1.31 2011/08/01 12:28:53 mbalmer Exp $");
38 38
39#include <dev/raidframe/raidframevar.h> 39#include <dev/raidframe/raidframevar.h>
40 40
41#include "rf_raid.h" 41#include "rf_raid.h"
42#include "rf_dag.h" 42#include "rf_dag.h"
43#include "rf_dagutils.h" 43#include "rf_dagutils.h"
44#include "rf_dagfuncs.h" 44#include "rf_dagfuncs.h"
45#include "rf_debugMem.h" 45#include "rf_debugMem.h"
46#include "rf_general.h" 46#include "rf_general.h"
47#include "rf_dagdegwr.h" 47#include "rf_dagdegwr.h"
48#include "rf_map.h" 48#include "rf_map.h"
49 49
50 50
@@ -580,27 +580,27 @@ rf_WriteGenerateFailedAccessASMs( @@ -580,27 +580,27 @@ rf_WriteGenerateFailedAccessASMs(
580 RF_RaidLayout_t *layoutPtr = &(raidPtr->Layout); 580 RF_RaidLayout_t *layoutPtr = &(raidPtr->Layout);
581 int PDAPerDisk, i; 581 int PDAPerDisk, i;
582 RF_SectorCount_t secPerSU = layoutPtr->sectorsPerStripeUnit; 582 RF_SectorCount_t secPerSU = layoutPtr->sectorsPerStripeUnit;
583 int numDataCol = layoutPtr->numDataCol; 583 int numDataCol = layoutPtr->numDataCol;
584 int state; 584 int state;
585 unsigned napdas; 585 unsigned napdas;
586 RF_SectorNum_t fone_start, fone_end, ftwo_start = 0, ftwo_end; 586 RF_SectorNum_t fone_start, fone_end, ftwo_start = 0, ftwo_end;
587 RF_PhysDiskAddr_t *fone = asmap->failedPDAs[0], *ftwo = asmap->failedPDAs[1]; 587 RF_PhysDiskAddr_t *fone = asmap->failedPDAs[0], *ftwo = asmap->failedPDAs[1];
588 RF_PhysDiskAddr_t *pda_p; 588 RF_PhysDiskAddr_t *pda_p;
589 RF_RaidAddr_t sosAddr; 589 RF_RaidAddr_t sosAddr;
590 590
591 /* determine how many pda's we will have to generate per unaccess 591 /* determine how many pda's we will have to generate per unaccess
592 * stripe. If there is only one failed data unit, it is one; if two, 592 * stripe. If there is only one failed data unit, it is one; if two,
593 * possibly two, depending wether they overlap. */ 593 * possibly two, depending whether they overlap. */
594 594
595 fone_start = rf_StripeUnitOffset(layoutPtr, fone->startSector); 595 fone_start = rf_StripeUnitOffset(layoutPtr, fone->startSector);
596 fone_end = fone_start + fone->numSector; 596 fone_end = fone_start + fone->numSector;
597 597
598 if (asmap->numDataFailed == 1) { 598 if (asmap->numDataFailed == 1) {
599 PDAPerDisk = 1; 599 PDAPerDisk = 1;
600 state = 1; 600 state = 1;
601 RF_MallocAndAdd(*pqpdap, 2 * sizeof(RF_PhysDiskAddr_t), (RF_PhysDiskAddr_t *), allocList); 601 RF_MallocAndAdd(*pqpdap, 2 * sizeof(RF_PhysDiskAddr_t), (RF_PhysDiskAddr_t *), allocList);
602 pda_p = *pqpdap; 602 pda_p = *pqpdap;
603 /* build p */ 603 /* build p */
604 CONS_PDA(parityInfo, fone_start, fone->numSector); 604 CONS_PDA(parityInfo, fone_start, fone->numSector);
605 pda_p->type = RF_PDA_TYPE_PARITY; 605 pda_p->type = RF_PDA_TYPE_PARITY;
606 pda_p++; 606 pda_p++;

cvs diff -r1.12 -r1.13 src/sys/dev/raidframe/rf_pqdegdags.c (expand / switch to unified diff)

--- src/sys/dev/raidframe/rf_pqdegdags.c 2009/03/14 15:36:20 1.12
+++ src/sys/dev/raidframe/rf_pqdegdags.c 2011/08/01 12:28:53 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rf_pqdegdags.c,v 1.12 2009/03/14 15:36:20 dsl Exp $ */ 1/* $NetBSD: rf_pqdegdags.c,v 1.13 2011/08/01 12:28:53 mbalmer Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Carnegie-Mellon University. 3 * Copyright (c) 1995 Carnegie-Mellon University.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Author: Daniel Stodolsky 6 * Author: Daniel Stodolsky
7 * 7 *
8 * Permission to use, copy, modify and distribute this software and 8 * Permission to use, copy, modify and distribute this software and
9 * its documentation is hereby granted, provided that both the copyright 9 * its documentation is hereby granted, provided that both the copyright
10 * notice and this permission notice appear in all copies of the 10 * notice and this permission notice appear in all copies of the
11 * software, derivative works or modified versions, and any portions 11 * software, derivative works or modified versions, and any portions
12 * thereof, and that both notices appear in supporting documentation. 12 * thereof, and that both notices appear in supporting documentation.
13 * 13 *
14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * Pittsburgh PA 15213-3890 23 * Pittsburgh PA 15213-3890
24 * 24 *
25 * any improvements or extensions that they make and grant Carnegie the 25 * any improvements or extensions that they make and grant Carnegie the
26 * rights to redistribute these changes. 26 * rights to redistribute these changes.
27 */ 27 */
28 28
29/* 29/*
30 * rf_pqdegdags.c 30 * rf_pqdegdags.c
31 * Degraded mode dags for double fault cases. 31 * Degraded mode dags for double fault cases.
32*/ 32*/
33 33
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: rf_pqdegdags.c,v 1.12 2009/03/14 15:36:20 dsl Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: rf_pqdegdags.c,v 1.13 2011/08/01 12:28:53 mbalmer Exp $");
37 37
38#include "rf_archs.h" 38#include "rf_archs.h"
39 39
40#if (RF_INCLUDE_DECL_PQ > 0) || (RF_INCLUDE_RAID6 > 0) 40#if (RF_INCLUDE_DECL_PQ > 0) || (RF_INCLUDE_RAID6 > 0)
41 41
42#include <dev/raidframe/raidframevar.h> 42#include <dev/raidframe/raidframevar.h>
43 43
44#include "rf_raid.h" 44#include "rf_raid.h"
45#include "rf_dag.h" 45#include "rf_dag.h"
46#include "rf_dagdegrd.h" 46#include "rf_dagdegrd.h"
47#include "rf_dagdegwr.h" 47#include "rf_dagdegwr.h"
48#include "rf_dagfuncs.h" 48#include "rf_dagfuncs.h"
49#include "rf_dagutils.h" 49#include "rf_dagutils.h"
@@ -165,27 +165,27 @@ applyPDA(RF_Raid_t *raidPtr, RF_PhysDisk @@ -165,27 +165,27 @@ applyPDA(RF_Raid_t *raidPtr, RF_PhysDisk
165/* 165/*
166 Recover data in the case of a double failure. There can be two 166 Recover data in the case of a double failure. There can be two
167 result buffers, one for each chunk of data trying to be recovered. 167 result buffers, one for each chunk of data trying to be recovered.
168 The params are pda's that have not been range restricted or otherwise 168 The params are pda's that have not been range restricted or otherwise
169 politely massaged - this should be done here. The last params are the 169 politely massaged - this should be done here. The last params are the
170 pdas of P and Q, followed by the raidPtr. The list can look like 170 pdas of P and Q, followed by the raidPtr. The list can look like
171 171
172 pda, pda, ... , p pda, q pda, raidptr, asm 172 pda, pda, ... , p pda, q pda, raidptr, asm
173 173
174 or 174 or
175 175
176 pda, pda, ... , p_1 pda, p_2 pda, q_1 pda, q_2 pda, raidptr, asm 176 pda, pda, ... , p_1 pda, p_2 pda, q_1 pda, q_2 pda, raidptr, asm
177 177
178 depending on wether two chunks of recovery data were required. 178 depending on whether two chunks of recovery data were required.
179 179
180 The second condition only arises if there are two failed buffers 180 The second condition only arises if there are two failed buffers
181 whose lengths do not add up a stripe unit. 181 whose lengths do not add up a stripe unit.
182*/ 182*/
183 183
184 184
185int 185int
186rf_PQDoubleRecoveryFunc(RF_DagNode_t *node) 186rf_PQDoubleRecoveryFunc(RF_DagNode_t *node)
187{ 187{
188 int np = node->numParams; 188 int np = node->numParams;
189 RF_AccessStripeMap_t *asmap = (RF_AccessStripeMap_t *) node->params[np - 1].p; 189 RF_AccessStripeMap_t *asmap = (RF_AccessStripeMap_t *) node->params[np - 1].p;
190 RF_Raid_t *raidPtr = (RF_Raid_t *) node->params[np - 2].p; 190 RF_Raid_t *raidPtr = (RF_Raid_t *) node->params[np - 2].p;
191 RF_RaidLayout_t *layoutPtr = (RF_RaidLayout_t *) & (raidPtr->Layout); 191 RF_RaidLayout_t *layoutPtr = (RF_RaidLayout_t *) & (raidPtr->Layout);

cvs diff -r1.116 -r1.117 src/sys/dev/sysmon/sysmon_envsys.c (expand / switch to unified diff)

--- src/sys/dev/sysmon/sysmon_envsys.c 2011/06/19 11:40:26 1.116
+++ src/sys/dev/sysmon/sysmon_envsys.c 2011/08/01 12:28:53 1.117
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: sysmon_envsys.c,v 1.116 2011/06/19 11:40:26 martin Exp $ */ 1/* $NetBSD: sysmon_envsys.c,v 1.117 2011/08/01 12:28:53 mbalmer Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2007, 2008 Juan Romero Pardines. 4 * Copyright (c) 2007, 2008 Juan Romero Pardines.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -54,27 +54,27 @@ @@ -54,27 +54,27 @@
54 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 54 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
55 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 55 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
56 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 56 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
57 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 57 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
58 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 58 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59 */ 59 */
60 60
61/* 61/*
62 * Environmental sensor framework for sysmon, exported to userland 62 * Environmental sensor framework for sysmon, exported to userland
63 * with proplib(3). 63 * with proplib(3).
64 */ 64 */
65 65
66#include <sys/cdefs.h> 66#include <sys/cdefs.h>
67__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.116 2011/06/19 11:40:26 martin Exp $"); 67__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.117 2011/08/01 12:28:53 mbalmer Exp $");
68 68
69#include <sys/param.h> 69#include <sys/param.h>
70#include <sys/types.h> 70#include <sys/types.h>
71#include <sys/conf.h> 71#include <sys/conf.h>
72#include <sys/errno.h> 72#include <sys/errno.h>
73#include <sys/fcntl.h> 73#include <sys/fcntl.h>
74#include <sys/kernel.h> 74#include <sys/kernel.h>
75#include <sys/systm.h> 75#include <sys/systm.h>
76#include <sys/proc.h> 76#include <sys/proc.h>
77#include <sys/mutex.h> 77#include <sys/mutex.h>
78#include <sys/kmem.h> 78#include <sys/kmem.h>
79 79
80/* #define ENVSYS_DEBUG */ 80/* #define ENVSYS_DEBUG */
@@ -1364,27 +1364,27 @@ sme_add_sensor_dictionary(struct sysmon_ @@ -1364,27 +1364,27 @@ sme_add_sensor_dictionary(struct sysmon_
1364 sme_evdrv_t->sed_powertype = sdt->crittype; 1364 sme_evdrv_t->sed_powertype = sdt->crittype;
1365 } 1365 }
1366 1366
1367out: 1367out:
1368 return sme_evdrv_t; 1368 return sme_evdrv_t;
1369 1369
1370bad: 1370bad:
1371 prop_object_release(dict); 1371 prop_object_release(dict);
1372 return NULL; 1372 return NULL;
1373} 1373}
1374 1374
1375/* 1375/*
1376 * Find the maximum of all currently reported values. 1376 * Find the maximum of all currently reported values.
1377 * The provided callback decides wether a sensor is part of the 1377 * The provided callback decides whether a sensor is part of the
1378 * maximum calculation (by returning true) or ignored (callback 1378 * maximum calculation (by returning true) or ignored (callback
1379 * returns false). Example usage: callback selects temperature 1379 * returns false). Example usage: callback selects temperature
1380 * sensors in a given thermal zone, the function calculates the 1380 * sensors in a given thermal zone, the function calculates the
1381 * maximum currently reported temperature in this zone. 1381 * maximum currently reported temperature in this zone.
1382 * If the parameter "refresh" is true, new values will be aquired 1382 * If the parameter "refresh" is true, new values will be aquired
1383 * from the hardware, if not, the last reported value will be used. 1383 * from the hardware, if not, the last reported value will be used.
1384 */ 1384 */
1385uint32_t 1385uint32_t
1386sysmon_envsys_get_max_value(bool (*predicate)(const envsys_data_t*), 1386sysmon_envsys_get_max_value(bool (*predicate)(const envsys_data_t*),
1387 bool refresh) 1387 bool refresh)
1388{ 1388{
1389 struct sysmon_envsys *sme; 1389 struct sysmon_envsys *sme;
1390 uint32_t maxv, v; 1390 uint32_t maxv, v;

cvs diff -r1.6 -r1.7 src/usr.sbin/syslogd/tls.c (expand / switch to unified diff)

--- src/usr.sbin/syslogd/tls.c 2011/05/24 13:26:41 1.6
+++ src/usr.sbin/syslogd/tls.c 2011/08/01 12:28:53 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: tls.c,v 1.6 2011/05/24 13:26:41 joerg Exp $ */ 1/* $NetBSD: tls.c,v 1.7 2011/08/01 12:28:53 mbalmer Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Martin Schütte. 8 * by Martin Schütte.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -35,27 +35,27 @@ @@ -35,27 +35,27 @@
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE. 36 * POSSIBILITY OF SUCH DAMAGE.
37 */ 37 */
38/* 38/*
39 * tls.c TLS related code for syslogd 39 * tls.c TLS related code for syslogd
40 * 40 *
41 * implements the TLS init and handshake callbacks with all required 41 * implements the TLS init and handshake callbacks with all required
42 * checks from http://tools.ietf.org/html/draft-ietf-syslog-transport-tls-13 42 * checks from http://tools.ietf.org/html/draft-ietf-syslog-transport-tls-13
43 * 43 *
44 * Martin Schütte 44 * Martin Schütte
45 */ 45 */
46 46
47#include <sys/cdefs.h> 47#include <sys/cdefs.h>
48__RCSID("$NetBSD: tls.c,v 1.6 2011/05/24 13:26:41 joerg Exp $"); 48__RCSID("$NetBSD: tls.c,v 1.7 2011/08/01 12:28:53 mbalmer Exp $");
49 49
50#ifndef DISABLE_TLS 50#ifndef DISABLE_TLS
51#include "syslogd.h" 51#include "syslogd.h"
52#include "tls.h" 52#include "tls.h"
53#include <netinet/in.h> 53#include <netinet/in.h>
54#include <ifaddrs.h> 54#include <ifaddrs.h>
55#include "extern.h" 55#include "extern.h"
56 56
57static unsigned getVerifySetting(const char *x509verifystring); 57static unsigned getVerifySetting(const char *x509verifystring);
58 58
59/* to output SSL error codes */ 59/* to output SSL error codes */
60static const char *SSL_ERRCODE[] = { 60static const char *SSL_ERRCODE[] = {
61 "SSL_ERROR_NONE", 61 "SSL_ERROR_NONE",
@@ -655,27 +655,27 @@ deny_cert(struct tls_conn_settings *conn @@ -655,27 +655,27 @@ deny_cert(struct tls_conn_settings *conn
655 "already approved certificate became invalid. " 655 "already approved certificate became invalid. "
656 "Subject is \"%s\", fingerprint is \"%s\"", 656 "Subject is \"%s\", fingerprint is \"%s\"",
657 conn_info->incoming ? "client" : "server", 657 conn_info->incoming ? "client" : "server",
658 cur_subjectline, cur_fingerprint); 658 cur_subjectline, cur_fingerprint);
659 FREEPTR(cur_fingerprint); 659 FREEPTR(cur_fingerprint);
660 FREEPTR(cur_subjectline); 660 FREEPTR(cur_subjectline);
661 return 0; 661 return 0;
662} 662}
663 663
664/* 664/*
665 * Callback after OpenSSL has verified a peer certificate, 665 * Callback after OpenSSL has verified a peer certificate,
666 * gets called for every certificate in a chain (starting with root CA). 666 * gets called for every certificate in a chain (starting with root CA).
667 * preverify_ok indicates a valid trust path (necessary), 667 * preverify_ok indicates a valid trust path (necessary),
668 * then we check wether the hostname or configured subject matches the cert. 668 * then we check whether the hostname or configured subject matches the cert.
669 */ 669 */
670int 670int
671check_peer_cert(int preverify_ok, X509_STORE_CTX *ctx) 671check_peer_cert(int preverify_ok, X509_STORE_CTX *ctx)
672{ 672{
673 char *cur_subjectline = NULL; 673 char *cur_subjectline = NULL;
674 char *cur_fingerprint = NULL; 674 char *cur_fingerprint = NULL;
675 char cur_issuerline[256]; 675 char cur_issuerline[256];
676 SSL *ssl; 676 SSL *ssl;
677 X509 *cur_cert; 677 X509 *cur_cert;
678 int cur_err, cur_depth; 678 int cur_err, cur_depth;
679 struct tls_conn_settings *conn_info; 679 struct tls_conn_settings *conn_info;
680 struct peer_cred *cred, *tmp_cred; 680 struct peer_cred *cred, *tmp_cred;
681 681