According to the Oxford Dictionary of Etymology, a wether is a male sheep or ram.diff -r1.19 -r1.20 src/libexec/atrun/atrun.c
(mbalmer)
--- 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 | |
60 | static char rcsid[] = "$OpenBSD: atrun.c,v 1.7 1997/09/08 22:12:10 millert Exp $"; | 60 | static 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 | |||
65 | static int debug = 0; | 65 | static int debug = 0; | |
66 | 66 | |||
67 | /* Local functions */ | 67 | /* Local functions */ | |
68 | static void perr(const char *, ...) __dead; | 68 | static void perr(const char *, ...) __dead; | |
69 | static void perrx(const char *, ...) __dead; | 69 | static void perrx(const char *, ...) __dead; | |
70 | static int write_string(int, const char *); | 70 | static int write_string(int, const char *); | |
71 | static void run_file(const char *, uid_t, gid_t); | 71 | static void run_file(const char *, uid_t, gid_t); | |
72 | static void become_user(struct passwd *, uid_t); | 72 | static void become_user(struct passwd *, uid_t); | |
73 | 73 | |||
74 | static const char nobody[] = "nobody"; | 74 | static 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 | |||
365 | int | 365 | int | |
366 | main(int argc, char *argv[]) | 366 | main(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; |
--- src/share/terminfo/terminfo 2011/06/19 16:27:23 1.3
+++ src/share/terminfo/terminfo 2011/08/01 12:28:54 1.4
--- 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, |
--- 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, |
--- 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 | |||
50 | struct bah_softc { | 50 | struct 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; |
--- 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 | |||
223 | int | 223 | int | |
224 | tr_attach(struct tr_softc *sc) | 224 | tr_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; |
--- 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 | |||
850 | static void | 850 | static void | |
851 | mach64_init(struct mach64_softc *sc) | 851 | mach64_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? */ |
--- 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 | |||
35 | static char const n8_id[] = "$Id: n8_sks.c,v 1.1 2008/10/30 12:02:15 darran Exp $"; | 35 | static 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 | *****************************************************************************/ | |
1027 | N8_Status_t N8_SKSGetKeyHandle(const N8_Buffer_t* keyEntryName, | 1027 | N8_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]; |
--- 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; |
--- 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++; |
--- 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 | |||
185 | int | 185 | int | |
186 | rf_PQDoubleRecoveryFunc(RF_DagNode_t *node) | 186 | rf_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); |
--- 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 | |||
1367 | out: | 1367 | out: | |
1368 | return sme_evdrv_t; | 1368 | return sme_evdrv_t; | |
1369 | 1369 | |||
1370 | bad: | 1370 | bad: | |
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 | */ | |
1385 | uint32_t | 1385 | uint32_t | |
1386 | sysmon_envsys_get_max_value(bool (*predicate)(const envsys_data_t*), | 1386 | sysmon_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; |
--- 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 | |||
57 | static unsigned getVerifySetting(const char *x509verifystring); | 57 | static unsigned getVerifySetting(const char *x509verifystring); | |
58 | 58 | |||
59 | /* to output SSL error codes */ | 59 | /* to output SSL error codes */ | |
60 | static const char *SSL_ERRCODE[] = { | 60 | static 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 | */ | |
670 | int | 670 | int | |
671 | check_peer_cert(int preverify_ok, X509_STORE_CTX *ctx) | 671 | check_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 |