diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-07-11 14:58:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-11 14:58:22 -0400 |
commit | 4b42c542afbc119c4012324ea80e0c5a89afea4f (patch) | |
tree | a67a788c7ba06cb40219b49505f84594dabc6f82 /net/bluetooth/lib.c | |
parent | d8598981146241064993e371cea8333f59553cb6 (diff) | |
parent | e2fd318e3a9208245ee1041f6d413c8593fba29d (diff) | |
download | lwn-4b42c542afbc119c4012324ea80e0c5a89afea4f.tar.gz lwn-4b42c542afbc119c4012324ea80e0c5a89afea4f.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6
Conflicts:
net/bluetooth/l2cap_core.c
Diffstat (limited to 'net/bluetooth/lib.c')
-rw-r--r-- | net/bluetooth/lib.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c index b826d1bf10df..86a6bed229df 100644 --- a/net/bluetooth/lib.c +++ b/net/bluetooth/lib.c @@ -59,7 +59,7 @@ char *batostr(bdaddr_t *ba) EXPORT_SYMBOL(batostr); /* Bluetooth error codes to Unix errno mapping */ -int bt_err(__u16 code) +int bt_to_errno(__u16 code) { switch (code) { case 0: @@ -149,4 +149,23 @@ int bt_err(__u16 code) return ENOSYS; } } -EXPORT_SYMBOL(bt_err); +EXPORT_SYMBOL(bt_to_errno); + +int bt_printk(const char *level, const char *format, ...) +{ + struct va_format vaf; + va_list args; + int r; + + va_start(args, format); + + vaf.fmt = format; + vaf.va = &args; + + r = printk("%sBluetooth: %pV\n", level, &vaf); + + va_end(args); + + return r; +} +EXPORT_SYMBOL(bt_printk); |