SOFTWARE IS DISCLAIMED.
*/
-/*
- * Bluetooth kernel library.
- *
- * $Id: lib.c,v 1.1 2002/03/08 21:06:59 maxk Exp $
- */
+/* Bluetooth kernel library. */
+
+#include <linux/config.h>
+#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <net/bluetooth/bluetooth.h>
-void bt_dump(char *pref, __u8 *buf, int count)
-{
- char *ptr;
- char line[100];
- int i;
-
- printk(KERN_INFO "%s: dump, len %d\n", pref, count);
-
- ptr = line;
- *ptr = 0;
- for (i = 0; i<count; i++) {
- ptr += sprintf(ptr, " %2.2X", buf[i]);
-
- if (i && !((i + 1) % 20)) {
- printk(KERN_INFO "%s:%s\n", pref, line);
- ptr = line;
- *ptr = 0;
- }
- }
-
- if (line[0])
- printk(KERN_INFO "%s:%s\n", pref, line);
-}
-
void baswap(bdaddr_t *dst, bdaddr_t *src)
{
unsigned char *d = (unsigned char *) dst;
unsigned char *s = (unsigned char *) src;
- int i;
+ unsigned int i;
for (i = 0; i < 6; i++)
d[i] = s[5 - i];
}
+EXPORT_SYMBOL(baswap);
char *batostr(bdaddr_t *ba)
{
i ^= 1;
sprintf(str[i], "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
- ba->b[0], ba->b[1], ba->b[2],
+ ba->b[0], ba->b[1], ba->b[2],
ba->b[3], ba->b[4], ba->b[5]);
return str[i];
}
+EXPORT_SYMBOL(batostr);
/* Bluetooth error codes to Unix errno mapping */
int bt_err(__u16 code)
return ENOSYS;
}
}
+EXPORT_SYMBOL(bt_err);