lib.c (c9f289701540baeef9ac7c9977d67a7259f404db) | lib.c (e625e50ceee18bc1e3fb1a6375e089405a797a4d) |
---|---|
1/* 2 BlueZ - Bluetooth protocol stack for Linux 3 Copyright (C) 2000-2001 Qualcomm Incorporated 4 5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License version 2 as --- 169 unchanged lines hidden (view full) --- 178 vaf.va = &args; 179 180 pr_err("%pV", &vaf); 181 182 va_end(args); 183} 184EXPORT_SYMBOL(bt_err); 185 | 1/* 2 BlueZ - Bluetooth protocol stack for Linux 3 Copyright (C) 2000-2001 Qualcomm Incorporated 4 5 Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License version 2 as --- 169 unchanged lines hidden (view full) --- 178 vaf.va = &args; 179 180 pr_err("%pV", &vaf); 181 182 va_end(args); 183} 184EXPORT_SYMBOL(bt_err); 185 |
186#ifdef CONFIG_BT_FEATURE_DEBUG 187static bool debug_enable; 188 189void bt_dbg_set(bool enable) 190{ 191 debug_enable = enable; 192} 193 194bool bt_dbg_get(void) 195{ 196 return debug_enable; 197} 198 199void bt_dbg(const char *format, ...) 200{ 201 struct va_format vaf; 202 va_list args; 203 204 if (likely(!debug_enable)) 205 return; 206 207 va_start(args, format); 208 209 vaf.fmt = format; 210 vaf.va = &args; 211 212 printk(KERN_DEBUG pr_fmt("%pV"), &vaf); 213 214 va_end(args); 215} 216EXPORT_SYMBOL(bt_dbg); 217#endif 218 |
|
186void bt_warn_ratelimited(const char *format, ...) 187{ 188 struct va_format vaf; 189 va_list args; 190 191 va_start(args, format); 192 193 vaf.fmt = format; --- 23 unchanged lines hidden --- | 219void bt_warn_ratelimited(const char *format, ...) 220{ 221 struct va_format vaf; 222 va_list args; 223 224 va_start(args, format); 225 226 vaf.fmt = format; --- 23 unchanged lines hidden --- |