| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: subr_prf.c,v 1.160.8.1 2023/02/24 14:17:18 martin Exp $ */ | | 1 | /* $NetBSD: subr_prf.c,v 1.160.8.2 2023/04/17 18:13:44 martin Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1986, 1988, 1991, 1993 | | 4 | * Copyright (c) 1986, 1988, 1991, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * (c) UNIX System Laboratories, Inc. | | 6 | * (c) UNIX System Laboratories, Inc. |
7 | * All or some portions of this file are derived from material licensed | | 7 | * All or some portions of this file are derived from material licensed |
8 | * to the University of California by American Telephone and Telegraph | | 8 | * to the University of California by American Telephone and Telegraph |
9 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | | 9 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with |
10 | * the permission of UNIX System Laboratories, Inc. | | 10 | * the permission of UNIX System Laboratories, Inc. |
11 | * | | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | | 12 | * Redistribution and use in source and binary forms, with or without |
13 | * modification, are permitted provided that the following conditions | | 13 | * modification, are permitted provided that the following conditions |
14 | * are met: | | 14 | * are met: |
| @@ -27,27 +27,27 @@ | | | @@ -27,27 +27,27 @@ |
27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | * SUCH DAMAGE. | | 34 | * SUCH DAMAGE. |
35 | * | | 35 | * |
36 | * @(#)subr_prf.c 8.4 (Berkeley) 5/4/95 | | 36 | * @(#)subr_prf.c 8.4 (Berkeley) 5/4/95 |
37 | */ | | 37 | */ |
38 | | | 38 | |
39 | #include <sys/cdefs.h> | | 39 | #include <sys/cdefs.h> |
40 | __KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.160.8.1 2023/02/24 14:17:18 martin Exp $"); | | 40 | __KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.160.8.2 2023/04/17 18:13:44 martin Exp $"); |
41 | | | 41 | |
42 | #ifdef _KERNEL_OPT | | 42 | #ifdef _KERNEL_OPT |
43 | #include "opt_ddb.h" | | 43 | #include "opt_ddb.h" |
44 | #include "opt_ipkdb.h" | | 44 | #include "opt_ipkdb.h" |
45 | #include "opt_kgdb.h" | | 45 | #include "opt_kgdb.h" |
46 | #include "opt_dump.h" | | 46 | #include "opt_dump.h" |
47 | #include "opt_rnd_printf.h" | | 47 | #include "opt_rnd_printf.h" |
48 | #endif | | 48 | #endif |
49 | | | 49 | |
50 | #include <sys/param.h> | | 50 | #include <sys/param.h> |
51 | #include <sys/stdint.h> | | 51 | #include <sys/stdint.h> |
52 | #include <sys/systm.h> | | 52 | #include <sys/systm.h> |
53 | #include <sys/buf.h> | | 53 | #include <sys/buf.h> |
| @@ -794,26 +794,27 @@ aprint_error_internal(const char *prefix | | | @@ -794,26 +794,27 @@ aprint_error_internal(const char *prefix |
794 | { | | 794 | { |
795 | int flags = TOLOG; | | 795 | int flags = TOLOG; |
796 | | | 796 | |
797 | if ((boothowto & (AB_SILENT|AB_QUIET)) == 0 || | | 797 | if ((boothowto & (AB_SILENT|AB_QUIET)) == 0 || |
798 | (boothowto & AB_VERBOSE) != 0) | | 798 | (boothowto & AB_VERBOSE) != 0) |
799 | flags |= TOCONS; | | 799 | flags |= TOCONS; |
800 | | | 800 | |
801 | kprintf_lock(); | | 801 | kprintf_lock(); |
802 | | | 802 | |
803 | aprint_error_count++; | | 803 | aprint_error_count++; |
804 | | | 804 | |
805 | if (prefix) | | 805 | if (prefix) |
806 | kprintf_internal("%s: ", flags, NULL, NULL, prefix); | | 806 | kprintf_internal("%s: ", flags, NULL, NULL, prefix); |
| | | 807 | kprintf_internal("autoconfiguration error: ", TOLOG, NULL, NULL); |
807 | kprintf(fmt, flags, NULL, NULL, ap); | | 808 | kprintf(fmt, flags, NULL, NULL, ap); |
808 | | | 809 | |
809 | kprintf_unlock(); | | 810 | kprintf_unlock(); |
810 | | | 811 | |
811 | if (!panicstr) | | 812 | if (!panicstr) |
812 | logwakeup(); | | 813 | logwakeup(); |
813 | } | | 814 | } |
814 | | | 815 | |
815 | void | | 816 | void |
816 | aprint_error(const char *fmt, ...) | | 817 | aprint_error(const char *fmt, ...) |
817 | { | | 818 | { |
818 | va_list ap; | | 819 | va_list ap; |
819 | | | 820 | |
| @@ -897,27 +898,26 @@ aprint_naive_ifnet(struct ifnet *ifp, co | | | @@ -897,27 +898,26 @@ aprint_naive_ifnet(struct ifnet *ifp, co |
897 | */ | | 898 | */ |
898 | static void | | 899 | static void |
899 | aprint_verbose_internal(const char *prefix, const char *fmt, va_list ap) | | 900 | aprint_verbose_internal(const char *prefix, const char *fmt, va_list ap) |
900 | { | | 901 | { |
901 | int flags = TOLOG; | | 902 | int flags = TOLOG; |
902 | | | 903 | |
903 | if (boothowto & AB_VERBOSE) | | 904 | if (boothowto & AB_VERBOSE) |
904 | flags |= TOCONS; | | 905 | flags |= TOCONS; |
905 | | | 906 | |
906 | kprintf_lock(); | | 907 | kprintf_lock(); |
907 | | | 908 | |
908 | if (prefix) | | 909 | if (prefix) |
909 | kprintf_internal("%s: ", flags, NULL, NULL, prefix); | | 910 | kprintf_internal("%s: ", flags, NULL, NULL, prefix); |
910 | kprintf_internal("autoconfiguration error: ", TOLOG, NULL, NULL); | | | |
911 | kprintf(fmt, flags, NULL, NULL, ap); | | 911 | kprintf(fmt, flags, NULL, NULL, ap); |
912 | | | 912 | |
913 | kprintf_unlock(); | | 913 | kprintf_unlock(); |
914 | | | 914 | |
915 | if (!panicstr) | | 915 | if (!panicstr) |
916 | logwakeup(); | | 916 | logwakeup(); |
917 | } | | 917 | } |
918 | | | 918 | |
919 | void | | 919 | void |
920 | aprint_verbose(const char *fmt, ...) | | 920 | aprint_verbose(const char *fmt, ...) |
921 | { | | 921 | { |
922 | va_list ap; | | 922 | va_list ap; |
923 | | | 923 | |